public class CrsId extends Object
CoordinateReferenceSystem or other object referenced in a
CoordinateReferenceSystem definition.
A commonly used alternative name for CrsId is "SRID".
A CrsId consists of the name of an authority and a numeric identifier. The authority is the
organization that is responsible for managing the definition of the identified object.
In practice, CoordinateReferenceSystems are usually identified by their EPSG code, with EPSG
the authority for the identifier. In this implementation, EPSG is the default authority.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_AUTHORITY |
static CrsId |
UNDEFINED
Identifies an undefined (or unknown)
CrsId. |
| Constructor and Description |
|---|
CrsId(String authority,
int code)
Creates an instance having the specified authority and code.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getAuthority()
Returns the authority for this
CrsId. |
int |
getCode()
Returns the code for this
CrsId. |
int |
hashCode() |
static CrsId |
parse(String srsString)
Creates an instance from a
String of the form "[. |
String |
toString() |
static CrsId |
valueOf(int code)
Returns a
CrsId with the specified code and the
EPSG as authority. |
static CrsId |
valueOf(String authority,
int code)
Returns an instance having the specified authority and code.
|
public static final String DEFAULT_AUTHORITY
public static final CrsId UNDEFINED
CrsId.public CrsId(String authority, int code)
If authority EPSG and 0 or -1 is passed for the code parameter, a value equal to CrsId.UNDEFINED is returned.
authority - the authority that assigned the codecode - the code for the CoordinateReferenceSystempublic static CrsId parse(String srsString)
String of the form "[.
If the "authority" prefix is missing, then the authority will be assumed to be EPSG.
srsString - the string to parse into a CrsId.IllegalArgumentException - when the string can nog be parsed aspublic static CrsId valueOf(String authority, int code)
authority - the authority that assigned the codecode - the code for the CoordinateReferenceSystemCrsId for the specified authority and code.public static CrsId valueOf(int code)
CrsId with the specified code and the
EPSG as authority.code - the code for the CrsId.CrsId for the specified code,and EPSG as authority.public String getAuthority()
CrsId.CrsIdpublic int getCode()
CrsId.CrsIdCopyright © 2015 geolatte.org. All rights reserved.