Package mil.nga.proj

Class Projection


  • public class Projection
    extends Object
    Single Projection for an authority and code
    Author:
    osbornb
    • Constructor Detail

      • Projection

        public Projection​(String authority,
                          long code,
                          org.locationtech.proj4j.CoordinateReferenceSystem crs)
        Constructor
        Parameters:
        authority - coordinate authority
        code - coordinate code
        crs - projection coordinate reference system
      • Projection

        public Projection​(String authority,
                          String code,
                          org.locationtech.proj4j.CoordinateReferenceSystem crs)
        Constructor
        Parameters:
        authority - coordinate authority
        code - coordinate code
        crs - projection coordinate reference system
      • Projection

        public Projection​(String authority,
                          long code,
                          org.locationtech.proj4j.CoordinateReferenceSystem crs,
                          String definition)
        Constructor
        Parameters:
        authority - coordinate authority
        code - coordinate code
        crs - projection coordinate reference system
        definition - well-known text coordinate definition
      • Projection

        public Projection​(String authority,
                          String code,
                          org.locationtech.proj4j.CoordinateReferenceSystem crs,
                          String definition)
        Constructor
        Parameters:
        authority - coordinate authority
        code - coordinate code
        crs - projection coordinate reference system
        definition - 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 authority
        code - coordinate code
        crs - projection coordinate reference system
        definition - well-known text coordinate definition
        definitionCRS - 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 authority
        code - coordinate code
        crs - projection coordinate reference system
        definition - well-known text coordinate definition
        definitionCRS - 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 authority
        code - 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 authority
        code - 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 authority
        code - 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 authority
        code - coordinate code
        Returns:
        true if equal
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object