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 BBoxbboxprivate static Node[]EMPTY_NODES(package private) static UniqueIdGeneratoridGeneratorprivate Node[]nodesAll 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 newWaywith id 0.Way(long id)Constructs a newWayfor the given id.Way(long id, boolean allowNegative)Way(long id, int version)Constructs a newWaywith given id and version.Way(Way original)Constructs a newWayfrom an existingWay(including its id).Way(Way original, boolean clearMetadata)Constructs a newWayfrom an existingWay.Way(Way original, boolean clearMetadata, boolean copyNodes)Constructs a newWayfrom an existingWay.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(OsmPrimitiveVisitor visitor)Implementation of the visitor scheme.voidaccept(PrimitiveVisitor visitor)Makes the given visitor visit this primitive.voidaddNode(int offs, Node n)Adds a node at position offs.voidaddNode(Node n)Adds a node to the end of the list of nodes.protected voidaddToBBox(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 ofnodesfrom this way.private voidcheckNodes()voidclearCachedNodeStyles()Clears all cached styles for all nodes of this way.voidcloneFrom(OsmPrimitive osm, boolean copyNodes)Get and write all attributes from the parameter.booleanconcernsArea()Determines if this primitive semantically concerns an area.booleancontainsNode(Node node)Replies true if this way contains the nodenode, false otherwise.private voidfireNodesChanged()NodefirstNode()Returns the first node of this way.NodefirstNode(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.BBoxgetBBox()Fetches the bounding box of the primitive.OsmPrimitiveTypegetDisplayType()Gets the type this primitive is displayed atUniqueIdGeneratorgetIdGenerator()Returns the unique identifier generator.doublegetLength()Replies the length of the way, in metres, as computed byILatLon.greatCircleDistance(org.openstreetmap.josm.data.coor.ILatLon).doublegetLongestSegmentLength()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 tonodeNodegetNode(int index)Replies the node at positionindex.longgetNodeId(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 orderedListof chunks of this way.java.util.List<Node>getNodes()Returns the list of nodes in this way.intgetNodesCount()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).OsmPrimitiveTypegetType()Gets the type of object represented by this object.booleanhasEqualSemanticAttributes(OsmPrimitive other, boolean testInterestingTagsOnly)booleanhasIncompleteNodes()Replies true if this way has incomplete nodes, false otherwise.booleanhasOnlyLocatableNodes()Replies true if all nodes of the way have known lat/lon, false otherwise.booleanisArea()Determines if this way denotes an area (closed way with at least three distinct nodes).booleanisClosed()Determines if this way is closed.booleanisDrawable()Determines if this object is drawable.booleanisFirstLastNode(INode n)Replies true if the given node is the first or the last one of this way, false otherwise.booleanisInnerNode(INode n)Replies true if the given node is an inner node of this way, false otherwise.intisOneway()Tests if this way is a oneway.booleanisOutsideDownloadArea()Tests if this primitive lies outside of the downloaded area of itsDataSet.booleanisUsable()Repliestrue, if the object is usable (i.e.protected voidkeysChangedImpl(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.NodelastNode()Returns the last node of this way.NodelastNode(boolean respectOneway)Replies the last node of this way, respecting or not its oneway state.voidload(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.voidremoveNode(Node n)Removes the givenNodefrom this way.voidremoveNodes(java.util.Set<? extends Node> selection)Removes the given set ofnodesfrom this way.WayDatasave()Save parameters of this primitive to the transport objectprivate java.util.stream.DoubleStreamsegmentLengths()Get the segment lengths as a streamprivate voidsetBBox(BBox bbox)(package private) voidsetDataset(DataSet dataSet)This method should never ever by called from somewhere else than Dataset.addPrimitive or removePrimitive methodsvoidsetDeleted(boolean deleted)Sets whether this primitive is deleted or not.voidsetNodes(java.util.List<Node> nodes)Set new list of nodes to way.java.lang.StringtoString()voidupdatePosition()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 newWaywith id 0.- Since:
- 86
-
Way
public Way(Way original, boolean clearMetadata, boolean copyNodes)
Constructs a newWayfrom an existingWay. This adds links from all way nodes to the clone. See #19885 for possible memory leaks.- Parameters:
original- The originalWayto 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 newWayfrom an existingWay. This adds links from all way nodes to the clone. See #19885 for possible memory leaks.- Parameters:
original- The originalWayto 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 newWayfrom an existingWay(including its id). This adds links from all way nodes to the clone. See #19885 for possible memory leaks.- Parameters:
original- The originalWayto be identically cloned. Must not be null- Since:
- 86
-
Way
public Way(long id)
Constructs a newWayfor 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 newWaywith 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:IWayReturns the list of nodes in this way.
-
setNodes
public void setNodes(java.util.List<Node> nodes)
Description copied from interface:IWaySet 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:
nodeswith consecutive identical nodes removed
-
getNodesCount
public int getNodesCount()
Description copied from interface:IWayReplies the number of nodes in this way.- Specified by:
getNodesCountin interfaceIWay<Node>- Returns:
- the number of nodes in this way.
-
getNode
public Node getNode(int index)
Description copied from interface:IWayReplies the node at positionindex.
-
getNodeId
public long getNodeId(int idx)
Description copied from interface:IWayReturns id of the node at given index.
-
getNodeIds
public java.util.List<java.lang.Long> getNodeIds()
Description copied from interface:IWayReturns the list of node ids in this way.- Specified by:
getNodeIdsin 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 ifnodeis 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:OsmPrimitiveImplementation of the visitor scheme. Subclasses have to call the correct visitor function.- Specified by:
acceptin classOsmPrimitive- Parameters:
visitor- The visitor from which the visit() function must be called.
-
accept
public void accept(PrimitiveVisitor visitor)
Description copied from interface:IPrimitiveMakes the given visitor visit this primitive.- Specified by:
acceptin interfaceIPrimitive- Parameters:
visitor- visitor
-
load
public void load(PrimitiveData data)
Description copied from class:OsmPrimitiveLoads (clone) this primitive from provided PrimitiveData- Overrides:
loadin classOsmPrimitive- Parameters:
data- The object which should be cloned
-
save
public WayData save()
Description copied from class:OsmPrimitiveSave parameters of this primitive to the transport object- Specified by:
savein classOsmPrimitive- Returns:
- The saved object data
-
cloneFrom
public void cloneFrom(OsmPrimitive osm, boolean copyNodes)
Description copied from class:OsmPrimitiveGet and write all attributes from the parameter. Does not fire any listener, so use this only in the data initializing phase- Overrides:
cloneFromin classOsmPrimitive- Parameters:
osm- other primitivecopyNodes- whether to copy child primitives too
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hasEqualSemanticAttributes
public boolean hasEqualSemanticAttributes(OsmPrimitive other, boolean testInterestingTagsOnly)
- Overrides:
hasEqualSemanticAttributesin classOsmPrimitive
-
removeNode
public void removeNode(Node n)
Removes the givenNodefrom 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 ofnodesfrom 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 ofnodesfrom 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:IPrimitiveSets whether this primitive is deleted or not.Also marks this primitive as modified if deleted is true.
- Specified by:
setDeletedin interfaceIPrimitive- Overrides:
setDeletedin classOsmPrimitive- Parameters:
deleted- true, if this primitive is deleted; false, otherwise
-
isClosed
public boolean isClosed()
Description copied from interface:IWayDetermines 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:
trueif this way is closed and contains at least three distinct nodes- Since:
- 5490
- See Also:
isClosed()
-
lastNode
public Node lastNode()
Description copied from interface:IWayReturns the last node of this way. The result equals.getNode(getNodesCount- 1)
-
firstNode
public Node firstNode()
Description copied from interface:IWayReturns the first node of this way. The result equalsgetNode(0).
-
isFirstLastNode
public boolean isFirstLastNode(INode n)
Description copied from interface:IWayReplies true if the given node is the first or the last one of this way, false otherwise.- Specified by:
isFirstLastNodein interfaceIWay<Node>- Parameters:
n- The node to test- Returns:
- true if the
nis the first or the last node, false otherwise.
-
isInnerNode
public boolean isInnerNode(INode n)
Description copied from interface:IWayReplies true if the given node is an inner node of this way, false otherwise.- Specified by:
isInnerNodein interfaceIWay<Node>- Parameters:
n- The node to test- Returns:
- true if the
nis an inner node, false otherwise.
-
getType
public OsmPrimitiveType getType()
Description copied from interface:PrimitiveIdGets 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:
getTypein interfacePrimitiveId- Returns:
- the object type
- See Also:
Node,Way,Relation
-
getDisplayType
public OsmPrimitiveType getDisplayType()
Description copied from interface:IPrimitiveGets the type this primitive is displayed at- Specified by:
getDisplayTypein interfaceIPrimitive- Returns:
- A
OsmPrimitiveType
-
checkNodes
private void checkNodes()
-
fireNodesChanged
private void fireNodesChanged()
-
setDataset
void setDataset(DataSet dataSet)
Description copied from class:OsmPrimitiveThis method should never ever by called from somewhere else than Dataset.addPrimitive or removePrimitive methods- Overrides:
setDatasetin classOsmPrimitive- Parameters:
dataSet- the parent dataset
-
getBBox
public BBox getBBox()
Description copied from interface:IPrimitiveFetches the bounding box of the primitive. Since 17752, the returned bounding box might be immutable, i.e., modifying calls throw anUnsupportedOperationException.- Specified by:
getBBoxin interfaceIPrimitive- Specified by:
getBBoxin interfaceIQuadBucketType- Returns:
- Bounding box of the object
-
addToBBox
protected void addToBBox(BBox box, java.util.Set<PrimitiveId> visited)
Description copied from class:OsmPrimitiveIf necessary, extend the bbox to contain this primitive- Specified by:
addToBBoxin classOsmPrimitive- Parameters:
box- a bbox instancevisited- a set of visited members or null
-
updatePosition
public void updatePosition()
Description copied from class:OsmPrimitiveCalled by Dataset to update cached position information of primitive (bbox, cached EarthNorth, ...)- Specified by:
updatePositionin classOsmPrimitive
-
hasIncompleteNodes
public boolean hasIncompleteNodes()
Description copied from interface:IWayReplies true if this way has incomplete nodes, false otherwise.- Specified by:
hasIncompleteNodesin 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:IPrimitiveRepliestrue, if the object is usable (i.e. complete and not deleted).- Specified by:
isUsablein interfaceIPrimitive- Overrides:
isUsablein classAbstractPrimitive- Returns:
true, if the object is usable.- See Also:
IPrimitive.setDeleted(boolean)
-
isDrawable
public boolean isDrawable()
Description copied from interface:IPrimitiveDetermines 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:
isDrawablein interfaceIPrimitive- Overrides:
isDrawablein classAbstractPrimitive- Returns:
trueif 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:
1if the way is a oneway,-1if the way is a reversed oneway,0otherwise.- 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
respectOnewayand 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
respectOnewayand its oneway state. - Since:
- 5199
-
concernsArea
public boolean concernsArea()
Description copied from class:OsmPrimitiveDetermines if this primitive semantically concerns an area.- Specified by:
concernsAreain classOsmPrimitive- Returns:
trueif this primitive semantically concerns an area, according to its type, geometry and tags,falseotherwise.
-
isOutsideDownloadArea
public boolean isOutsideDownloadArea()
Description copied from class:OsmPrimitiveTests if this primitive lies outside of the downloaded area of itsDataSet.- Specified by:
isOutsideDownloadAreain classOsmPrimitive- Returns:
trueif 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:AbstractPrimitiveWhat to do, when the tags have changed by one of the tag-changing methods.- Overrides:
keysChangedImplin 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:AbstractPrimitiveReturns the unique identifier generator.- Specified by:
getIdGeneratorin classAbstractPrimitive- Returns:
- the unique identifier generator
-
-