Interface PointAccess

All Known Implementing Classes:
PointList, ShallowImmutablePointList

public interface PointAccess
Author:
Peter Karich
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    ensureNode(int nodeId)
    This method ensures that the node with the specified index exists i.e.
    int
     
    double
    getEle(int nodeId)
    Returns the elevation of the specified nodeId.
    double
    getLat(int nodeId)
     
    double
    getLon(int nodeId)
     
    boolean
     
    default void
    setNode(int nodeId, double lat, double lon)
     
    void
    setNode(int nodeId, double lat, double lon, double ele)
    This method ensures that the node with the specified index exists and prepares access to it.
  • Method Details

    • is3D

      boolean is3D()
      Returns:
      true if elevation data is stored and can be retrieved
    • getDimension

      int getDimension()
      Returns:
      3 if elevation enabled. 2 otherwise
    • ensureNode

      void ensureNode(int nodeId)
      This method ensures that the node with the specified index exists i.e. allocates space for it.
    • setNode

      default void setNode(int nodeId, double lat, double lon)
    • setNode

      void setNode(int nodeId, double lat, double lon, double ele)
      This method ensures that the node with the specified index exists and prepares access to it. The index goes from 0 (inclusive) to graph.getNodes() (exclusive)

      This methods sets the latitude, longitude and elevation to the specified value.

    • getLat

      double getLat(int nodeId)
      Returns:
      the latitude at the specified node index
    • getLon

      double getLon(int nodeId)
      Returns:
      the longitude at the specified node index
    • getEle

      double getEle(int nodeId)
      Returns the elevation of the specified nodeId.