org.geotools.cs
Class CoordinateSystemModifiedEPSGFactory
java.lang.Object
org.geotools.cs.CoordinateSystemAuthorityFactory
org.geotools.cs.CoordinateSystemEPSGFactory
org.geotools.cs.CoordinateSystemModifiedEPSGFactory
- Direct Known Subclasses:
- CoordinateSystemOracleEPSGFactory
Deprecated. Replaced by FactoryUsingAnsiSQL
.
- public class CoordinateSystemModifiedEPSGFactory
- extends CoordinateSystemEPSGFactory
An EPSG factory which replaces some table or column names by other names.
This factory is used for EPSG database backed by an other software than
MS-Access.
This class overrides adaptSQL(java.lang.String)
to change the SQL statements so they
are suitable for non-ms access versions of EPSG databases (version 6.4).
By default, the new SQL statements use the new table and field names in
the Data Description Language (DDL) scripts provided in version 6.4 to
create the schema for the database. Subclasses can changes this default
behavior by modifying the map
.
In order to register this ANSI version as the default
EPSG factory, invokes the following only once from the command line.
The change will by system-wide:
java org.geotools.cs.CoordinateSystemEPSGFactory -implementation=org.geotools.cs.CoordinateSystemModifiedEPSGFactory
References:
- EPSG geodecy parameters database version 6.4 readme at
www.epsg.org
- Version:
- $Id: CoordinateSystemModifiedEPSGFactory.java 13813 2005-05-26 01:01:13Z desruisseaux $
- Author:
- Rueben Schulz, Martin Desruisseaux
Field Summary |
protected java.util.Map |
map
Deprecated. Maps the MS-Access names to ANSI names. |
Method Summary |
protected java.lang.String |
adaptSQL(java.lang.String statement)
Deprecated. Modifies the given SQL string to be suitable for non-ms access databases.
|
Methods inherited from class org.geotools.cs.CoordinateSystemEPSGFactory |
createCompoundCoordinateSystem, createCoordinateSystem, createDatum, createEllipsoid, createGeographicCoordinateSystem, createObject, createPrimeMeridian, createProjectedCoordinateSystem, createUnit, createVerticalCoordinateSystem, dispose, getAuthority, getDefault, main, replaceAxisUnit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
map
protected final java.util.Map map
- Deprecated.
- Maps the MS-Access names to ANSI names. Key are MS-Access names including bracket.
Values are ANSI names. Keys and values are case-sensitive. The default content of
this map is:
MS-Access name | ANSI name |
[Area] | epsg_area |
[Coordinate Axis] | epsg_coordinateaxis |
[Coordinate Axis Name] | epsg_coordinateaxisname |
[Coordinate_Operation] | epsg_coordoperation |
[Coordinate_Operation Method] | epsg_coordoperationmethod |
[Coordinate_Operation Parameter] | epsg_coordoperationparam |
[Coordinate_Operation Parameter Usage] | epsg_coordoperationparamusage |
[Coordinate_Operation Parameter Value] | epsg_coordoperationparamvalue |
[Coordinate Reference System] | epsg_coordinatereferencesystem |
[Coordinate System] | epsg_coordinatesystem |
[Datum] | epsg_datum |
[Ellipsoid] | epsg_ellipsoid |
[Prime Meridian] | epsg_primemeridian |
[Unit of Measure] | epsg_unitofmeasure |
[ORDER] | coord_axis_order |
Subclasses can modify this map in their constructor in order to provide a different
mapping.
CoordinateSystemModifiedEPSGFactory
public CoordinateSystemModifiedEPSGFactory(CoordinateSystemFactory factory,
java.sql.Connection connection)
- Deprecated.
- Construct an authority factory using
the specified connection.
- Parameters:
factory
- The underlying factory used for objects creation.connection
- The connection to the underlying EPSG database.
CoordinateSystemModifiedEPSGFactory
public CoordinateSystemModifiedEPSGFactory(CoordinateSystemFactory factory,
java.lang.String url,
java.lang.String driver)
throws java.sql.SQLException
- Deprecated.
- Construct an authority factory using
the specified URL to an EPSG database.
- Parameters:
factory
- The underlying factory used for objects creation.url
- The url to the EPSG database. For example, a connection
to postgresql may have an URL like
"jdbc:postgresql://localhost/epsg?user=<user>&pass=<password>"
.driver
- An optional driver to load, or null
if none.
This is a convenience argument for the following pseudo-code:
Class.forName(driver).newInstance();
A message is logged to "org.geotools.cts"
stating if
the loading succeeded of failed. For postgresql, a typical value
for this argument is "org.postgresql.Driver"
.
This argument needs to be non-null only once for a specific driver.
- Throws:
java.sql.SQLException
- if the constructor failed to connect to the EPSG database.
adaptSQL
protected java.lang.String adaptSQL(java.lang.String statement)
- Deprecated.
- Modifies the given SQL string to be suitable for non-ms access databases.
This replaces table and field names in the SQL with the new names
in the SQL DDL scripts provided with version 6.4 of the EPSG database.
- Overrides:
adaptSQL
in class CoordinateSystemEPSGFactory
- Parameters:
statement
- The statement in MS-Access syntax.
- Returns:
- The SQL statement to use, suitable for a non-ms access database.
Copyright © GeoTools. All Rights Reserved.