Class EPSGDataAccess

All Implemented Interfaces:
Auto­Closeable, Localized, Authority­Factory, CRSAuthority­Factory, CSAuthority­Factory, Datum­Authority­Factory, Coordinate­Operation­Authority­Factory, Factory

Data Access Object (DAO) creating geodetic objects from a JDBC connection to an EPSG database. The EPSG database is freely available at Current version of this class requires EPSG database version 6.6 or above.

Object identifier (code or name)

EPSG codes are numerical identifiers. For example code 3395 stands for "WGS 84 / World Mercator". Coordinate Reference Objects are normally created from their numerical codes, but this factory accepts also names. For example create­Projected­CRS("3395") and create­Projected­CRS("WGS 84 / World Mercator") both fetch the same object. However, names may be ambiguous since the same name may be used for more than one object. This is the case of "WGS 84" for instance. If such an ambiguity is found, an exception will be thrown.

Life cycle and caching

EPSGData­Access instances should be short-lived since they may hold a significant amount of JDBC resources. EPSGData­Access instances are created on the fly by EPSGFactory and closed after a relatively short timeout. In addition EPSGFactory caches the most recently created objects, which reduce greatly the amount of EPSGData­Access instantiations (and consequently the amount of database accesses) in the common case where only a few EPSG codes are used by an application. EPSGData­Access​.create­Foo(String) methods do not cache by themselves and query the database on every invocation.

SQL dialects

Because the primary distribution format for the EPSG dataset is MS-Access, this class uses SQL statements formatted for the MS-Access dialect. For usage with other database software products like PostgreSQL or Derby, a SQLTranslator instance is provided to the constructor.
See Also:

Defined in the sis-referencing module