aboutsummaryrefslogtreecommitdiff
path: root/src/jniproj.c
diff options
context:
space:
mode:
authorMartin Desruisseaux <martin.desruisseaux@geomatys.com>2018-05-02 13:48:19 +0200
committerMartin Desruisseaux <martin.desruisseaux@geomatys.com>2018-05-02 13:48:19 +0200
commit7452e0ce1c40a09e6aedddf64d81dd124fa4609a (patch)
tree8c32797eb09d988eff64667359f0a50dcc3c6927 /src/jniproj.c
parent609a8ab36f3d2ba820d548dcf82f745e6eb35c2f (diff)
downloadPROJ-7452e0ce1c40a09e6aedddf64d81dd124fa4609a.tar.gz
PROJ-7452e0ce1c40a09e6aedddf64d81dd124fa4609a.zip
Use the #define constant generated by javac instead than a constant maintained manually.
Diffstat (limited to 'src/jniproj.c')
-rw-r--r--src/jniproj.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/jniproj.c b/src/jniproj.c
index 072fa04c..573dd0e7 100644
--- a/src/jniproj.c
+++ b/src/jniproj.c
@@ -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
@@ -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)) {