Package org.locationtech.proj4j
Class CoordinateReferenceSystem
- java.lang.Object
-
- org.locationtech.proj4j.CoordinateReferenceSystem
-
- All Implemented Interfaces:
java.io.Serializable
public class CoordinateReferenceSystem extends java.lang.Object implements java.io.Serializable
Represents a projected or geodetic geospatial coordinate system, to which coordinates may be referenced. A coordinate system is defined by the following things:- an
Ellipsoid
specifies how the shape of the Earth is approximated - a
Datum
provides the mapping from the ellipsoid to actual locations on the earth - a
Projection
method maps the ellpsoidal surface to a planar space. (The projection method may be null in the case of geodetic coordinate systems). - a
Unit
indicates how the ordinate values of coordinates are interpreted
- See Also:
CRSFactory
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static CoordinateReferenceSystem
CS_GEO
private Datum
datum
private java.lang.String
name
private java.lang.String[]
params
private Projection
proj
-
Constructor Summary
Constructors Constructor Description CoordinateReferenceSystem(java.lang.String name, java.lang.String[] params, Datum datum, Projection proj)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoordinateReferenceSystem
createGeographic()
Creates a geographic (unprojected)CoordinateReferenceSystem
based on theDatum
of this CRS.boolean
equals(java.lang.Object that)
Datum
getDatum()
java.lang.String
getName()
java.lang.String[]
getParameters()
java.lang.String
getParameterString()
Projection
getProjection()
int
hashCode()
java.lang.Boolean
isGeographic()
java.lang.String
toString()
-
-
-
Field Detail
-
CS_GEO
public static final CoordinateReferenceSystem CS_GEO
-
name
private java.lang.String name
-
params
private java.lang.String[] params
-
datum
private Datum datum
-
proj
private Projection proj
-
-
Constructor Detail
-
CoordinateReferenceSystem
public CoordinateReferenceSystem(java.lang.String name, java.lang.String[] params, Datum datum, Projection proj)
-
-
Method Detail
-
getName
public java.lang.String getName()
-
getParameters
public java.lang.String[] getParameters()
-
getDatum
public Datum getDatum()
-
getProjection
public Projection getProjection()
-
getParameterString
public java.lang.String getParameterString()
-
isGeographic
public java.lang.Boolean isGeographic()
-
createGeographic
public CoordinateReferenceSystem createGeographic()
Creates a geographic (unprojected)CoordinateReferenceSystem
based on theDatum
of this CRS. This is useful for definingCoordinateTransform
s to and from geographic coordinate systems, where no datum transformation is required. TheUnits
of the geographic CRS are set toUnits.DEGREES
.- Returns:
- a geographic CoordinateReferenceSystem based on the datum of this CRS
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object that)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-