Class Position

    • Constructor Detail

      • Position

        public Position​(Point point)
        Constructor
        Parameters:
        point - simple point
      • Position

        public Position​(Double longitude,
                        Double latitude)
        Constructor
        Parameters:
        longitude - longitude value
        latitude - latitude value
      • Position

        public Position​(Double longitude,
                        Double latitude,
                        Double altitude,
                        Double... additionalElements)
        Construct a Coordinates with additional elements. The specification allows for any number of additional elements in a position, after lng, lat, alt. https://tools.ietf.org/html/rfc7946#section-3.1.1
        Parameters:
        longitude - The longitude.
        latitude - The latitude.
        altitude - The altitude.
        additionalElements - The additional elements.
    • Method Detail

      • hasAdditionalElements

        public boolean hasAdditionalElements()
        Check if the position has additional elements
        Returns:
        true if additional elements
      • getAdditionalElements

        public List<Double> getAdditionalElements()
        Get the additional elements
        Returns:
        additional elements
      • getX

        public Double getX()
        Get the x value
        Returns:
        x
      • getY

        public Double getY()
        Get the y value
        Returns:
        y
      • getZ

        public Double getZ()
        Get the z value
        Returns:
        z
      • getM

        public Double getM()
        Get the m value
        Returns:
        m
      • hasZ

        public boolean hasZ()
        Check if position has a z value
        Returns:
        true if has z value
      • hasM

        public boolean hasM()
        Check if position has a m value
        Returns:
        true if has m value
      • toSimplePoint

        public Point toSimplePoint()
        Convert to simple point
        Returns:
        simple point
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object