Class HistoryNode

java.lang.Object
org.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive
org.openstreetmap.josm.data.osm.history.HistoryNode
All Implemented Interfaces:
Comparable<HistoryOsmPrimitive>, PrimitiveId, Tagged

public class HistoryNode extends HistoryOsmPrimitive
Represents an immutable OSM node in the context of a historical view on OSM data.
Since:
1670
  • Field Details

    • coords

      private LatLon coords
      the coordinates. May be null for deleted nodes
  • Constructor Details

    • HistoryNode

      public HistoryNode(long id, long version, boolean visible, User user, long changesetId, Instant timestamp, LatLon coords)
      Constructs a new HistoryNode.
      Parameters:
      id - the id (> 0 required)
      version - the version (> 0 required)
      visible - whether the node is still visible
      user - the user (!= null required)
      changesetId - the changeset id (> 0 required)
      timestamp - the timestamp (!= null required)
      coords - the coordinates
      Throws:
      IllegalArgumentException - if preconditions are violated
    • HistoryNode

      public HistoryNode(long id, long version, boolean visible, User user, long changesetId, Instant timestamp, LatLon coords, boolean checkHistoricParams)
      Constructs a new HistoryNode with a configurable checking of historic parameters. This is needed to build virtual HistoryNodes for modified nodes, which do not have a timestamp and a changeset id.
      Parameters:
      id - the id (> 0 required)
      version - the version (> 0 required)
      visible - whether the node is still visible
      user - the user (!= null required)
      changesetId - the changeset id (> 0 required if checkHistoricParams is true)
      timestamp - the timestamp (!= null required if checkHistoricParams is true)
      coords - the coordinates
      checkHistoricParams - if true, checks values of changesetId and timestamp
      Throws:
      IllegalArgumentException - if preconditions are violated
      Since:
      5440
    • HistoryNode

      public HistoryNode(Node n)
      Constructs a new HistoryNode from an existing Node.
      Parameters:
      n - the node
  • Method Details