Class SimpleDatum

    • Field Detail

      • SPHERE

        public static final GeodeticDatum SPHERE
        A spherical datum used for coordinate reference systems where datum is unknown. The axis length are 6371007 metres.
      • semiMajorAxis

        protected final double semiMajorAxis
        The semi-major axis length, in metres.
        See Also:
        getSemiMajorAxis()
      • inverseFlattening

        protected final double inverseFlattening
        The inverse flattening factor.
        See Also:
        getInverseFlattening()
    • Constructor Detail

      • SimpleDatum

        public SimpleDatum​(Citation authority,
                           String name,
                           double semiMajorAxis,
                           double inverseFlattening)
        Creates a new geodetic datum for the given authority, name, and ellipsoid axis length.
        Parameters:
        authority - organization responsible for definition of the name, or null.
        name - the name of the new CRS.
        semiMajorAxis - the value to be returned by getSemiMajorAxis(), in metres.
        inverseFlattening - the value to be returned by getInverseFlattening().
    • Method Detail

      • getEllipsoid

        public Ellipsoid getEllipsoid()
        Returns the ellipsoid, which is represented directly by this implementation class since it does not distinguish geodetic datum and ellipsoid.
        Specified by:
        getEllipsoid in interface GeodeticDatum
        Returns:
        the ellipsoid.
      • getAxisUnit

        public Unit<Length> getAxisUnit()
        Returns the linear unit of the semi-major and semi-minor axis values. The default implementation returns Units.METRE.
        Specified by:
        getAxisUnit in interface Ellipsoid
        Returns:
        the axis linear unit.
      • getSemiMajorAxis

        public double getSemiMajorAxis()
        Length of the semi-major axis of the ellipsoid. This is the equatorial radius in axis linear unit.
        Specified by:
        getSemiMajorAxis in interface Ellipsoid
        Returns:
        Length of semi-major axis.
      • getSemiMinorAxis

        public double getSemiMinorAxis()
        Length of the semi-minor axis of the ellipsoid. This is the polar radius in axis linear unit.
        Specified by:
        getSemiMinorAxis in interface Ellipsoid
        Returns:
        Length of semi-minor axis.
      • getInverseFlattening

        public double getInverseFlattening()
        Returns the value of the inverse of the flattening constant.
        Specified by:
        getInverseFlattening in interface Ellipsoid
        Returns:
        the inverse flattening value, or positive infinity if this ellipsoid is a sphere.
      • isIvfDefinitive

        public boolean isIvfDefinitive()
        Indicates if the inverse flattening is definitive for this ellipsoid. The default implementation returns true for if this ellipsoid is not a sphere, since the constructor of this SimpleDatum class expects a inverseFlattening value.
        Specified by:
        isIvfDefinitive in interface Ellipsoid
        Returns:
        true if the inverse flattening is definitive, or false if the polar radius is definitive.
      • isSphere

        public boolean isSphere()
        true if the ellipsoid is degenerate and is actually a sphere.
        Specified by:
        isSphere in interface Ellipsoid
        Returns:
        true if the ellipsoid is degenerate and is actually a sphere.
      • getPrimeMeridian

        public PrimeMeridian getPrimeMeridian()
        Returns the prime meridian. The default implementation returns the Greenwich prime meridian.
        Specified by:
        getPrimeMeridian in interface GeodeticDatum
        Returns:
        the prime meridian.
      • equals

        public boolean equals​(Object object)
        Compares this datum with the given object for equality.
        Overrides:
        equals in class SimpleIdentifiedObject
        Parameters:
        object - The object to compare with this SimpleDatum.
        Returns:
        true if the given object is equals to this object.