Package org.openstreetmap.josm.data.osm
Class Way
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.AbstractPrimitive
-
- org.openstreetmap.josm.data.osm.OsmPrimitive
-
- org.openstreetmap.josm.data.osm.Way
-
- All Implemented Interfaces:
java.lang.Comparable<IPrimitive>
,IQuadBucketType
,IFilterablePrimitive
,IPrimitive
,IWay<Node>
,PrimitiveId
,Stylable
,Tagged
,TemplateEngineDataProvider
public final class Way extends OsmPrimitive implements IWay<Node>
One full way, consisting of a list of waynodes
.- Since:
- 64
-
-
Field Summary
Fields Modifier and Type Field Description private BBox
bbox
private static Node[]
EMPTY_NODES
(package private) static UniqueIdGenerator
idGenerator
private Node[]
nodes
All way nodes in this way-
Fields inherited from class org.openstreetmap.josm.data.osm.OsmPrimitive
directionKeys
-
Fields inherited from class org.openstreetmap.josm.data.osm.AbstractPrimitive
changesetId, FLAG_ALL_REFERRERS_DOWNLOADED, FLAG_ANNOTATED, FLAG_DELETED, FLAG_DIRECTION_REVERSED, FLAG_DISABLED, FLAG_DISABLED_TYPE, FLAG_HAS_DIRECTIONS, FLAG_HIDDEN_TYPE, FLAG_HIDE_IF_DISABLED, FLAG_HIGHLIGHTED, FLAG_INCOMPLETE, FLAG_MODIFIED, FLAG_PRESERVED, FLAG_TAGGED, FLAG_VISIBLE, flags, id, keys, mappaintCacheIdx, timestamp, user, version
-
Fields inherited from interface org.openstreetmap.josm.data.osm.Tagged
MAX_TAG_LENGTH
-
-
Constructor Summary
Constructors Constructor Description Way()
Constructs a newWay
with id 0.Way(long id)
Constructs a newWay
for the given id.Way(long id, boolean allowNegative)
Way(long id, int version)
Constructs a newWay
with given id and version.Way(Way original)
Constructs a newWay
from an existingWay
(including its id).Way(Way original, boolean clearMetadata)
Constructs a newWay
from an existingWay
.Way(Way original, boolean clearMetadata, boolean copyNodes)
Constructs a newWay
from an existingWay
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(OsmPrimitiveVisitor visitor)
Implementation of the visitor scheme.void
accept(PrimitiveVisitor visitor)
Makes the given visitor visit this primitive.void
addNode(int offs, Node n)
Adds a node at position offs.void
addNode(Node n)
Adds a node to the end of the list of nodes.protected void
addToBBox(BBox box, java.util.Set<PrimitiveId> visited)
If necessary, extend the bbox to contain this primitivejava.util.List<Node>
calculateRemoveNodes(java.util.Set<? extends Node> selection)
Calculate the remaining nodes after a removal of the given set ofnodes
from this way.private void
checkNodes()
void
clearCachedNodeStyles()
Clears all cached styles for all nodes of this way.void
cloneFrom(OsmPrimitive osm, boolean copyNodes)
Get and write all attributes from the parameter.boolean
concernsArea()
Determines if this primitive semantically concerns an area.boolean
containsNode(Node node)
Replies true if this way contains the nodenode
, false otherwise.private void
fireNodesChanged()
Node
firstNode()
Returns the first node of this way.Node
firstNode(boolean respectOneway)
Replies the first node of this way, respecting or not its oneway state.java.util.List<Pair<java.lang.Double,Node>>
getAngles()
Returns angles of vertices.BBox
getBBox()
Fetches the bounding box of the primitive.OsmPrimitiveType
getDisplayType()
Gets the type this primitive is displayed atUniqueIdGenerator
getIdGenerator()
Returns the unique identifier generator.double
getLength()
Replies the length of the way, in metres, as computed byILatLon.greatCircleDistance(org.openstreetmap.josm.data.coor.ILatLon)
.double
getLongestSegmentLength()
Replies the length of the longest segment of the way, in metres, as computed byILatLon.greatCircleDistance(org.openstreetmap.josm.data.coor.ILatLon)
.java.util.Set<Node>
getNeighbours(Node node)
Return nodes adjacent tonode
Node
getNode(int index)
Replies the node at positionindex
.long
getNodeId(int idx)
Returns id of the node at given index.java.util.List<java.lang.Long>
getNodeIds()
Returns the list of node ids in this way.java.util.List<Pair<Node,Node>>
getNodePairs(boolean sort)
Replies the orderedList
of chunks of this way.java.util.List<Node>
getNodes()
Returns the list of nodes in this way.int
getNodesCount()
Replies the number of nodes in this way.double[]
getSegmentLengths()
Replies the segment lengths of the way as computed byILatLon.greatCircleDistance(org.openstreetmap.josm.data.coor.ILatLon)
.OsmPrimitiveType
getType()
Gets the type of object represented by this object.boolean
hasEqualSemanticAttributes(OsmPrimitive other, boolean testInterestingTagsOnly)
boolean
hasIncompleteNodes()
Replies true if this way has incomplete nodes, false otherwise.boolean
hasOnlyLocatableNodes()
Replies true if all nodes of the way have known lat/lon, false otherwise.boolean
isArea()
Determines if this way denotes an area (closed way with at least three distinct nodes).boolean
isClosed()
Determines if this way is closed.boolean
isDrawable()
Determines if this object is drawable.boolean
isFirstLastNode(INode n)
Replies true if the given node is the first or the last one of this way, false otherwise.boolean
isInnerNode(INode n)
Replies true if the given node is an inner node of this way, false otherwise.int
isOneway()
Tests if this way is a oneway.boolean
isOutsideDownloadArea()
Tests if this primitive lies outside of the downloaded area of itsDataSet
.boolean
isUsable()
Repliestrue
, if the object is usable (i.e.protected void
keysChangedImpl(java.util.Map<java.lang.String,java.lang.String> originalKeys)
What to do, when the tags have changed by one of the tag-changing methods.Node
lastNode()
Returns the last node of this way.Node
lastNode(boolean respectOneway)
Replies the last node of this way, respecting or not its oneway state.void
load(PrimitiveData data)
Loads (clone) this primitive from provided PrimitiveDataprivate static java.util.List<Node>
removeDouble(java.util.List<Node> nodes)
Prevent directly following identical nodes in ways.void
removeNode(Node n)
Removes the givenNode
from this way.void
removeNodes(java.util.Set<? extends Node> selection)
Removes the given set ofnodes
from this way.WayData
save()
Save parameters of this primitive to the transport objectprivate java.util.stream.DoubleStream
segmentLengths()
Get the segment lengths as a streamprivate void
setBBox(BBox bbox)
(package private) void
setDataset(DataSet dataSet)
This method should never ever by called from somewhere else than Dataset.addPrimitive or removePrimitive methodsvoid
setDeleted(boolean deleted)
Sets whether this primitive is deleted or not.void
setNodes(java.util.List<Node> nodes)
Set new list of nodes to way.java.lang.String
toString()
void
updatePosition()
Called by Dataset to update cached position information of primitive (bbox, cached EarthNorth, ...)-
Methods inherited from class org.openstreetmap.josm.data.osm.OsmPrimitive
addReferrer, checkDataset, checkDatasetNotReadOnly, clearOsmMetadata, cloneFrom, declareCachedStyleUpToDate, equals, evaluateCondition, getCachedStyle, getDataSet, getFlagsAsString, getParentRelations, getReferrer, getReferrers, getReferrers, getTemplateKeys, getTemplateValue, hasAreaTags, hasEqualSemanticAttributes, hasEqualSemanticFlags, hasEqualTechnicalAttributes, hashCode, isCachedStyleUpToDate, isMemberOfSelected, isNodeReferredByWays, isOuterMemberOfSelected, isSelectable, isSelected, mergeFrom, put, referrers, remove, removeAll, removeReferrer, saveCommonAttributes, setCachedStyle, setChangesetId, setDisabledState, setHighlighted, setIncomplete, setKeys, setKeys, setModified, setOsmId, setPreserved, setUser, setVisible, unsetDisabledState, updateDirectionFlags, updateFlags, visitReferrers, visitReferrers, writeLock, writeUnlock
-
Methods inherited from class org.openstreetmap.josm.data.osm.AbstractPrimitive
cloneFrom, doGet, get, getChangesetId, getDisabledType, getDiscardableKeys, getHiddenType, getId, getIgnoreCase, getInstant, getInterestingTags, getKeys, getNumKeys, getRawTimestamp, getUninterestingKeys, getUniqueId, getUser, getVersion, getWorkInProgressKeys, hasDirectionKeys, hasKey, hasKey, hasKeys, isAnnotated, isDeleted, isDisabled, isDisabledAndHidden, isHighlighted, isIncomplete, isModified, isNew, isNewOrUndeleted, isPreserved, isReferrersDownloaded, isTagged, isTimestampEmpty, isUndeleted, isUninterestingKey, isVisible, keys, keySet, putAll, reversedDirection, setDisabledType, setHiddenType, setInstant, setRawTimestamp, setReferrersDownloaded, updateFlagsChanged, visitKeys
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.data.osm.IPrimitive
getChangesetId, getDataSet, getId, getInstant, getInterestingTags, getLocalName, getName, getOsmId, getOsmPrimitiveId, getPrimitiveId, getRawTimestamp, getReferrers, getReferrers, getStyleCacheSyncObject, getUser, getVersion, hasDirectionKeys, hasSameInterestingTags, isAnnotated, isDeleted, isDisabled, isDisabledAndHidden, isHighlighted, isIncomplete, isMemberOfSelected, isModified, isMultipolygon, isNewOrUndeleted, isOuterMemberOfSelected, isPreserved, isReferrersDownloaded, isSelectable, isSelected, isTagged, isTimestampEmpty, isUndeleted, isVisible, reversedDirection, setChangesetId, setHighlighted, setInstant, setModified, setOsmId, setRawTimestamp, setReferrersDownloaded, setUser, setVisible, visitReferrers
-
Methods inherited from interface org.openstreetmap.josm.data.osm.IWay
compareTo, getChildren, getDisplayName, getRealNodesCount, isEmpty
-
Methods inherited from interface org.openstreetmap.josm.data.osm.PrimitiveId
getUniqueId, isNew
-
Methods inherited from interface org.openstreetmap.josm.data.osm.Stylable
clearCachedStyle, declareCachedStyleUpToDate, getCachedStyle, isCachedStyleUpToDate, setCachedStyle
-
Methods inherited from interface org.openstreetmap.josm.data.osm.Tagged
get, getKeys, getNumKeys, hasKey, hasKeys, hasTag, hasTag, hasTag, hasTag, hasTagDifferent, hasTagDifferent, hasTagDifferent, isKeyFalse, isKeyTrue, keys, keySet, put, put, putAll, remove, removeAll, setKeys, visitKeys
-
-
-
-
Field Detail
-
idGenerator
static final UniqueIdGenerator idGenerator
-
EMPTY_NODES
private static final Node[] EMPTY_NODES
-
-
Constructor Detail
-
Way
Way(long id, boolean allowNegative)
-
Way
public Way()
Constructs a newWay
with id 0.- Since:
- 86
-
Way
public Way(Way original, boolean clearMetadata, boolean copyNodes)
Constructs a newWay
from an existingWay
. This adds links from all way nodes to the clone. See #19885 for possible memory leaks.- Parameters:
original
- The originalWay
to be identically cloned. Must not be nullclearMetadata
- Iftrue
, clears the OSM id and other metadata as defined byOsmPrimitive.clearOsmMetadata()
. Iffalse
, does nothingcopyNodes
- whether to copy nodes too- Since:
- 16212
-
Way
public Way(Way original, boolean clearMetadata)
Constructs a newWay
from an existingWay
. This adds links from all way nodes to the clone. See #19885 for possible memory leaks.- Parameters:
original
- The originalWay
to be identically cloned. Must not be nullclearMetadata
- Iftrue
, clears the OSM id and other metadata as defined byOsmPrimitive.clearOsmMetadata()
. Iffalse
, does nothing- Since:
- 2410
-
Way
public Way(Way original)
Constructs a newWay
from an existingWay
(including its id). This adds links from all way nodes to the clone. See #19885 for possible memory leaks.- Parameters:
original
- The originalWay
to be identically cloned. Must not be null- Since:
- 86
-
Way
public Way(long id)
Constructs a newWay
for the given id. If the id > 0, the way is marked as incomplete. If id == 0 then way is marked as new- Parameters:
id
- the id. >= 0 required- Throws:
java.lang.IllegalArgumentException
- if id < 0- Since:
- 343
-
Way
public Way(long id, int version)
Constructs a newWay
with given id and version.- Parameters:
id
- the id. >= 0 requiredversion
- the version- Throws:
java.lang.IllegalArgumentException
- if id < 0- Since:
- 2620
-
-
Method Detail
-
getNodes
public java.util.List<Node> getNodes()
Description copied from interface:IWay
Returns the list of nodes in this way.
-
setNodes
public void setNodes(java.util.List<Node> nodes)
Description copied from interface:IWay
Set new list of nodes to way. This method is preferred to multiple calls to addNode/removeNode and similar methods because nodes are internally saved as array which means lower memory overhead but also slower modifying operations.
-
removeDouble
private static java.util.List<Node> removeDouble(java.util.List<Node> nodes)
Prevent directly following identical nodes in ways.- Parameters:
nodes
- list of nodes- Returns:
nodes
with consecutive identical nodes removed
-
getNodesCount
public int getNodesCount()
Description copied from interface:IWay
Replies the number of nodes in this way.- Specified by:
getNodesCount
in interfaceIWay<Node>
- Returns:
- the number of nodes in this way.
-
getNode
public Node getNode(int index)
Description copied from interface:IWay
Replies the node at positionindex
.
-
getNodeId
public long getNodeId(int idx)
Description copied from interface:IWay
Returns id of the node at given index.
-
getNodeIds
public java.util.List<java.lang.Long> getNodeIds()
Description copied from interface:IWay
Returns the list of node ids in this way.- Specified by:
getNodeIds
in interfaceIWay<Node>
- Returns:
- the list of node ids in this way
-
containsNode
public boolean containsNode(Node node)
Replies true if this way contains the nodenode
, false otherwise. Replies false ifnode
is null.- Parameters:
node
- the node. May be null.- Returns:
- true if this way contains the node
node
, false otherwise - Since:
- 1911
-
getNeighbours
public java.util.Set<Node> getNeighbours(Node node)
Return nodes adjacent tonode
- Parameters:
node
- the node. May be null.- Returns:
- Set of nodes adjacent to
node
- Since:
- 4671
-
getNodePairs
public java.util.List<Pair<Node,Node>> getNodePairs(boolean sort)
- Parameters:
sort
- If true, the nodes of each pair are sorted as defined byPair.sort(org.openstreetmap.josm.tools.Pair<T, T>)
. If false, Pair.a and Pair.b are in the way order (i.e for a given Pair(n), Pair(n-1).b == Pair(n).a, Pair(n).b == Pair(n+1).a, etc.)- Returns:
- The ordered list of chunks of this way.
- Since:
- 3348
-
accept
public void accept(OsmPrimitiveVisitor visitor)
Description copied from class:OsmPrimitive
Implementation of the visitor scheme. Subclasses have to call the correct visitor function.- Specified by:
accept
in classOsmPrimitive
- Parameters:
visitor
- The visitor from which the visit() function must be called.
-
accept
public void accept(PrimitiveVisitor visitor)
Description copied from interface:IPrimitive
Makes the given visitor visit this primitive.- Specified by:
accept
in interfaceIPrimitive
- Parameters:
visitor
- visitor
-
load
public void load(PrimitiveData data)
Description copied from class:OsmPrimitive
Loads (clone) this primitive from provided PrimitiveData- Overrides:
load
in classOsmPrimitive
- Parameters:
data
- The object which should be cloned
-
save
public WayData save()
Description copied from class:OsmPrimitive
Save parameters of this primitive to the transport object- Specified by:
save
in classOsmPrimitive
- Returns:
- The saved object data
-
cloneFrom
public void cloneFrom(OsmPrimitive osm, boolean copyNodes)
Description copied from class:OsmPrimitive
Get and write all attributes from the parameter. Does not fire any listener, so use this only in the data initializing phase- Overrides:
cloneFrom
in classOsmPrimitive
- Parameters:
osm
- other primitivecopyNodes
- whether to copy child primitives too
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hasEqualSemanticAttributes
public boolean hasEqualSemanticAttributes(OsmPrimitive other, boolean testInterestingTagsOnly)
- Overrides:
hasEqualSemanticAttributes
in classOsmPrimitive
-
removeNode
public void removeNode(Node n)
Removes the givenNode
from this way. Ignored, if n is null.- Parameters:
n
- The node to remove. Ignored, if null- Since:
- 1463
-
removeNodes
public void removeNodes(java.util.Set<? extends Node> selection)
Removes the given set ofnodes
from this way. Ignored, if selection is null.- Parameters:
selection
- The selection of nodes to remove. Ignored, if null- Since:
- 5408
-
calculateRemoveNodes
public java.util.List<Node> calculateRemoveNodes(java.util.Set<? extends Node> selection)
Calculate the remaining nodes after a removal of the given set ofnodes
from this way.- Parameters:
selection
- The selection of nodes to remove. Ignored, if null- Returns:
- result of the removal, can be empty
- Since:
- 17102
-
addNode
public void addNode(Node n)
Adds a node to the end of the list of nodes. Ignored, if n is null.- Parameters:
n
- the node. Ignored, if null- Throws:
java.lang.IllegalStateException
- if this way is marked as incomplete. We can't add a node to an incomplete way- Since:
- 1313
-
addNode
public void addNode(int offs, Node n)
Adds a node at position offs.- Parameters:
offs
- the offsetn
- the node. Ignored, if null.- Throws:
java.lang.IllegalStateException
- if this way is marked as incomplete. We can't add a node to an incomplete wayjava.lang.IndexOutOfBoundsException
- if offs is out of bounds- Since:
- 1313
-
setDeleted
public void setDeleted(boolean deleted)
Description copied from interface:IPrimitive
Sets whether this primitive is deleted or not.Also marks this primitive as modified if deleted is true.
- Specified by:
setDeleted
in interfaceIPrimitive
- Overrides:
setDeleted
in classOsmPrimitive
- Parameters:
deleted
- true, if this primitive is deleted; false, otherwise
-
isClosed
public boolean isClosed()
Description copied from interface:IWay
Determines if this way is closed.
-
isArea
public boolean isArea()
Determines if this way denotes an area (closed way with at least three distinct nodes).- Returns:
true
if this way is closed and contains at least three distinct nodes- Since:
- 5490
- See Also:
isClosed()
-
lastNode
public Node lastNode()
Description copied from interface:IWay
Returns the last node of this way. The result equals
.getNode
(getNodesCount
- 1)
-
firstNode
public Node firstNode()
Description copied from interface:IWay
Returns the first node of this way. The result equalsgetNode
(0)
.
-
isFirstLastNode
public boolean isFirstLastNode(INode n)
Description copied from interface:IWay
Replies true if the given node is the first or the last one of this way, false otherwise.- Specified by:
isFirstLastNode
in interfaceIWay<Node>
- Parameters:
n
- The node to test- Returns:
- true if the
n
is the first or the last node, false otherwise.
-
isInnerNode
public boolean isInnerNode(INode n)
Description copied from interface:IWay
Replies true if the given node is an inner node of this way, false otherwise.- Specified by:
isInnerNode
in interfaceIWay<Node>
- Parameters:
n
- The node to test- Returns:
- true if the
n
is an inner node, false otherwise.
-
getType
public OsmPrimitiveType getType()
Description copied from interface:PrimitiveId
Gets the type of object represented by this object. Note that this should return the base primitive type (OsmPrimitiveType.NODE
,OsmPrimitiveType.WAY
, andOsmPrimitiveType.RELATION
).- Specified by:
getType
in interfacePrimitiveId
- Returns:
- the object type
- See Also:
Node
,Way
,Relation
-
getDisplayType
public OsmPrimitiveType getDisplayType()
Description copied from interface:IPrimitive
Gets the type this primitive is displayed at- Specified by:
getDisplayType
in interfaceIPrimitive
- Returns:
- A
OsmPrimitiveType
-
checkNodes
private void checkNodes()
-
fireNodesChanged
private void fireNodesChanged()
-
setDataset
void setDataset(DataSet dataSet)
Description copied from class:OsmPrimitive
This method should never ever by called from somewhere else than Dataset.addPrimitive or removePrimitive methods- Overrides:
setDataset
in classOsmPrimitive
- Parameters:
dataSet
- the parent dataset
-
getBBox
public BBox getBBox()
Description copied from interface:IPrimitive
Fetches the bounding box of the primitive. Since 17752, the returned bounding box might be immutable, i.e., modifying calls throw anUnsupportedOperationException
.- Specified by:
getBBox
in interfaceIPrimitive
- Specified by:
getBBox
in interfaceIQuadBucketType
- Returns:
- Bounding box of the object
-
addToBBox
protected void addToBBox(BBox box, java.util.Set<PrimitiveId> visited)
Description copied from class:OsmPrimitive
If necessary, extend the bbox to contain this primitive- Specified by:
addToBBox
in classOsmPrimitive
- Parameters:
box
- a bbox instancevisited
- a set of visited members or null
-
updatePosition
public void updatePosition()
Description copied from class:OsmPrimitive
Called by Dataset to update cached position information of primitive (bbox, cached EarthNorth, ...)- Specified by:
updatePosition
in classOsmPrimitive
-
hasIncompleteNodes
public boolean hasIncompleteNodes()
Description copied from interface:IWay
Replies true if this way has incomplete nodes, false otherwise.- Specified by:
hasIncompleteNodes
in interfaceIWay<Node>
- Returns:
- true if this way has incomplete nodes, false otherwise.
-
hasOnlyLocatableNodes
public boolean hasOnlyLocatableNodes()
Replies true if all nodes of the way have known lat/lon, false otherwise.- Returns:
- true if all nodes of the way have known lat/lon, false otherwise
- Since:
- 13033
-
isUsable
public boolean isUsable()
Description copied from interface:IPrimitive
Repliestrue
, if the object is usable (i.e. complete and not deleted).- Specified by:
isUsable
in interfaceIPrimitive
- Overrides:
isUsable
in classAbstractPrimitive
- Returns:
true
, if the object is usable.- See Also:
IPrimitive.setDeleted(boolean)
-
isDrawable
public boolean isDrawable()
Description copied from interface:IPrimitive
Determines if this object is drawable.A primitive is drawable if all conditions are met:
- type and id is known
- tags are known
- it is not deleted
- it is not hidden by a filter
- for nodes: lat/lon are known
- for ways: all nodes are known and complete
- for relations: all members are known and complete
- Specified by:
isDrawable
in interfaceIPrimitive
- Overrides:
isDrawable
in classAbstractPrimitive
- Returns:
true
if this object is drawable
-
getLength
public double getLength()
Replies the length of the way, in metres, as computed byILatLon.greatCircleDistance(org.openstreetmap.josm.data.coor.ILatLon)
.- Returns:
- The length of the way, in metres
- Since:
- 4138
-
getSegmentLengths
public double[] getSegmentLengths()
Replies the segment lengths of the way as computed byILatLon.greatCircleDistance(org.openstreetmap.josm.data.coor.ILatLon)
.- Returns:
- The segment lengths of a way in metres, following way direction
- Since:
- 18553
-
getLongestSegmentLength
public double getLongestSegmentLength()
Replies the length of the longest segment of the way, in metres, as computed byILatLon.greatCircleDistance(org.openstreetmap.josm.data.coor.ILatLon)
.- Returns:
- The length of the segment, in metres
- Since:
- 8320
-
segmentLengths
private java.util.stream.DoubleStream segmentLengths()
Get the segment lengths as a stream- Returns:
- The stream of segment lengths (ordered)
-
isOneway
public int isOneway()
Tests if this way is a oneway.- Returns:
1
if the way is a oneway,-1
if the way is a reversed oneway,0
otherwise.- Since:
- 5199
-
firstNode
public Node firstNode(boolean respectOneway)
Replies the first node of this way, respecting or not its oneway state.- Parameters:
respectOneway
- If true and if this way is a reversed oneway, replies the last node. Otherwise, replies the first node.- Returns:
- the first node of this way, according to
respectOneway
and its oneway state. - Since:
- 5199
-
lastNode
public Node lastNode(boolean respectOneway)
Replies the last node of this way, respecting or not its oneway state.- Parameters:
respectOneway
- If true and if this way is a reversed oneway, replies the first node. Otherwise, replies the last node.- Returns:
- the last node of this way, according to
respectOneway
and its oneway state. - Since:
- 5199
-
concernsArea
public boolean concernsArea()
Description copied from class:OsmPrimitive
Determines if this primitive semantically concerns an area.- Specified by:
concernsArea
in classOsmPrimitive
- Returns:
true
if this primitive semantically concerns an area, according to its type, geometry and tags,false
otherwise.
-
isOutsideDownloadArea
public boolean isOutsideDownloadArea()
Description copied from class:OsmPrimitive
Tests if this primitive lies outside of the downloaded area of itsDataSet
.- Specified by:
isOutsideDownloadArea
in classOsmPrimitive
- Returns:
true
if this primitive lies outside of the downloaded area
-
keysChangedImpl
protected void keysChangedImpl(java.util.Map<java.lang.String,java.lang.String> originalKeys)
Description copied from class:AbstractPrimitive
What to do, when the tags have changed by one of the tag-changing methods.- Overrides:
keysChangedImpl
in classOsmPrimitive
- Parameters:
originalKeys
- original tags
-
clearCachedNodeStyles
public void clearCachedNodeStyles()
Clears all cached styles for all nodes of this way. This should not be called from outside.- See Also:
Stylable.clearCachedStyle()
-
getAngles
public java.util.List<Pair<java.lang.Double,Node>> getAngles()
Returns angles of vertices.- Returns:
- angles of the way
- Since:
- 13670
-
getIdGenerator
public UniqueIdGenerator getIdGenerator()
Description copied from class:AbstractPrimitive
Returns the unique identifier generator.- Specified by:
getIdGenerator
in classAbstractPrimitive
- Returns:
- the unique identifier generator
-
-