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.SerializableRepresents a projected or geodetic geospatial coordinate system, to which coordinates may be referenced. A coordinate system is defined by the following things:- an
Ellipsoidspecifies how the shape of the Earth is approximated - a
Datumprovides the mapping from the ellipsoid to actual locations on the earth - a
Projectionmethod maps the ellpsoidal surface to a planar space. (The projection method may be null in the case of geodetic coordinate systems). - a
Unitindicates how the ordinate values of coordinates are interpreted
- See Also:
CRSFactory, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static CoordinateReferenceSystemCS_GEOprivate Datumdatumprivate java.lang.Stringnameprivate java.lang.String[]paramsprivate Projectionproj
-
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 CoordinateReferenceSystemcreateGeographic()Creates a geographic (unprojected)CoordinateReferenceSystembased on theDatumof this CRS.booleanequals(java.lang.Object that)DatumgetDatum()java.lang.StringgetName()java.lang.String[]getParameters()java.lang.StringgetParameterString()ProjectiongetProjection()inthashCode()java.lang.BooleanisGeographic()java.lang.StringtoString()
-
-
-
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)CoordinateReferenceSystembased on theDatumof this CRS. This is useful for definingCoordinateTransforms to and from geographic coordinate systems, where no datum transformation is required. TheUnitsof 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:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object that)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-