Class OSMEntity

    • Field Detail

      • id

        protected final long id
      • version

        protected final int version
      • timestamp

        protected final long timestamp
      • changesetId

        protected final long changesetId
      • userId

        protected final int userId
      • tags

        protected final int[] tags
    • Constructor Detail

      • OSMEntity

        protected OSMEntity​(long id,
                            int version,
                            long timestamp,
                            long changesetId,
                            int userId,
                            int[] tags)
        Constructor for a OSMEntity. Holds the basic information, every OSM-Object has.
        id - ID
        version - Version. Versions <=0 define visible Entities, >0 deleted Entities.
        timestamp - Timestamp in seconds since 01.01.1970 00:00:00 UTC.
        changesetId - Changeset-ID
        userId - UserID
        tags - An array of OSHDB key-value ids. The format is [KID1,VID1,KID2,VID2...KIDn,VIDn].
    • Method Detail

      • getId

        public long getId()
      • getType

        public abstract OSMType getType()
      • getVersion

        public int getVersion()
      • getChangesetId

        public long getChangesetId()
      • getUserId

        public int getUserId()
      • isVisible

        public boolean isVisible()
      • getTags

        public Iterable<OSHDBTag> getTags()
        Returns a "view" of the current osm tags.
      • getRawTags

        public int[] getRawTags()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • hasTagKey

        public boolean hasTagKey​(OSHDBTagKey key)
      • hasTagKey

        public boolean hasTagKey​(int key)
        Test this OSMEntity if it contains a certain tag key(integer).
      • hasTagKeyExcluding

        public boolean hasTagKeyExcluding​(int key,
                                          int[] uninterestingValues)
        Tests if any a given key is present but ignores certain values. Useful when looking for example "TagKey" != "no"
        key - the key to search for
        uninterestingValues - list of values, that should return false although the key is actually present
        true if the key is present and is NOT in a combination with the given values, false otherwise
      • hasTagValue

        public boolean hasTagValue​(int key,
                                   int value)
        Test for a certain key/value combination.
      • hashCode

        public int hashCode()
        hashCode in class Object