Class Datum

  • All Implemented Interfaces:
    java.io.Serializable

    public class Datum
    extends java.lang.Object
    implements java.io.Serializable
    A class representing a geodetic datum.

    A geodetic datum consists of a set of reference points on or in the Earth, and a reference Ellipsoid giving an approximation to the true shape of the geoid.

    In order to transform between two geodetic points specified on different datums, it is necessary to transform between the two datums. There are various ways in which this datum conversion may be specified:

    • A 3-parameter conversion
    • A 7-parameter conversion
    • A grid-shift conversion
    In order to be able to transform between any two datums, the parameter-based transforms are provided as a transform to the common WGS84 datum. The WGS transforms of two arbitrary datum transforms can be concatenated to provide a transform between the two datums.

    Notable datums in common use include NAD83 and WGS84.

    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT_TRANSFORM

        private static final double[] DEFAULT_TRANSFORM
      • WGS84

        public static final Datum WGS84
      • GGRS87

        public static final Datum GGRS87
      • NAD83

        public static final Datum NAD83
      • NAD27

        public static final Datum NAD27
      • POTSDAM

        public static final Datum POTSDAM
      • CARTHAGE

        public static final Datum CARTHAGE
      • HERMANNSKOGEL

        public static final Datum HERMANNSKOGEL
      • IRE65

        public static final Datum IRE65
      • NZGD49

        public static final Datum NZGD49
      • OSGB36

        public static final Datum OSGB36
      • code

        private java.lang.String code
      • name

        private java.lang.String name
      • transform

        private double[] transform
      • grids

        private java.util.List<Grid> grids
      • ELLIPSOID_E2_TOLERANCE

        public static final double ELLIPSOID_E2_TOLERANCE
        See Also:
        Constant Field Values
    • Constructor Detail

      • Datum

        private Datum​(java.lang.String code,
                      java.util.List<Grid> grids,
                      Ellipsoid ellipsoid,
                      java.lang.String name)
      • Datum

        public Datum​(java.lang.String code,
                     double deltaX,
                     double deltaY,
                     double deltaZ,
                     Ellipsoid ellipsoid,
                     java.lang.String name)
      • Datum

        public Datum​(java.lang.String code,
                     double deltaX,
                     double deltaY,
                     double deltaZ,
                     double rx,
                     double ry,
                     double rz,
                     double mbf,
                     Ellipsoid ellipsoid,
                     java.lang.String name)
      • Datum

        public Datum​(java.lang.String code,
                     double[] transform,
                     java.util.List<Grid> grids,
                     Ellipsoid ellipsoid,
                     java.lang.String name)
    • Method Detail

      • getCode

        public java.lang.String getCode()
      • getName

        public java.lang.String getName()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getEllipsoid

        public Ellipsoid getEllipsoid()
      • getTransformToWGS84

        public double[] getTransformToWGS84()
      • getTransformType

        public int getTransformType()
      • hasTransformToWGS84

        public boolean hasTransformToWGS84()
      • isEqual

        public boolean isEqual​(Datum datum)
        Tests if this is equal to another Datum.

        Datums are considered to be equal iff:

        • their transforms are equal
        • OR their ellipsoids are (approximately) equal
        Parameters:
        datum -
        Returns:
      • transformFromGeocentricToWgs84

        public void transformFromGeocentricToWgs84​(ProjCoordinate p)
      • transformToGeocentricFromWgs84

        public void transformToGeocentricFromWgs84​(ProjCoordinate p)
      • setGrids

        public void setGrids​(java.util.List<Grid> grids)