Given:
2 JTS geometries g1 and g2
2 CRS crs1 and crs2 (not known in advance)
I want to apply a spatial predicate (intersects,overlapps,..) to g1 and g2.
If "CRS.equalsIgnoreMetaData" is false, I convert both g1 and g2 to WGS84
CRS commonCrs = CRS.decode("EPSG:4326")
MathTransform transform = CRS.findMathTransform(crs1, commonCrs);
Gemotry g1transformed =JTS.transform( g, transform);
transform = CRS.findMathTransform(crs2, commonCrs);
Gemotry g2transformed =JTS.transform( g2, transform);
Is this correct ?
The problem is that EPSG:4326 has LAT/LON coordinates, first ordinate is y,
second is x.
Looking at the bottom of
http://docs.codehaus.org/display/GEOTDOC/04+What+Axis+is+X
shows a possibility to find out if the CRS is an xy or yx one.
Having an xy mismatch, I have to do a deep copy of the JTS Geometry and
switch x and y.
Is this correct ?
I think the most crs are of type first x, second y. That means I have more
situations where I have to deep copy JTS geometries.
The idea would be to have second "commonCRS" wich is like EPSG:4326 but with
LON/LAT coodinates.
How can I create such a CRS ?
thanks
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel