Package mil.nga.proj
Class Projection
- java.lang.Object
-
- mil.nga.proj.Projection
-
public class Projection extends Object
Single Projection for an authority and code- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description Projection(String authority, long code, org.locationtech.proj4j.CoordinateReferenceSystem crs)
ConstructorProjection(String authority, long code, org.locationtech.proj4j.CoordinateReferenceSystem crs, String definition)
ConstructorProjection(String authority, long code, org.locationtech.proj4j.CoordinateReferenceSystem crs, String definition, CRS definitionCRS)
ConstructorProjection(String authority, String code, org.locationtech.proj4j.CoordinateReferenceSystem crs)
ConstructorProjection(String authority, String code, org.locationtech.proj4j.CoordinateReferenceSystem crs, String definition)
ConstructorProjection(String authority, String code, org.locationtech.proj4j.CoordinateReferenceSystem crs, String definition, CRS definitionCRS)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
boolean
equals(String authority, long code)
Check if this projection is equal to the authority and codeboolean
equals(String authority, String code)
Check if this projection is equal to the authority and codeString
getAuthority()
Get the coordinate authorityString
getCode()
Get the coordinate codeorg.locationtech.proj4j.CoordinateReferenceSystem
getCrs()
Get the Coordinate Reference SystemString
getDefinition()
Get the well-known text coordinate definitionCRS
getDefinitionCRS()
Get the definition parsed Coordinate Reference SystemProjectionTransform
getTransformation(long epsg)
Get the transformation from this Projection to the EPSG code.ProjectionTransform
getTransformation(String authority, long code)
Get the transformation from this Projection to the authority and coordinate code.ProjectionTransform
getTransformation(String authority, String code)
Get the transformation from this Projection to the authority and coordinate code.ProjectionTransform
getTransformation(Projection projection)
Get the transformation from this Projection to the provided projection.org.locationtech.proj4j.units.Unit
getUnit()
Get the units of this projectionint
hashCode()
boolean
isUnit(org.locationtech.proj4j.units.Unit unit)
Determine if the projection is in the provided unitdouble
toMeters(double value)
Convert the value to metersString
toString()
-
-
-
Constructor Detail
-
Projection
public Projection(String authority, long code, org.locationtech.proj4j.CoordinateReferenceSystem crs)
Constructor- Parameters:
authority
- coordinate authoritycode
- coordinate codecrs
- projection coordinate reference system
-
Projection
public Projection(String authority, String code, org.locationtech.proj4j.CoordinateReferenceSystem crs)
Constructor- Parameters:
authority
- coordinate authoritycode
- coordinate codecrs
- projection coordinate reference system
-
Projection
public Projection(String authority, long code, org.locationtech.proj4j.CoordinateReferenceSystem crs, String definition)
Constructor- Parameters:
authority
- coordinate authoritycode
- coordinate codecrs
- projection coordinate reference systemdefinition
- well-known text coordinate definition
-
Projection
public Projection(String authority, String code, org.locationtech.proj4j.CoordinateReferenceSystem crs, String definition)
Constructor- Parameters:
authority
- coordinate authoritycode
- coordinate codecrs
- projection coordinate reference systemdefinition
- well-known text coordinate definition
-
Projection
public Projection(String authority, long code, org.locationtech.proj4j.CoordinateReferenceSystem crs, String definition, CRS definitionCRS)
Constructor- Parameters:
authority
- coordinate authoritycode
- coordinate codecrs
- projection coordinate reference systemdefinition
- well-known text coordinate definitiondefinitionCRS
- definition parsed coordinate reference system
-
Projection
public Projection(String authority, String code, org.locationtech.proj4j.CoordinateReferenceSystem crs, String definition, CRS definitionCRS)
Constructor- Parameters:
authority
- coordinate authoritycode
- coordinate codecrs
- projection coordinate reference systemdefinition
- well-known text coordinate definitiondefinitionCRS
- definition parsed coordinate reference system
-
-
Method Detail
-
getAuthority
public String getAuthority()
Get the coordinate authority- Returns:
- authority
-
getCode
public String getCode()
Get the coordinate code- Returns:
- code
-
getCrs
public org.locationtech.proj4j.CoordinateReferenceSystem getCrs()
Get the Coordinate Reference System- Returns:
- coordinate reference system
-
getDefinition
public String getDefinition()
Get the well-known text coordinate definition- Returns:
- definition
-
getDefinitionCRS
public CRS getDefinitionCRS()
Get the definition parsed Coordinate Reference System- Returns:
- coordinate reference system
-
getTransformation
public ProjectionTransform getTransformation(long epsg)
Get the transformation from this Projection to the EPSG code. Each thread of execution should have it's own transformation.- Parameters:
epsg
- epsg- Returns:
- transform
-
getTransformation
public ProjectionTransform getTransformation(String authority, long code)
Get the transformation from this Projection to the authority and coordinate code. Each thread of execution should have it's own transformation.- Parameters:
authority
- coordinate authoritycode
- coordinate code- Returns:
- transform
-
getTransformation
public ProjectionTransform getTransformation(String authority, String code)
Get the transformation from this Projection to the authority and coordinate code. Each thread of execution should have it's own transformation.- Parameters:
authority
- coordinate authoritycode
- coordinate code- Returns:
- transform
- Since:
- 4.0.0
-
getTransformation
public ProjectionTransform getTransformation(Projection projection)
Get the transformation from this Projection to the provided projection. Each thread of execution should have it's own transformation.- Parameters:
projection
- projection- Returns:
- transform
-
toMeters
public double toMeters(double value)
Convert the value to meters- Parameters:
value
- value- Returns:
- meters
-
getUnit
public org.locationtech.proj4j.units.Unit getUnit()
Get the units of this projection- Returns:
- the projection unit
-
isUnit
public boolean isUnit(org.locationtech.proj4j.units.Unit unit)
Determine if the projection is in the provided unit- Parameters:
unit
- unit- Returns:
- true if in the provided unit
-
equals
public boolean equals(String authority, long code)
Check if this projection is equal to the authority and code- Parameters:
authority
- coordinate authoritycode
- coordinate code- Returns:
- true if equal
-
equals
public boolean equals(String authority, String code)
Check if this projection is equal to the authority and code- Parameters:
authority
- coordinate authoritycode
- coordinate code- Returns:
- true if equal
-
equals
public boolean equals(Object obj)
Based upon
getAuthority()
andgetCode()
-
-