Modifier and Type | Class and Description |
---|---|
static class |
GenericTaggedNode.ExtendedGTNAttr
This enumeration identifies all the extended attributes that can be associated
with a GenericTaggedNode.
|
Modifier and Type | Field and Description |
---|---|
java.lang.Object[] |
decodedtagArray
An array containing tags of rendering-useful values (indexed by key ordinal) extracted from the XML OSM representation.
|
java.util.List<AmenityType> |
extraAmenities
Optional List of additional AmenityTypes if this GenericTaggedNode has more than
one amenity associated with it.
|
static short |
FIXME
Flag bit indicating Node or Way is defective and needs correcting in the OpenStreetMap database. |
static java.lang.Short |
FIXME_OBJ
Short Object form of FIXME flag (used to avoid inefficient autoboxing).
|
short |
flags
Bitmask of flags representing important boolean conditions about this dataset object.
|
int |
flags2
Bitmask of extended flags representing less-important boolean conditions about this dataset object.
|
static int |
FLAGS2_BOGUS
Extended
flags2 bit indicating this is a bogus map element used to control map rendering (such as the
artificial line at 85 degrees 3 minutes South latitude to prevent broken rendering of Antarctica in
Mercator projection). |
static java.lang.Integer |
FLAGS2_BOGUS_OBJ
Integer object form of
FLAGS2_BOGUS for efficiency in passing from SupportedTagKeys . |
static int |
FLAGS2_FEE
Extended
flags2 bit indicating this map element charges a usage fee. |
static java.lang.Integer |
FLAGS2_FEE_OBJ
Integer object form of
FLAGS2_FEE for efficiency in passing from SupportedTagKeys . |
static int |
FLAGS2_FLOOD_PRONE
Extended
flags2 bit indicating this map element is prone to flooding. |
static java.lang.Integer |
FLAGS2_FLOOD_PRONE_OBJ
Integer object form of
FLAGS2_FLOOD_PRONE for efficiency in passing from SupportedTagKeys . |
static int |
FLAGS2_HAS_POSTALADDR
Extended
flags2 bit indicating Node or Way has a postal address associated with it. |
static int |
FLAGS2_INTERMITTENT
Extended
flags2 bit indicating this map element does not exist all year round. |
static java.lang.Integer |
FLAGS2_INTERMITTENT_OBJ
Integer object form of
FLAGS2_INTERMITTENT for efficiency in passing from SupportedTagKeys . |
static int |
FLAGS2_IS_LIT
Extended
flags2 bit indicating Node or Way has artificial illumination. |
static java.lang.Integer |
FLAGS2_IS_LIT_OBJ
Integer Object form of
FLAGS2_IS_LIT flag (used to avoid inefficient autoboxing). |
static int |
FLAGS2_UNDERGROUND
Extended
flags2 bit indicating this map element is underground. |
static int |
FLAGS2_WHEELCHAIR_ACCESSIBLE
Extended
flags2 bit indicating this map element is wheelchair-accessible (US ADA compliant). |
static java.lang.Integer |
FLAGS2_WHEELCHAIR_ACCESSIBLE_OBJ
Integer object form of
FLAGS2_WHEELCHAIR_ACCESSIBLE for efficiency in passing from SupportedTagKeys . |
static int |
HAS_COLOR
Non-standard flag bit used to indicate that AmenityType flagged with this has a '*' in the image file name that
should be replaced with the enum name of its
OSMLayerEnum.color value (if any). |
static short |
HAS_ID
Flag bit indicating Node or Way has an ID number (should always be set). |
static short |
HAS_ID64
Flag bit indicating Node has a 64-bit-long ID number. |
static short |
HAS_INTERNET_ACCESS
Flag bit indicating the Node or Way provides public Internet service. |
static java.lang.Short |
HAS_INTERNET_ACCESS_OBJ
Short Object form of HAS_INTERNET_ACCESS flag (used to avoid inefficient autoboxing).
|
static short |
HAS_TOLL
Flag bit indicating toll is charged to travel the Way. |
static java.lang.Short |
HAS_TOLL_OBJ
Short Object form of HAS_TOLL
flag bit (used to avoid inefficient autoboxing). |
static short |
IS_AREA
Flag bit indicating Way is an enclosed area, |
static java.lang.Short |
IS_AREA_OBJ
Short Object form of IS_AREA flag (used to avoid inefficient autoboxing).
|
static short |
IS_BRIDGE
Flag bit indicating Way is a bridge above other features. |
static java.lang.Short |
IS_BRIDGE_OBJ
Short object form of IS_BRIDGE
flag bit (used to avoid inefficient autoboxing). |
static short |
IS_BUILDING
Flag bit indicating Way is a building, not open area. |
static java.lang.Short |
IS_BUILDING_OBJ
Short Object form of IS_BUILDING_flag (used to avoid inefficient autoboxing).
|
static short |
IS_DISUSED
Flag bit indicating associated amenity is no longer in use or is abandoned. |
static java.lang.Short |
IS_DISUSED_OBJ
Short Object form of IS_DISUSED flag (used to avoid inefficient autoboxing).
|
static short |
IS_HOLE
Flags bit indicating this map element is a hole in another closed area Way,
typically used for an inner Way in a Relation with inner and outer Ways. |
static short |
IS_INCOMPLETE
Flag bit indicating Way is missing vertices because of data cropping (either at import time
or when obtaining a partial OSM data file). |
static short |
IS_ISLAND
Flag bit indicating Way is the coastline of an island. |
static java.lang.Short |
IS_ISLAND_OBJ
Short Object form of IS_ISLAND flag (used to avoid inefficient autoboxing).
|
static short |
IS_ONEWAY
Flag bit indicating Way only permits traffic in one direction. |
static short |
IS_ONEWAY_BACKWARDS
Flag bit indicating Way only permits traffic in one direction, but the vertices are in reverse order. |
static java.lang.Short |
IS_ONEWAY_BACKWARDS_OBJ
Short Object form of IS_ONEWAY_BACKWARDS flag (used to avoid inefficient autoboxing).
|
static short |
IS_ONEWAY_OBJ
Short Object form of IS_ONEWAY
flag bit (used to avoid inefficient autoboxing). |
static short |
IS_TUNNEL
Flag bit indicating Way is a tunnel underneath other features. |
static java.lang.Short |
IS_TUNNEL_OBJ
Short Object form of IS_TUNNEL
flag bit (used to avoid inefficient autoboxing). |
static short |
IS_WATER
Flag bit indicating Way is a water object. |
static int |
MARINE
Non-standard flag bit used to indicate that AmenityType flagged with this should use marine zoom scales instead
of landside.
|
static short |
RENDERABLE_FLAGS
|
int |
segmentNum
Index used only by OSM importer to note whether this is a full Way or a tile segment of a Way.
|
Modifier | Constructor and Description |
---|---|
protected |
GenericTaggedNode()
Create a GenericTaggedNode (openStreetMap data) object.
|
Modifier and Type | Method and Description |
---|---|
void |
addAmenityType(AmenityType amenityType)
Add (possibly another) AmenityType to this GenericTaggedNode.
|
static int |
compareGTNAttributes(GenericTaggedNode<?> gtn1,
GenericTaggedNode<?> gtn2)
Compare the attributes of 2 GenericTaggedNodes to see if one appears to be a more detailed version
of the other (assuming their other type-specific attributes are identical).
|
java.lang.String |
decodedTagArrayToString()
Stringify the tags attached to this GenericTaggedNode.
|
abstract T |
dup()
Create a deep copy of this Node.
|
void |
ensureElementHasTagArray()
Ensure that this GenericTaggedNode has a decodedtagArray element in it.
|
abstract java.lang.Number |
getId()
Return the ID of this OSM record as a sub-class of Number.
|
boolean |
hasDecodedTags()
Report whether this GenericTaggedNode has decoded tag values.
|
boolean |
hasThisAmenity(AmenityType amenityType)
Test if this GenericTaggedNode provides the specified
AmenityType . |
void |
putTag(OSMLayerEnum key,
java.lang.Object value)
Store a key-value pair in the tag map.
|
protected void |
readTags(java.io.DataInput dis)
Helper method for reading tags and flags in a common format from an input stream.
|
protected void |
readTags(NonshareableBufferedDataInputStream dis)
Helper method for reading tags and flags in a common format from an input stream.
|
void |
removeRedundantAmenityTypes()
Go through all the AmenityTypes this GenericTaggedNode has and remove the ones that are
more generic than other AmenityTypes associated with this object.
|
boolean |
replaceAmenityType(AmenityType oldAmenityType,
AmenityType newAmenityType)
Replace a specified AmenityType with the new (more specific) AmenityType in this GenericTaggedNode.
|
abstract void |
writeGPX(java.io.PrintStream ps)
Write this GenericTaggedNode to the specified stream as the XML tags one element in GPX schema format.
|
protected abstract void |
writeId(java.io.DataOutput dos)
Handle writing the ID field to the binary data stream (handles larger ID ranges in
varying subclasses).
|
protected void |
writeTags(java.io.DataOutput dos)
Helper method for writing tags and flags in a common format to an output stream.
|
public java.lang.Object[] decodedtagArray
public short flags
HAS_ID
,
HAS_ID64
,
HAS_INTERNET_ACCESS
,
HAS_TOLL
,
IS_AREA
,
IS_BRIDGE
,
IS_BUILDING
,
IS_DISUSED
,
IS_INCOMPLETE
,
IS_ISLAND
,
IS_HOLE
,
IS_ONEWAY
,
IS_ONEWAY_BACKWARDS
,
IS_TUNNEL
,
IS_WATER
,
FIXME
public transient int segmentNum
public int flags2
public java.util.List<AmenityType> extraAmenities
public static final short IS_AREA
Flag bit
indicating Way is an enclosed area,public static final java.lang.Short IS_AREA_OBJ
IS_AREA
public static final short IS_BUILDING
Flag bit
indicating Way is a building, not open area.public static final java.lang.Short IS_BUILDING_OBJ
IS_BUILDING
public static final short IS_WATER
Flag bit
indicating Way is a water object.public static final short HAS_TOLL
Flag bit
indicating toll is charged to travel the Way.public static final java.lang.Short HAS_TOLL_OBJ
flag bit
(used to avoid inefficient autoboxing).HAS_TOLL
public static final short IS_BRIDGE
Flag bit
indicating Way is a bridge above other features.public static final java.lang.Short IS_BRIDGE_OBJ
flag bit
(used to avoid inefficient autoboxing).IS_BRIDGE
public static final short IS_TUNNEL
Flag bit
indicating Way is a tunnel underneath other features.public static final java.lang.Short IS_TUNNEL_OBJ
flag bit
(used to avoid inefficient autoboxing).IS_TUNNEL
public static final short IS_ONEWAY
Flag bit
indicating Way only permits traffic in one direction.public static final short IS_ONEWAY_OBJ
flag bit
(used to avoid inefficient autoboxing).IS_ONEWAY
,
Constant Field Valuespublic static final short IS_ONEWAY_BACKWARDS
Flag bit
indicating Way only permits traffic in one direction, but the vertices are in reverse order.public static final java.lang.Short IS_ONEWAY_BACKWARDS_OBJ
IS_ONEWAY_BACKWARDS
public static final short HAS_INTERNET_ACCESS
Flag bit
indicating the Node or Way provides public Internet service.public static final java.lang.Short HAS_INTERNET_ACCESS_OBJ
HAS_INTERNET_ACCESS
public static final short IS_ISLAND
Flag bit
indicating Way is the coastline of an island.public static final java.lang.Short IS_ISLAND_OBJ
IS_ISLAND
public static final short IS_DISUSED
Flag bit
indicating associated amenity is no longer in use or is abandoned.public static final java.lang.Short IS_DISUSED_OBJ
IS_DISUSED
public static final short IS_HOLE
Flags bit
indicating this map element is a hole in another closed area Way,
typically used for an inner Way in a Relation with inner and outer Ways.public static final short HAS_ID
Flag bit
indicating Node or Way has an ID number (should always be set).public static final short IS_INCOMPLETE
Flag bit
indicating Way is missing vertices because of data cropping (either at import time
or when obtaining a partial OSM data file).public static final short HAS_ID64
Flag bit
indicating Node has a 64-bit-long ID number.public static final short FIXME
Flag bit
indicating Node or Way is defective and needs correcting in the OpenStreetMap database.public static final java.lang.Short FIXME_OBJ
public static final int MARINE
public static final int HAS_COLOR
OSMLayerEnum.color
value (if any).public static final int FLAGS2_BOGUS
flags2 bit
indicating this is a bogus map element used to control map rendering (such as the
artificial line at 85 degrees 3 minutes South latitude to prevent broken rendering of Antarctica in
Mercator projection).public static final java.lang.Integer FLAGS2_BOGUS_OBJ
FLAGS2_BOGUS
for efficiency in passing from SupportedTagKeys
.public static final int FLAGS2_UNDERGROUND
flags2 bit
indicating this map element is underground.public static final int FLAGS2_WHEELCHAIR_ACCESSIBLE
flags2 bit
indicating this map element is wheelchair-accessible (US ADA compliant).public static final java.lang.Integer FLAGS2_WHEELCHAIR_ACCESSIBLE_OBJ
FLAGS2_WHEELCHAIR_ACCESSIBLE
for efficiency in passing from SupportedTagKeys
.public static final int FLAGS2_INTERMITTENT
flags2 bit
indicating this map element does not exist all year round.public static final java.lang.Integer FLAGS2_INTERMITTENT_OBJ
FLAGS2_INTERMITTENT
for efficiency in passing from SupportedTagKeys
.public static final int FLAGS2_FLOOD_PRONE
flags2 bit
indicating this map element is prone to flooding.public static final java.lang.Integer FLAGS2_FLOOD_PRONE_OBJ
FLAGS2_FLOOD_PRONE
for efficiency in passing from SupportedTagKeys
.public static final int FLAGS2_FEE
flags2 bit
indicating this map element charges a usage fee.public static final java.lang.Integer FLAGS2_FEE_OBJ
FLAGS2_FEE
for efficiency in passing from SupportedTagKeys
.public static final int FLAGS2_IS_LIT
flags2 bit
indicating Node or Way has artificial illumination.public static final java.lang.Integer FLAGS2_IS_LIT_OBJ
FLAGS2_IS_LIT
flag (used to avoid inefficient autoboxing).public static final int FLAGS2_HAS_POSTALADDR
flags2 bit
indicating Node or Way has a postal address associated with it.
Should not be stored in files, but only used to guide way segmenter to keep addressed Ways even if they
don't otherwise seem to have a reason to be kept.public static final short RENDERABLE_FLAGS
flags
where if any of these bits are set, the Way or Node is renderable,
even without a WayType
.protected GenericTaggedNode()
protected abstract void writeId(java.io.DataOutput dos) throws java.io.IOException
dos
- DataOutput to use to append the binary ID valuejava.io.IOException
- if write fails for any reasonpublic abstract java.lang.Number getId()
protected final void writeTags(java.io.DataOutput dos) throws java.io.IOException
dos
- DataOutput implementing object to write the tags and flags tojava.io.IOException
- if the write failed for any reasonprotected final void readTags(java.io.DataInput dis) throws java.io.IOException
dis
- DataInput implementing object to read the tags and flags fromjava.io.IOException
- if the read failed for any reasonprotected final void readTags(NonshareableBufferedDataInputStream dis) throws java.io.IOException
dis
- NonshareableBufferedDataInputStream implementing object to read the tags and flags fromjava.io.IOException
- if the read failed for any reasonpublic void putTag(OSMLayerEnum key, java.lang.Object value)
key
- OSMLayerEnum identifying the tag attributevalue
- value of the attributepublic final boolean hasDecodedTags()
public java.lang.String decodedTagArrayToString()
public void ensureElementHasTagArray()
public final void addAmenityType(AmenityType amenityType)
amenityType
- AmenityType to add to the amenities provided by this GenericTaggedNodepublic final boolean replaceAmenityType(AmenityType oldAmenityType, AmenityType newAmenityType)
oldAmenityType
- AmenityType to overwrite with the newAmenityTypenewAmenityType
- AmenityType to add to the amenities provided by this GenericTaggedNodepublic final boolean hasThisAmenity(AmenityType amenityType)
AmenityType
.amenityType
- AmenityType to test forpublic void removeRedundantAmenityTypes()
public static int compareGTNAttributes(GenericTaggedNode<?> gtn1, GenericTaggedNode<?> gtn2)
gtn1
- first GenericTaggedNode to testgtn2
- second GenericTaggedNode to testpublic abstract T dup()
public abstract void writeGPX(java.io.PrintStream ps)
ps
- PrintStream to write to