Farrukh Najmi wrote:
> Dear colleagues,
>
> Looking at geotools GML code its not clear to me how it uses the srid 
> and userData fields of the com.vividsolutions.jts.geom.Geometry class.
>   
Which GML code did are you looking at specifically?
- SAX parser? I think it sets the srsName to the userData object
- DOM parser?
- XDO parser?
- XSD-XML parser?

In general I don't know what these parsers do for a JTS Geometry object; 
because the CRS information is stored at the Feature level in GeoTools 
right now (there is no set convention for how to handle JTS Geometry 
srid name and userData object; because that convention would be for a 
specific application.)
> What are these fields set to when a JTS Geometry is stored after being 
> mapped from a GML geomtery?
>   
GML Geometry comes back as a JTS Geometry with the correct coordinates
> What are these fields set to when a JTS Geometry is read back before being 
> converted to a GML Geometry?
>
> Specifically:
>
> Does the persistent JTS Geomtery object's always have srid defined?
>   
no it does not.
> Is there a userObject always specified to stored the srsName?
>   
no it does not.
> Does the srid and srsName refer to the CRS used by GML representation?
>   
The GML specification only talks about srsName; we have chosen to 
convert this information into a CoordinateReferenceSystem and hold it as 
part of the FeatureType information.
> Why do we need need to store both srid and srsName?
>   
We don't need to store either.
> Thanks for any guidance.
>   
I am sorry this is such a muddle for your; JTS Geometry is defined by 
the Simple Feature for SQL specification and does not really line up 
with GML in any way (literally they are a different model at a very 
technical level; JTS has LineStrings, GML has Curves made up of 
LineStrings). We are faking this mapping for you because JTS is 
available now and works - some information (like GML srsName) is lost 
along the way.

Now if you would like the srsName to be saved as the userData object by 
each and every parser; that may be a good idea - and we can take it up 
with the developers list.

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
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to