org.geotoolkit.io.wkt
Enum Convention

Object
  extended by Enum<Convention>
      extended by Convention
All Implemented Interfaces:
Serializable, Comparable<Convention>

public enum Convention
extends Enum<Convention>

The convention used for WKT formatting. This enumeration exists as an attempt to address some of the problems documented in the Frank Warmerdam's OGC WKT Coordinate System Issues page.

The various conventions differ mostly in parameter names, and sometime in WKT syntax. For example the Mercator projection has a parameter named "Longitude of natural origin" by EPSG, "central_meridian" by OGC and "NatOriginLong" by GEOTIFF. In addition the unit of the prime meridian shall be the angular unit of the enclosing geographic CRS according the OGC standard, but is restricted to decimal degrees by ESRI. Other differences are documented in the javadoc of each enum value.

Since:
3.20
Version:
3.20
Author:
Martin Desruisseaux (Geomatys)
See Also:
WKTFormat.getConvention(), WKTFormat.setConvention(Convention)
Module:
referencing/geotk-referencing (download)    View source code for this class

Enum Constant Summary
EPSG
          The European Petroleum Survey Group convention.
ESRI
          The ESRI convention.
GEOTIFF
          The GeoTIFF convention.
INTERNAL
          A special convention for formatting objects as stored internally by Geotk.
NETCDF
          The NetCDF convention.
OGC
          The Open Geospatial consortium convention.
ORACLE
          The Oracle convention.
PROJ4
          The Proj.4 convention.
 
Field Summary
 Unit<Angle> forcedAngularUnit
          If non-null, forces PRIMEM and PARAMETER angular units to this field value instead than inferring it from the context.
 
Method Summary
static Convention forCitation(Citation citation, Convention defaultConvention)
          Returns the convention for the given citation.
static Convention forIdentifier(String identifier, Convention defaultConvention)
          Returns the convention for the given identifier.
 Citation getCitation()
          Returns the citation for this enumeration.
 CoordinateSystem toConformCS(CoordinateSystem cs)
          Makes the given coordinate system conform to this convention.
static Convention valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Convention[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

OGC

public static final Convention OGC
The Open Geospatial consortium convention. This is the default convention for all WKT formatting in the Geotk library.


Spacial case
For GeocentricCRS, this convention uses the legacy set of Cartesian axes. Those axes were defined in OGC 01-009 as Other, Easting and Northing in metres, where the "Other" axis is toward prime meridian.

See Also:
Citations.OGC, toConformCS(CoordinateSystem)

EPSG

public static final Convention EPSG
The European Petroleum Survey Group convention. This convention uses the most descriptive parameter and projection names.


Spacial case
For GeocentricCRS, this convention uses the new set of Cartesian axes. Those axes are defined in ISO 19111 as Geocentric X, Geocentric Y and Geocentric Z in metres.

See Also:
Citations.EPSG, toConformCS(CoordinateSystem)

ESRI

public static final Convention ESRI
The ESRI convention. This convention is similar to the OGC convention except in four aspects:

See Also:
Citations.ESRI

ORACLE

public static final Convention ORACLE
The Oracle convention. This convention is similar to the OGC convention except in three aspects:

See Also:
Citations.ORACLE

NETCDF

public static final Convention NETCDF
The NetCDF convention. This convention is similar to the OGC convention except for parameter and projection names.

See Also:
Citations.NETCDF

GEOTIFF

public static final Convention GEOTIFF
The GeoTIFF convention. This convention is similar to the OGC convention except for parameter and projection names.

See Also:
Citations.GEOTIFF

PROJ4

public static final Convention PROJ4
The Proj.4 convention. This convention uses very short parameter and projection names. Other differences are:

See Also:
Citations.PROJ4

INTERNAL

@Debug
public static final Convention INTERNAL
A special convention for formatting objects as stored internally by Geotk. In the majority of cases, the result will be identical to the one we would get using the OGC convention. However in the particular case of map projections, the result may be quite different because of the way Geotk separates the linear from the non-linear parameters.

This convention is used only for debugging purpose.

See Also:
Formatter#isInternalWKT()
Field Detail

forcedAngularUnit

public final Unit<Angle> forcedAngularUnit
If non-null, forces PRIMEM and PARAMETER angular units to this field value instead than inferring it from the context. The standard value is null, which mean that the angular units are inferred from the context as required by the WKT specification.

See Also:
ReferencingParser.getForcedAngularUnit()
Method Detail

values

public static Convention[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Convention c : Convention.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Convention valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getCitation

public Citation getCitation()
Returns the citation for this enumeration. This method returns the Citations constant of the same name than this enum.

Returns:
The citation for this enum.
See Also:
WKTFormat.getAuthority()

forCitation

public static Convention forCitation(Citation citation,
                                     Convention defaultConvention)
Returns the convention for the given citation.

Parameters:
citation - The citation for which to get the convention, or null.
defaultConvention - The default convention to return if none where found for the given citation. May be null.
Returns:
The convention, or null if no matching convention were found and the defaultConvention argument is null.

forIdentifier

public static Convention forIdentifier(String identifier,
                                       Convention defaultConvention)
Returns the convention for the given identifier.

Parameters:
identifier - The identifier for which to get the convention, or null.
defaultConvention - The default convention to return if none where found for the given identifier. May be null.
Returns:
The convention, or null if no matching convention were found and the defaultConvention argument is null.

toConformCS

public CoordinateSystem toConformCS(CoordinateSystem cs)
Makes the given coordinate system conform to this convention. This method is used mostly for converting between the legacy (OGC 01-009) GeocentricCRS axis directions, and the new (ISO 19111) directions. Those directions are:

Parameters:
cs - The coordinate system.
Returns:
A coordinate system equivalent to the given one but with conform axis names, or the given cs if no change apply to the given coordinate system.
See Also:
OGC, EPSG


Copyright © 2009-2013 Geotoolkit.org. All Rights Reserved.