Farrukh Najmi wrote:
> Jody Garnett wrote:
>> Farrukh Najmi wrote:
>>> Thanks Jody for the very helpful response.
>> No worries; now if you can tell me where to put that information in 
>> the user guide for the next person we will be ahead of the game :-) 
>> Where would you look ...
>
> It should probably be under Chapter 03 JTS Topology Suite perhaps 
> under a page titled "Relationship Between JTS Coordinate System and 
> Geotools CoordinateReferenceSystem" or some such.
>
> In http://docs.codehaus.org/display/GEOTDOC/01+How+to+Create+a+Geometry
> it should be clarified that SRID has no signficance when creating a 
> GeometryFactory.
> Otherwise it seems as if the GeometryFactory uses specified SRID and 
> corresponding CRS
> for its create operations.
>
>>> 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?
>> Just so; there is a JTS utility class here to help you reproject your 
>> JTS Geometry into the CoordinateReferneceSystem of your choice.
>> - http://docs.codehaus.org/display/GEOTDOC/02+JTS+Utility+Class
> What CRS does geotools use internally to normalize all geometry 
> instances before storing?
It does not; that is up to you the developer. It blindly stores the data 
in JTS Geometry objects (where the only concern is the "shape"); the 
Feature holding the data keeps track of the CoordinateReferneceSystem 
(ie what the data means). This is just the same as the difference 
between the number 1 and the meaning being held by a Unit (ie 1 meter vs 
1 foot).

GeoTools uses both pieces of information to figure out "where" a feature 
is, only relying on a transform to "reproject" the geometry when needed 
(say if you are going to reproject some data for display in a different 
projection).

So there is no need to go to a common format; leave the data alone and 
manipulate it into the shape you need *just* when you need it.
>>> 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.
>> JTS does the mathematical "topology part"; see this page: 
>> http://docs.codehaus.org/display/GEOTDOC/Point+Set+Theory+and+the+DE-9IM+Matrix
>>  
>>
>> GeoTools does the mathematical "referencing part", and the features, 
>> and the rendering and the xml and the database access and the .... 
>> well we try and get the job done.
> Sounds like a good division of labor :-)
>
> Thanks for bearing with me my many perhaps basic questions.
No it is good; I need dialog like this for the user guide - it all fuels 
the fire.
Jody


-------------------------------------------------------------------------
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