忐忑的铁板烧 · CRS (Geotools modules ...· 17 小时前 · |
高大的烤红薯 · 温州市配建政策性住房实施办法公开征求意见 ...· 2 月前 · |
爱玩的馒头 · 视频如何防止被盗/被下载_java ...· 3 月前 · |
千年单身的佛珠 · [转载]张译微博风波_如影随形1681_新浪博客· 4 月前 · |
旅行中的葡萄 · 共创开放、包容、共赢的合作创新之路--国际- ...· 4 月前 · |
性感的大象 · old.emacs.d/site-lisp/ ...· 5 月前 · |
public final class CRS extends Object
ReferencingFactoryFinder
.
The following methods may be added in a future version:
CoordinateReferenceSystem parseXML(String)
When using
CoordinateReferenceSystem
matching methods of this class (
equalsIgnoreMetadata(Object, Object)
,
lookupIdentifier(IdentifiedObject, boolean)
,
lookupEpsgCode(CoordinateReferenceSystem, boolean)
,
lookupIdentifier(IdentifiedObject, boolean)
,
lookupIdentifier(Citation,
CoordinateReferenceSystem, boolean)
) against objects derived from a database other than the
official EPSG one it may be advisable to set a non zero comparison tolerance with
Hints.putSystemDefault(java.awt.RenderingHints.Key, Object)
using the
Hints.COMPARISON_TOLERANCE
key. A value of 10e-9 has proved to give satisfactory results with
definitions commonly found in .prj files accompaining shapefiles and georeferenced images.
Warning
: the tolerance value is used in all internal comparison, this will also change the
way math transforms are setup. Use with care.
static boolean
equalsIgnoreMetadata
(
Object
object1,
Object
object2)
static
MathTransform
findMathTransform
(
CoordinateReferenceSystem
sourceCRS,
CoordinateReferenceSystem
targetCRS)
static
MathTransform
findMathTransform
(
CoordinateReferenceSystem
sourceCRS,
CoordinateReferenceSystem
targetCRS,
boolean lenient)
static
MathTransform
findMathTransform
(
CoordinateReferenceSystem
sourceCRS,
CoordinateReferenceSystem
targetCRS,
String
transformCode)
static
CRSAuthorityFactory
getAuthorityFactory
(boolean longitudeFirst)
decode
methods.
static
CRS.AxisOrder
getAxisOrder
(
CoordinateReferenceSystem
crs)
static
CRS.AxisOrder
getAxisOrder
(
CoordinateReferenceSystem
crs,
boolean useBaseGeoCRS)
static
CoordinateOperationFactory
getCoordinateOperationFactory
(boolean lenient)
findMathTransform
convenience methods.
static
Ellipsoid
getEllipsoid
(
CoordinateReferenceSystem
crs)
null
if there
is none.
static
Bounds
getEnvelope
(
CoordinateReferenceSystem
crs)
null
if unknown.
static
GeographicBoundingBox
getGeographicBoundingBox
(
CoordinateReferenceSystem
crs)
null
if unknown.
static
SingleCRS
getHorizontalCRS
(
CoordinateReferenceSystem
crs)
null
if there is none.
static
MapProjection
getMapProjection
(
CoordinateReferenceSystem
crs)
MapProjection
driving the specified crs, or
null
if none could be
found.
static
ProjectedCRS
getProjectedCRS
(
CoordinateReferenceSystem
crs)
null
if there is none.
static
Set
<
String
>
getSupportedAuthorities
(boolean returnAliases)
static
Set
<
String
>
getSupportedCodes
(
String
authority)
static
TemporalCRS
getTemporalCRS
(
CoordinateReferenceSystem
crs)
null
if there is none.
static
Map
<
String
,
AbstractCoordinateOperation
>
getTransforms
(
CoordinateReferenceSystem
sourceCRS,
CoordinateReferenceSystem
targetCRS)
DefaultConcatenatedOperation
from sourceCRS to targetCRS
static
Version
getVersion
(
String
authority)
null
if not
available.
static
VerticalCRS
getVerticalCRS
(
CoordinateReferenceSystem
crs)
null
if there is none.
static boolean
isCompatible
(
CoordinateReferenceSystem
sourceCrs,
CoordinateReferenceSystem
targetCrs,
boolean allowDifferentDimension)
static boolean
isEquivalent
(
CoordinateReferenceSystem
source,
CoordinateReferenceSystem
target)
static boolean
isTransformationRequired
(
CoordinateReferenceSystem
source,
CoordinateReferenceSystem
target)
static
Integer
lookupEpsgCode
(
CoordinateReferenceSystem
crs,
boolean fullScan)
static
String
lookupIdentifier
(
Citation
authority,
CoordinateReferenceSystem
crs,
boolean fullScan)
static
String
lookupIdentifier
(
IdentifiedObject
object,
boolean fullScan)
static void
main
(
String
... args)
static
CoordinateReferenceSystem
parseWKT
(
String
wkt)
static void
reset
(
String
aspects)
static
String
toSRS
(
CoordinateReferenceSystem
crs)
null
if none.
static
String
toSRS
(
CoordinateReferenceSystem
crs,
boolean codeOnly)
null
if none.
static
GeneralBounds
transform
(
Bounds
envelope,
CoordinateReferenceSystem
targetCRS)
static
Rectangle2D
transform
(
CoordinateOperation
operation,
Rectangle2D
envelope,
Rectangle2D
destination)
static
GeneralBounds
transform
(
CoordinateOperation
operation,
Bounds
envelope)
static
Rectangle2D
transform
(
MathTransform2D
transform,
Rectangle2D
rectangle)
static
Rectangle2D
transform
(
MathTransform2D
transform,
Rectangle2D
envelope,
Rectangle2D
destination)
static
GeneralBounds
transform
(
MathTransform
transform,
Bounds
envelope)
public static CRSAuthorityFactory getAuthorityFactory(boolean longitudeFirst) throws FactoryRegistryException
decode
methods.
This factory is
buffered
, scans over
all
factories
and uses additional factories as
fallbacks
if there is more than
one
registered factory
for the
same authority.
This factory can be used as a kind of
system-wide
factory for all
authorities. However for more determinist behavior, consider using a more specific factory
(as returned by
ReferencingFactoryFinder.getCRSAuthorityFactory(java.lang.String, org.geotools.util.factory.Hints)
when the authority in
known.
longitudeFirst
-
true
if axis order should be forced to
(
longitude
,
latitude
). Note that
false
means "
use
default
",
not
"
latitude first
".
FactoryRegistryException
- if the factory can't be created.
public static boolean isCompatible(CoordinateReferenceSystem sourceCrs, CoordinateReferenceSystem targetCrs, boolean allowDifferentDimension)
sourceCrs
- the source CRS
targetCrs
- the target CRS
allowDifferentDimension
- if true, returns false if CRS's have different dimensions
regardless of the ability to transform.
public static CoordinateOperationFactory getCoordinateOperationFactory(boolean lenient)
findMathTransform
convenience methods.
lenient
-
true
if the coordinate operations should be created even when there is
no information available for a datum shift.
public static Version getVersion(String authority) throws FactoryRegistryException
null
if not
available.
authority
- The authority name (typically
"EPSG"
).
null
if unknown.
FactoryRegistryException
- if no
CRSAuthorityFactory
implementation was found
for the specified authority.
public static Set<String> getSupportedCodes(String authority)
getSupportedCodes("EPSG")
may returns
"EPSG:2000"
,
"EPSG:2001"
,
"EPSG:2002"
,
etc
. It may also returns
"2000"
,
"2001"
,
"2002"
,
etc.
without the
"EPSG:"
prefix. Whatever the authority name is
prefixed or not is factory implementation dependent.
If there is more than one factory for the given authority, then this method merges the code set of all of them. If a factory fails to provide a set of supported code, then this particular factory is ignored. Please be aware of the following potential issues:
"4326"
and
"EPSG:4326"
), then the returned set will contain a lot of synonymous codes.
decode
(c)
will use the same authority factory than the one
that formatted
c
.
FactoryException
s are logged as warnings and otherwise ignored.
If a more determinist behavior is wanted, consider the code below instead. The following
code exploit only one factory, the "preferred" one.
CRSAuthorityFactory
factory = FactoryFinder.
getCRSAuthorityFactory
(authority, null);
Set<String> codes = factory.
getAuthorityCodes
(CoordinateReferenceSystem.class);
String code =
...choose a code here...
CoordinateReferenceSystem
crs = factory.createCoordinateReferenceSystem(code);
public static Set<String> getSupportedAuthorities(boolean returnAliases)
returnAliases
- If
true
, the set will contain all identifiers for each
authority. If
false
, only the first one
public static CoordinateReferenceSystem decode(String code) throws NoSuchAuthorityCodeException, FactoryException
CRS objects created by previous calls to this method are cached in a buffer using weak references . Subsequent calls to this method with the same authority code should be fast, unless the CRS object has been garbage collected.
code
- The Coordinate Reference System authority code.
NoSuchAuthorityCodeException
- If the code could not be understood.
FactoryException
- if the CRS creation failed for an other reason.
getSupportedCodes(java.lang.String)
,
AuthorityFactoryAdapter.createCoordinateReferenceSystem(java.lang.String)
public static CoordinateReferenceSystem decode(String code, boolean longitudeFirst) throws NoSuchAuthorityCodeException, FactoryException
code
argument value is parsed as in
"
decode
(code)
". The
longitudeFirst
argument
value controls the hints to be given to the
factory
finder
as in the following pseudo-code:
if (longitudeFirst) {
hints.put(
Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER
,
Boolean.TRUE
);
} else {
// Do not set the FORCE_LONGITUDE_FIRST_AXIS_ORDER hint to FALSE.
// Left it unset, which means "use system default".
All coordinate reference systems are forced to (
longitude
,
latitude
) axis order.
false
Coordinate reference systems may or may not be forced to (
longitude
,
latitude
) axis order. The behavior depends on
user setting, for example the value of the
"org.geotools.referencing.forceXY"
system property.
FALSE
Forcing (
longitude
,
latitude
) axis order is not allowed, no matter the value of the
"org.geotools.referencing.forceXY"
system property.
code
- The Coordinate Reference System authority code.
longitudeFirst
-
true
if axis order should be forced to (
longitude
,
latitude
). Note that
false
means "
use default
",
not
"
latitude first
".
NoSuchAuthorityCodeException
- If the code could not be understood.
FactoryException
- if the CRS creation failed for an other reason.
getSupportedCodes(java.lang.String)
,
Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER
public static CoordinateReferenceSystem parseWKT(String wkt) throws FactoryException
public static Bounds getEnvelope(CoordinateReferenceSystem crs)
null
if unknown.
This method fetchs the domain of validity associated with the given CRS. geographic bounding boxes are used as a fallback.
The returned envelope is expressed in terms of the specified CRS.
crs
- The coordinate reference system, or
null
.
null
if none.
getGeographicBoundingBox(org.geotools.api.referencing.crs.CoordinateReferenceSystem)
,
GeneralBounds.normalize(boolean)
public static GeographicBoundingBox getGeographicBoundingBox(CoordinateReferenceSystem crs)
null
if unknown.
This method fetchs the domain of validity associated with the given CRS. Only geographic extents of kind geographic bounding box are taken in account.
crs
- The coordinate reference system, or
null
.
null
if none.
getEnvelope(org.geotools.api.referencing.crs.CoordinateReferenceSystem)
public static SingleCRS getHorizontalCRS(CoordinateReferenceSystem crs)
null
if there is none. A horizontal CRS is usually a two-dimensional
geographic
or
projected
CRS.
crs
- The coordinate reference system, or
null
.
null
if none.
public static ProjectedCRS getProjectedCRS(CoordinateReferenceSystem crs)
null
if there is none.
crs
- The coordinate reference system, or
null
.
null
if none.
public static MapProjection getMapProjection(CoordinateReferenceSystem crs)
MapProjection
driving the specified crs, or
null
if none could be
found.
crs
- The coordinate reference system, or
null
.
MapProjection
, or
null
if none.
public static VerticalCRS getVerticalCRS(CoordinateReferenceSystem crs)
null
if there is none.
crs
- The coordinate reference system, or
null
.
null
if none.
public static TemporalCRS getTemporalCRS(CoordinateReferenceSystem crs)
null
if there is none.
crs
- The coordinate reference system, or
null
.
null
if none.
public static Ellipsoid getEllipsoid(CoordinateReferenceSystem crs)
null
if there
is none.
crs
- The coordinate reference system, or
null
.
null
if none.
public static boolean equalsIgnoreMetadata(Object object1, Object object2)
AbstractIdentifiedObject
, then this method will ignore the metadata during the
comparison.
object1
- The first object to compare (may be null).
object2
- The second object to compare (may be null).
true
if both objects are equals.
public static boolean isTransformationRequired(CoordinateReferenceSystem source, CoordinateReferenceSystem target) throws FactoryException
DefaultEngineeringCRS.isWildcard()
equalsIgnoreMetadata(Object, Object)
source
- The source
CoordinateReferenceSystem
target
- the target
CoordinateReferenceSystem
FactoryException
public static boolean isEquivalent(CoordinateReferenceSystem source, CoordinateReferenceSystem target)
source
- The source
CoordinateReferenceSystem
target
- the target
CoordinateReferenceSystem
public static String toSRS(CoordinateReferenceSystem crs)
null
if none. OGC
Web Services have the concept of a Spatial Reference System identifier used to communicate
CRS information between systems.
Spatial Reference System (ie SRS) values:
EPSG:4326
- this is the usual format understood to mean
forceXY
order prior to WMS 1.3.0. Note that the axis order is
not necessarly
(
longitude
,
latitude
), but this is the common behavior we observe
in practice.
AUTO:43200
-
CRS:84
- similar to
DefaultGeographicCRS.WGS84
(formally defined by
CRSAuthorityFactory)
ogc:uri:.....
- understood to match the EPSG database axis order.
crs
- The coordinate reference system, or
null
.
null
.
public static String toSRS(CoordinateReferenceSystem crs, boolean codeOnly)
null
if none.
Some older web services are unable to deal with the full ogc:uri syntax, set simple to true for force a very simple representation that is just based on the code portion.
codeOnly
- Set to true to force generation of a simple srsName using only the code
portion
public static String lookupIdentifier(IdentifiedObject object, boolean fullScan) throws FactoryException
null
.
This convenience method delegates its work to
IdentifiedObjectFinder
. Consider
using the later if more control are wanted, for example if the search shall be performed only
on some
authority factories
instead of all registered onez, or
if the full
identified object
is wanted instead of only its
identifier.
object
- The object (usually a
coordinate
reference system
) looked up.
fullScan
- If
true
, an exhaustive full scan against all registered objects will
be performed (may be slow). Otherwise only a fast lookup based on embedded identifiers
and names will be performed.
null
if not found.
FactoryException
- if an unexpected failure occured during the search.
AbstractAuthorityFactory.getIdentifiedObjectFinder(java.lang.Class<? extends org.geotools.api.referencing.IdentifiedObject>)
,
IdentifiedObjectFinder.find(org.geotools.api.referencing.IdentifiedObject)
public static String lookupIdentifier(Citation authority, CoordinateReferenceSystem crs, boolean fullScan) throws FactoryException
lookupIdentifier
(object,
fullScan)
except that the search is performed only among the factories of the given
authority.
If the CRS does not have an identifier which corresponds to the EPSG authority, then:
fullScan
is
true
, then this method scans the factories in search for
an object
equals, ignoring metadata
, to the given
object. If one is found, its identifier is returned.
fullScan
is
false
or if no identifier was found in the
previous step), this method returns
null
.
authority
- The authority for the code to search.
crs
- The coordinate reference system instance, or
null
.
null
if none was found.
FactoryException
- if an error occured while searching for the identifier.
public static Integer lookupEpsgCode(CoordinateReferenceSystem crs, boolean fullScan) throws FactoryException
lookupIdentifier(
Citations.EPSG
, crs, fullScan)
except that code is parsed as an integer.
crs
- The coordinate reference system instance, or
null
.
null
if none was found.
FactoryException
- if an error occured while searching for the identifier.
public static MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS) throws FactoryException
FactoryFinder.
getCoordinateOperationFactory
(null).
createOperation
(sourceCRS, targetCRS).
getMathTransform
();
Note that some metadata like positional
accuracy are lost by this method. If those metadata are wanted, use the
coordinate operation factory
directly.
Sample use: MathTransform transform = CRS.findMathTransform( CRS. decode ("EPSG:42102"), CRS. decode ("EPSG:4326") );
sourceCRS
- The source CRS.
targetCRS
- The target CRS.
sourceCRS
to
targetCRS
.
FactoryException
- If no math transform can be created for the specified source and
target CRS.
public static MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, String transformCode) throws FactoryException
Sample use: MathTransform transform = CRS.findMathTransform( CRS. decode ("EPSG:21036"), CRS. decode ("EPSG:32736"), "EPSG:1285" );
sourceCRS
- The source CRS.
targetCRS
- The target CRS.
transformCode
- - the transform operation desired.
sourceCRS
to
targetCRS
using the
transformCode
if it is found, otherwise the first transform found will be returned.
FactoryException
- If no math transform can be created for the specified source and
target CRS.
public static Map<String,AbstractCoordinateOperation> getTransforms(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS) throws FactoryException
DefaultConcatenatedOperation
from sourceCRS to targetCRS
sourceCRS
- - the starting CRS
targetCRS
- - the target CRS
DefaultConcatenatedOperation
) keyed by id code
which can be used in
findMathTransform(CoordinateReferenceSystem, CoordinateReferenceSystem, String)
findMathTransform}(sourceCRS, targetCRS, transformCode)
FactoryException
public static MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, boolean lenient) throws FactoryException
findMathTransform
(sourceCRS, targetCRS)
, except that it can optionally tolerate
lenient datum shift
. If the
lenient
argument is
true
, then this
method will not throw a "
Bursa-Wolf parameters required
" exception during datum
shifts if the Bursa-Wolf paramaters are not specified. Instead it will assume a no datum
shift.
sourceCRS
- The source CRS.
targetCRS
- The target CRS.
lenient
-
true
if the math transform should be created even when there is no
information available for a datum shift. The default value is
false
.
sourceCRS
to
targetCRS
.
FactoryException
- If no math transform can be created for the specified source and
target CRS.
Hints.LENIENT_DATUM_SHIFT
public static GeneralBounds transform(Bounds envelope, CoordinateReferenceSystem targetCRS) throws TransformException
Don't use this method if there is many envelopes to transform. This method is provided as a convenience when there is only one envelope to transform between CRS that can't be known in advance. If there is many of them or if the CRS are restricted to known values, get the coordinate operation or math transform once for ever and invoke one of the methods below instead (unless if performance is not a concern).
envelope
- The envelope to transform (may be
null
).
targetCRS
- The target CRS (may be
null
).
envelope
if no transformation was
required.
TransformException
- If a transformation was required and failed.
public static GeneralBounds transform(MathTransform transform, Bounds envelope) throws TransformException
Note that this method can not handle the case where the envelope contains the North or
South pole, or when it cross the ±180° longitude, because
math transforms
do not carry suffisient informations. For a more robust envelope
transformation, use
transform(CoordinateOperation, Bounds)
instead.
transform
- The transform to use.
envelope
- Envelope to transform, or
null
. This envelope will not be modified.
null
if
envelope
was null.
TransformException
- if a transform failed.
transform(CoordinateOperation, Bounds)
public static GeneralBounds transform(CoordinateOperation operation, Bounds envelope) throws TransformException
This method can handle the case where the envelope contains the North or South pole, or when it cross the ±180° longitude.
operation
- The operation to use. Source and target dimension must be 2.
envelope
- Envelope to transform, or
null
. This envelope will not be modified.
null
if
envelope
was null.
TransformException
- if a transform failed.
transform(MathTransform, Bounds)
public static Rectangle2D transform(MathTransform2D transform, Rectangle2D rectangle) throws TransformException
Note that this method can not handle the case where the envelope contains the North or
South pole, or when it cross the ±180° longitude, because
math transforms
do not carry suffisient informations. For a more robust envelope
transformation, use
transform(CoordinateOperation, Bounds)
instead.
transform
- The transform to use.
rectangle
- Rectangle to transform, or
null
. This rectangle will not be
modified.
null
if
rectangle
was null.
TransformException
- if a transform failed.
transform(CoordinateOperation, Rectangle2D, Rectangle2D)
public static Rectangle2D transform(MathTransform2D transform, Rectangle2D envelope, Rectangle2D destination) throws TransformException
Note that this method can not handle the case where the rectangle contains the North or
South pole, or when it cross the ±180° longitude, because
math transforms
do not carry suffisient informations. For a more robust rectangle
transformation, use
transform(CoordinateOperation, Rectangle2D, Rectangle2D)
instead.
transform
- The transform to use. Source and target dimension must be 2.
envelope
- The rectangle to transform (may be
null
).
destination
- The destination rectangle (may be
envelope
). If
null
, a
new rectangle will be created and returned.
destination
, or a new rectangle if
destination
was non-null and
envelope
was null.
TransformException
- if a transform failed.
transform(CoordinateOperation, Rectangle2D, Rectangle2D)
,
XAffineTransform.transform(
java.awt.geom.AffineTransform, Rectangle2D, Rectangle2D)
public static Rectangle2D transform(CoordinateOperation operation, Rectangle2D envelope, Rectangle2D destination) throws TransformException
This method can handle the case where the rectangle contains the North or South pole, or when it cross the ±180° longitude.
operation
- The operation to use. Source and target dimension must be 2.
envelope
- The rectangle to transform (may be
null
).
destination
- The destination rectangle (may be
envelope
). If
null
, a
new rectangle will be created and returned.
destination
, or a new rectangle if
destination
was non-null and
envelope
was null.
TransformException
- if a transform failed.
transform(MathTransform2D, Rectangle2D, Rectangle2D)
,
XAffineTransform.transform(
java.awt.geom.AffineTransform, Rectangle2D, Rectangle2D)
public static void reset(String aspects)
"plugins"
for
searching the
classpath for new plugins
.
"warnings"
for
re-enabling the warnings
to be issued when a coordinate is out of projection valid area
.
aspects
- The aspects to reset, or
"all"
for all of them. Unknown aspects are
silently ignored.
public static void cleanupThreadLocals()
public static CRS.AxisOrder getAxisOrder(CoordinateReferenceSystem crs)
crs
- The coordinate reference system.
CRS.AxisOrder.EAST_NORTH
, {@link AxisOrder@NORTH_EAST}, or
CRS.AxisOrder.INAPPLICABLE
CRS.AxisOrder
public static CRS.AxisOrder getAxisOrder(CoordinateReferenceSystem crs, boolean useBaseGeoCRS)
The useBaseGeoCRS parameter is used to control behaviour for projected crs. When set to true the comparison will use the coordinate system for the underlying geographic crs object for the comparison. When set to false the comparison will use the coordinate system from projected crs itself.
crs
- The coordinate reference system.
useBaseGeoCRS
- Controls whether the base geo crs is used for projected crs.
CRS.AxisOrder.EAST_NORTH
, {@link AxisOrder@NORTH_EAST}, or
CRS.AxisOrder.INAPPLICABLE
public static void main(String... args)
By default, this method prints all enumerated objects as
Well Known Text
.
However this method can prints different kind of information if an option such as
-factories
,
-codes
or
-bursawolfs
is provided.
Usage:
java org.geotools.referencing.CRS [options] [codes]
Options:
-authority
=
name
Uses the specified authority factory, for example
"EPSG"
. The authority name can be
any of the authorities listed by the
-factories
option. If this option is not
specified, then the default is all factories.
-bursawolfs
codes
Lists the Bursa-Wolf parameters for the specified CRS ou datum objects. For some
transformations, there is more than one set of Bursa-Wolf parameters available. The standard
Well Known Text
format prints only what look like the "main" one. This option
display all Bursa-Wolf parameters in a table for a given object.
-codes
Lists all available authority codes. Use the
-authority
option if the list should be
restricted to a single authority.
-colors
Enable syntax coloring on
ANSI
X3.64
compatible (aka ECMA-48 and ISO/IEC 6429) terminal. This option tries to highlight
most of the elements relevant to the
equalsIgnoreMetadata
method, with the addition of Bursa-Wolf parameters.
-encoding
=
charset
Sets the console encoding for this application output. This value has no impact on data, but
may improve the output quality. This is not needed on Linux terminal using UTF-8 encoding
(tip: the
terminus font
gives good results).
-dependencies
Lists authority factory dependencies as a tree.
-factories
Lists all availables CRS authority factories.
-forcexy
Force "longitude first" axis order.
-help
Prints the list of options.
-locale
=
name
Formats texts in the specified
locale
.
-operations
sourceCRS
targetCRS
Prints all available coordinate operations between a pair of CRS. This option prints only the
operations explicitly defined in a database like EPSG. There is sometime many such
operations, and sometime none (in which case this option prints nothing - it doesn't try to
find an operation by itself).
-transform
sourceCRS
targetCRS
Prints the preferred math transform between a pair of CRS. At the difference of the
"-operations"
option, this option pick up only one operation (usually the most accurate
one), inferring it if none were explicitly specified in the database.
Examples
(assuming that
"CRS"
is a shortcut for
"java
org.geotools.referencing.CRS"
):
CRS EPSG:4181 EPSG:4326 CRS:84 AUTO:42001,30,0
Prints the "Luxembourg 1930" CRS, the "WGS 84" CRS (from EPSG database), the ""WGS84" CRS
(from the
Web Map Service
specification) and a UTM projection in WKT format.
CRS -authority=EPSG 4181 4326
Prints the "Luxembourg 1930" and "WGS 84" CRS, looking only in the EPSG database (so there is
no need to prefix the codes with
"EPSG"
).
CRS -colors EPSG:7411
Prints the "NTF (Paris) / Lambert zone II + NGF Lallemand" CRS with syntax coloring enabled.
CRS -bursawolfs EPSG:4230
Prints three set of Bursa-Wolf parameters for a CRS based on "European Datum 1950".
CRS -authority=EPSG -operations 4230 4326
Prints all operations declared in the EPSG database from "ED50" to "WGS 84" geographic CRS.
Note that for this particular pair of CRS, there is close to 40 operations declared in the
EPSG database. This method prints only the ones that Geotools can handle.
CRS -transform EPSG:4230 EPSG:4326
Prints the math transform that Geotools would use by default for coordinate transformation
from "ED50" to "WGS 84".
args
- Options and list of object codes to display.