Revision 270 org.gvsig.projection.jcrs/trunk/org.gvsig.projection.jcrs/org.gvsig.projection.jcrs.lib/src/main/java/org/gvsig/crs/proj/JNIBaseCrs.java
JNIBaseCrs.java | ||
---|---|---|
55 | 55 |
protected native int isLatlong(long crs); |
56 | 56 |
protected static native int compareDatums(long datum1, long datum2); |
57 | 57 |
protected native int getErrno(); |
58 |
protected static native String strErrno(int errno); |
|
58 |
//protected static native String strErrno(int errno);
|
|
59 | 59 |
|
60 | 60 |
|
61 | 61 |
protected static native int operation(double[] firstCoord, |
... | ... | |
78 | 78 |
System.loadLibrary("crsjniproj2.0.1"); |
79 | 79 |
} |
80 | 80 |
|
81 |
private static final String[] pj_err_list = new String[]{ |
|
82 |
"no arguments in initialization list", /* -1 */ |
|
83 |
"no options found in 'init' file", /* -2 */ |
|
84 |
"no colon in init= string", /* -3 */ |
|
85 |
"projection not named", /* -4 */ |
|
86 |
"unknown projection id", /* -5 */ |
|
87 |
"effective eccentricity = 1.", /* -6 */ |
|
88 |
"unknown unit conversion id", /* -7 */ |
|
89 |
"invalid boolean param argument", /* -8 */ |
|
90 |
"unknown elliptical parameter name", /* -9 */ |
|
91 |
"reciprocal flattening (1/f) = 0", /* -10 */ |
|
92 |
"|radius reference latitude| > 90", /* -11 */ |
|
93 |
"squared eccentricity < 0", /* -12 */ |
|
94 |
"major axis or radius = 0 or not given", /* -13 */ |
|
95 |
"latitude or longitude exceeded limits", /* -14 */ |
|
96 |
"invalid x or y", /* -15 */ |
|
97 |
"improperly formed DMS value", /* -16 */ |
|
98 |
"non-convergent inverse meridinal dist", /* -17 */ |
|
99 |
"non-convergent inverse phi2", /* -18 */ |
|
100 |
"acos/asin: |arg| >1.+1e-14", /* -19 */ |
|
101 |
"tolerance condition error", /* -20 */ |
|
102 |
"conic lat_1 = -lat_2", /* -21 */ |
|
103 |
"lat_1 >= 90", /* -22 */ |
|
104 |
"lat_1 = 0", /* -23 */ |
|
105 |
"lat_ts >= 90", /* -24 */ |
|
106 |
"no distance between control points", /* -25 */ |
|
107 |
"projection not selected to be rotated", /* -26 */ |
|
108 |
"W <= 0 or M <= 0", /* -27 */ |
|
109 |
"lsat not in 1-5 range", /* -28 */ |
|
110 |
"path not in range", /* -29 */ |
|
111 |
"h <= 0", /* -30 */ |
|
112 |
"k <= 0", /* -31 */ |
|
113 |
"lat_0 = 0 or 90 or alpha = 90", /* -32 */ |
|
114 |
"lat_1=lat_2 or lat_1=0 or lat_2=90", /* -33 */ |
|
115 |
"elliptical usage required", /* -34 */ |
|
116 |
"invalid UTM zone number", /* -35 */ |
|
117 |
"arg(s) out of range for Tcheby eval", /* -36 */ |
|
118 |
"failed to find projection to be rotated", /* -37 */ |
|
119 |
"failed to load NAD27-83 correction file", /* -38 */ |
|
120 |
"both n & m must be spec'd and > 0", /* -39 */ |
|
121 |
"n <= 0, n > 1 or not specified", /* -40 */ |
|
122 |
"lat_1 or lat_2 not specified", /* -41 */ |
|
123 |
"|lat_1| == |lat_2|", /* -42 */ |
|
124 |
"lat_0 is pi/2 from mean lat", /* -43 */ |
|
125 |
"unparseable coordinate system definition", /* -44 */ |
|
126 |
"geocentric transformation missing z or ellps", /* -45 */ |
|
127 |
"unknown prime meridian conversion id", /* -46 */ |
|
128 |
}; |
|
129 |
|
|
130 |
public static String strErrno(int errno) { |
|
131 |
if( errno>=0 ) { |
|
132 |
return "errno "+errno; |
|
133 |
} |
|
134 |
int i = -errno - 1; |
|
135 |
if( i>=pj_err_list.length ) { |
|
136 |
return "invalid projection system error ("+errno+")."; |
|
137 |
} |
|
138 |
return pj_err_list[i]; |
|
139 |
} |
|
140 |
|
|
141 |
|
|
81 | 142 |
protected void createCrs(String strCrs) throws CrsProjException { |
82 | 143 |
long cPtr; |
83 | 144 |
cPtr=loadCrs(strCrs); |
Also available in: Unified diff