Fwd: [MetaCRS] Opportunity for Sharing: Regional ESPG Code Lists
Martin Desruisseaux
martin.desruisseaux at geomatys.fr
Tue Jul 8 10:45:12 EDT 2008
Sunburned Surveyor a écrit :
> Can you provide a regional filter on the JComboBox for EPSG codes in GeoTools?
Yes. I don't remember if it is implemented right now, but if it is not it would
not be difficult to do so, since all GeoTools CRS object created from an EPSG
database have this information.
> I know the relationship between EPSG codes and user friendly CRS names
> is stored in the EPSG database, I was only thinking it might be easier
> to access in a small file outside of the database.
This is an implementor issue. For users, it is the same - there is just one
method to invoke and he get the name. As an implementor, I find more convenient
to rely on the names stored in the database (rather than a separated text file)
because:
* We have the connection to the database anyway (for creating CRS),
so it is easier to use that existing connection than opening an
additional external resource.
* It avoid the maintenance cost of updating an external list every
time the EPSG database is updated.
* If user adds new CRS, he has only one data source to update.
> Martin wrote: "The database has a "Domain of validity" information as
> a geographic bounding box. GeoTools among other parses and can use
> this information."
>
> I didn't know that. This information could be very helpful. I'll hop
> over to the GeoTools mailing list so you can tell me what classes do
> this.
ISO 19111 defines this method:
http://geoapi.sourceforge.net/snapshot/javadoc/org/opengis/referencing/ReferenceSystem.html#getDomainOfValidity()
which returns the information in the form of an ISO 19115 Extent. The later is
relatively sophesticated, so as a convenience for the user GeoTools provides
also this method, which returns the same information in the form of an
GeographicBoundingBox (again from ISO 19115), which is usable in a more direct way:
http://javadoc.geotools.fr/snapshot/org/geotools/referencing/CRS.html#getGeographicBoundingBox(org.opengis.referencing.crs.CoordinateReferenceSystem)
GeoTools parses the information provided in the EPSG database and make this
information available through the above-mentioned methods.
> So I guess if we are all tapping the EPSG database directly that there
> is no need to set up CRS lists for different regions of the globe...
Yes this is my opinion.
Regards,
Martin
More information about the MetaCRS
mailing list