public class CRSFactory extends Object
CoordinateReferenceSystems from a variety
of ways of specifying them. This is the primary way of creating coordinate
systems for carrying out projections transformations.
CoordinateReferenceSystems can be used to define
CoordinateTransforms to perform transformations on
ProjCoordinates.
| 构造器 | 说明 |
|---|---|
CRSFactory() |
Creates a new factory.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
CoordinateReferenceSystem |
createFromEsriString(String esriString) |
Create a CoordinateReferenceSystem by Esri projection string
|
CoordinateReferenceSystem |
createFromName(String name) |
Creates a
CoordinateReferenceSystem (CRS) from a well-known name. |
CoordinateReferenceSystem |
createFromParameters(String name,
String paramStr) |
Creates a
CoordinateReferenceSystem from a PROJ.4 projection
parameter string. |
CoordinateReferenceSystem |
createFromParameters(String name,
String[] params) |
Creates a
CoordinateReferenceSystem defined by an array of PROJ.4
projection parameters. |
Registry |
getRegistry() |
Gets the
Registry used by this factory. |
public CoordinateReferenceSystem createFromName(String name) throws UnsupportedParameterException, InvalidValueException, UnknownAuthorityCodeException
CoordinateReferenceSystem (CRS) from a well-known name.
CRS names are of the form: "authority:code", with the components
being:
name - the name of a coordinate system, with optional authority
prefixCoordinateReferenceSystem corresponding to the given
nameUnsupportedParameterException - if a PROJ.4 parameter is not
supportedInvalidValueException - if a parameter value is invalidUnknownAuthorityCodeException - if the authority code cannot be
foundpublic CoordinateReferenceSystem createFromParameters(String name, String paramStr) throws UnsupportedParameterException, InvalidValueException
CoordinateReferenceSystem from a PROJ.4 projection
parameter string.
An example of a valid PROJ.4 projection parameter string is:
+proj=aea +lat_1=50 +lat_2=58.5 +lat_0=45 +lon_0=-126 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m
name - a name for this coordinate system (may be null for
an anonymous coordinate system)paramStr - a PROJ.4 projection parameter stringCoordinateReferenceSystemUnsupportedParameterException - if a given PROJ.4 parameter is not
supportedInvalidValueException - if a supplied parameter value is invalidpublic CoordinateReferenceSystem createFromParameters(String name, String[] params) throws UnsupportedParameterException, InvalidValueException
CoordinateReferenceSystem defined by an array of PROJ.4
projection parameters. PROJ.4 parameters are generally of the form
"+name=value".name - a name for this coordinate system (may be null)params - an array of PROJ.4 projection parametersCoordinateReferenceSystemUnsupportedParameterException - if a PROJ.4 parameter is not
supportedInvalidValueException - if a parameter value is invalidpublic CoordinateReferenceSystem createFromEsriString(String esriString)
esriString - Esri projection stringCopyright © 2019. All rights reserved.