On Wed, 2008-05-21 at 14:10 -0400, Farrukh Najmi wrote:
> Thanks Jody for the very helpful response.
> 
> I am unclear about one important conceptual understanding though. You 
> said that "JTS does not care (or use) the SRID value". So what does JTS 
> use for its internal CoordinateReferenceSystem? Does that mean that 
> before geometry objects are stored using JTS they are normalized to that 
> JTS internal CoordinateReferenceSystem? How else could JTS do spatial 
> operations on geometry objects that use different SRID values?
> 
> Said another way, geotools allows apps to use a large number of 
> CoordinateReferenceSystems among different geometry objects. I had 
> assumed JTS did the same and the only difference between the two was use 
> of SRID vs. CoordinateReferenceSystem with some mapping between the two. 
> Your statement "JTS does not care (or use) the SRID value" puts in doubt 
> my understanding of how CoordinateReferenceSystems are handled in the 
> two libraries.
> 
> TIA for clearing my confusion.

Hello,

Good to see you asking all these questions. I'm still hoping to wander
back to your ebRIM land someday...


JTS lives in 2D cartesian coordinates only. Since JTS calculations are
based on raw primitives, JTS will happily churn out an answer using the
numeric value as if it were on a cartesian plane. The SRS info is not
used. 

The correct way to use JTS from Geotools, therefore would be to convert
all data to an actual Cartesian2D CRS before analysis then convert the
data back. Of course, that only works at local scales and I have no idea
what kind of errors this process can induce. Also, there is some code in
Geotools to move the meridian around if the anti-meridian is in the way
of some analysis.

The ISO 19107 spec is pushing us to go further towards real GIS
mathematics and start to do the math *in* the CRS of the original
object. We have made several fledgling efforts so far but have nothing
solid unfortunately.

--adrian


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to