diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-05-04 22:55:05 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-04 22:55:05 +0300 |
| commit | 8dcdf567311a7f088ab538f41a0e947b825ce75d (patch) | |
| tree | 519287b8981906e5748689085bec2e6cb61d6a78 /src | |
| parent | becce337ec2dc70a725f784e74e803f1276a7af2 (diff) | |
| parent | 61d5248c0afae165ab47ce45f6a61c90454212ee (diff) | |
| download | PROJ-8dcdf567311a7f088ab538f41a0e947b825ce75d.tar.gz PROJ-8dcdf567311a7f088ab538f41a0e947b825ce75d.zip | |
Merge pull request #969 from Geomatys/master
Update documentation and modularize the Java bindings
Diffstat (limited to 'src')
| -rw-r--r-- | src/jniproj.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/jniproj.c b/src/jniproj.c index 072fa04c..67aa2478 100644 --- a/src/jniproj.c +++ b/src/jniproj.c @@ -1,6 +1,6 @@ /****************************************************************************** * Project: PROJ.4 - * Purpose: Java/JNI wrappers for PROJ.4 API. + * Purpose: Java/JNI wrappers for PROJ API. * Author: Antonello Andrea * Martin Desruisseaux * @@ -32,7 +32,7 @@ * \file jniproj.c * * \brief - * Functions used by the Java Native Interface (JNI) wrappers of Proj.4 + * Functions used by the Java Native Interface (JNI) wrappers of PROJ. * * * \author Antonello Andrea @@ -54,9 +54,6 @@ #define PJ_FIELD_NAME "ptr" #define PJ_FIELD_TYPE "J" -#define PJ_MAX_DIMENSION 100 -/* The PJ_MAX_DIMENSION value appears also in quoted strings. - Please perform a search-and-replace if this value is changed. */ /*! * \brief @@ -342,7 +339,7 @@ JNIEXPORT jdouble JNICALL Java_org_proj4_PJ_getLinearUnitToMetre * Converts input values from degrees to radians before coordinate operation, or the output * values from radians to degrees after the coordinate operation. * - * \param pj - The Proj.4 PJ structure. + * \param pj - The PROJ.4 PJ structure. * \param data - The coordinate array to transform. * \param numPts - Number of points to transform. * \param dimension - Dimension of points in the coordinate array. @@ -391,9 +388,9 @@ JNIEXPORT void JNICALL Java_org_proj4_PJ_transform if (c) (*env)->ThrowNew(env, c, "The target CRS and the coordinates array can not be null."); return; } - if (dimension < 2 || dimension > PJ_MAX_DIMENSION) { /* Arbitrary upper value for catching potential misuse. */ + if (dimension < 2 || dimension > org_proj4_PJ_DIMENSION_MAX) { /* Arbitrary upper value for catching potential misuse. */ jclass c = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); - if (c) (*env)->ThrowNew(env, c, "Illegal dimension. Must be in the [2-100] range."); + if (c) (*env)->ThrowNew(env, c, "Illegal number of dimensions."); return; } if ((offset < 0) || (numPts < 0) || (offset + dimension*numPts) > (*env)->GetArrayLength(env, coordinates)) { |
