You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
geotools
/
modules
/
library
/
main
/
src
/
test
/
java
/
org
/
geotools
/
renderer
/
crs
/
ProjectionHandlerTest.java
Jump to
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
"PROJCS[
\"
equi7_antarctica
\"
,GEOGCS[
\"
GCS_WGS_1984
\"
,DATUM[
\"
D_WGS_1984
\"
,SPHEROID[
\"
WGS_1984
\"
,6378137.0,298.257223563]],PRIMEM[
\"
Greenwich
\"
,0.0],UNIT[
\"
Degree
\"
,0.0174532925199433]],PROJECTION[
\"
Azimuthal_Equidistant
\"
],PARAMETER[
\"
false_easting
\"
,3714266.97719],PARAMETER[
\"
false_northing
\"
,3402016.50625],PARAMETER[
\"
central_meridian
\"
,0.0],PARAMETER[
\"
latitude_of_origin
\"
,-90.0],UNIT[
\"
Meter
\"
,1.0]]"
;
CoordinateReferenceSystem
crs
=
CRS
.
parseWKT
(
wkt
);
double
beyond
=
27000000
;
double
cx
=
3714266.97719
;
// false easting
double
cy
=
3402016.50625
;
// false northing
ReferencedEnvelope
re
=
new
ReferencedEnvelope
(
cx
-
beyond
,
cx
+
beyond
,
cy
-
beyond
,
cy
+
beyond
,
crs
);
"PROJCS[
\"
equi7_asia_nofalseXY
\"
,GEOGCS[
\"
GCS_WGS_1984
\"
,DATUM[
\"
D_WGS_1984
\"
,SPHEROID[
\"
WGS_1984
\"
,6378137.0,298.257223563]],PRIMEM[
\"
Greenwich
\"
,0.0],UNIT[
\"
Degree
\"
,0.0174532925199433]],PROJECTION[
\"
Azimuthal_Equidistant
\"
],PARAMETER[
\"
false_easting
\"
,4340913.84808],PARAMETER[
\"
false_northing
\"
,4812712.92347],PARAMETER[
\"
central_meridian
\"
,94.0],PARAMETER[
\"
latitude_of_origin
\"
,47.0],UNIT[
\"
Meter
\"
,1.0]]"
;
CoordinateReferenceSystem
crs
=
CRS
.
parseWKT
(
wkt
);
ReferencedEnvelope
re
=
new
ReferencedEnvelope
(-
12000000
,
12000000
, -
12000000
,
12000000
,
crs
);
ProjectionHandler
ph
=
ProjectionHandlerFinder
.
getHandler
(
re
,
DefaultGeographicCRS
.
WGS84
,
false
);
assertNotNull
(
ph
);
List
<
ReferencedEnvelope
>
envelopes
=
ph
.
getQueryEnvelopes
();
assertEquals
(
1
,
envelopes
.
size
());
ReferencedEnvelope
qe
=
envelopes
.
get
(
0
);
assertEquals
(-
180
,
qe
.
getMinX
(),
1e-3
);
// miny used to be a higher number, making the reprojection miss necessary data
assertEquals
(-
90
,
qe
.
getMinY
(),
1e-3
);
assertEquals
(
180
,
qe
.
getMaxX
(),
1e-3
);
assertEquals
(
90
,
qe
.
getMaxY
(),
1e-3
);