public enum Convention extends Enum<Convention>
PRIMEM[…]
and PARAMETER[…]
elements:
WKT1_COMMON_UNITS
enumeration allows parsing and formatting using the older interpretation.WKTFormat.getConvention()
,
WKTFormat.setConvention(Convention)
Defined in the sis-metadata
module
Enum Constant and Description |
---|
INTERNAL
A special convention for formatting objects as stored internally by Apache SIS.
|
WKT1
The OGC 01-009 format, also known as “WKT 1”.
|
WKT1_COMMON_UNITS
The Simple Feature format, also known as “WKT 1”.
|
WKT2
The ISO 19162 format, also known as “WKT 2”.
|
WKT2_SIMPLIFIED
The ISO 19162 format with omission of some optional elements.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isSimplified()
Returns
true if this convention is one of the simplified variants of WKT. |
int |
majorVersion()
Returns the major version of the Well Known Text represented by 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.
|
public static final Convention WKT2
Axis
element omits the Order
sub-element.Order
element is optional, the WKT is still valid.
Unless otherwise specified by WKTFormat.setNameAuthority(Citation)
, projections
and parameters formatted with this convention will use the EPSG
names when available.
This is the default convention used by FormattableObject.toWKT()
and for new WKTFormat
instances.
public static final Convention WKT2_SIMPLIFIED
WKT2
convention except for the following aspects:
VerticalExtent
element omits the LengthUnit
sub-element
if the unit is SI.METRE
.Ellipsoid
element omits the LengthUnit
sub-element
if the unit is SI.METRE
.PrimeMeridian
element omits the AngleUnit
sub-element
if the unit is as defined by the enclosing GeodeticCRS
element.AngleUnit
, LengthUnit
, ScaleUnit
, ParametricUnit
and TimeUnit
are formatted as plain Unit
elements.Id
is formatted only for the root element
(omit parameters and operation methods Id
).This is the default convention used by FormattableObject.toString()
.
public static final Convention WKT1
Unless otherwise specified by WKTFormat.setNameAuthority(Citation)
, projections
and parameters formatted with this convention will use the OGC
names when available.
GeocentricCRS
, WKT 1 uses a legacy set of Cartesian axes which were
defined in OGC 01-009. Those axes use the Other, Easting and Northing
axis directions instead than the geocentric ones,
as shown in the following table:
ISO 19111 | OGC 01-009 | Description |
---|---|---|
Geocentric X | Other | Toward prime meridian |
Geocentric Y | Easting | Toward 90°E longitude |
Geocentric Z | Northing | Toward north pole |
public static final Convention WKT1_COMMON_UNITS
This convention is identical to WKT1
except for the following aspects:
PRIMEM
and PARAMETER
elements are always degrees,
no matter the units of the enclosing GEOGCS
element.@Debug public static final Convention INTERNAL
WKT2_SIMPLIFIED
convention,
with the following differences:
CompoundCRS
shows nested compound CRS if any (the structure is not flattened).Id
elements are formatted for child elements in addition to the root one.Id
element omits the URI
sub-element if the later is derived by Apache SIS
from the Id
properties.Remarks
element is formatted for all
identified objects,
not only CRS or coordinate operations.ImageDatum
includes the Pixel in Cell code.TemporalDatum
includes the Origin date.public static Convention[] values()
for (Convention c : Convention.values()) System.out.println(c);
public static Convention valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int majorVersion()
public boolean isSimplified()
true
if this convention is one of the simplified variants of WKT.
The simplifications are documented in the WKT2_SIMPLIFIED
javadoc.
This methods consider version 1 of WKT as a “simplified” convention, since this version was indeed simpler than version 2.
true
it this convention uses a simplified variant of WKT.Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.