P.Rizzi Ag.Mobilità Ambiente a écrit :
In fact I looked into the GeoTools code and find no easy way of getting the
SRID from a CoordinateReferenceSystem. Sadly this is something that happens
often with GeoTools...

I wrote a utility class to get the SRID from a CoordinateReferenceSystem,
but I'm not sure if the way I did it is the best one, neither I know if
there're better ways.

An utility class will probably be helpfull (we will have to decide where to put it). But one issue to solve first is: what SRID is exactly? It is just an integer, and unfortunatly the integer meaning depends on the authority. EPSG has its own set of numerical codes; an other authority will have a different set of numerical codes. Unfortunatly there is no way (as far as I know) to determine which authority a 'getSRID()' method use.

A possible approach is to decide that the integer returned by 'getSRID()' is always a code from the EPSG authority factory. But we would have to make this assumption very clear in our documentation. In such case, the utilities program would have to be a little bit more elaborated in order to search specifically for the EPSG authority (to make things worst, EPSG CRS have both a textual and a numerical identifier). A volunter for writting this utility, since I'm now used to write this kind of code. We just have to decide if the above-cited assumption is acceptable, and where to put the utility (probably in org.geotools.referencing.crs.CRS?).

        Martin.


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to