Esempio n. 1
0
 /**
  * @return true, if the way has a tag that forces a closed way to be a polygon line (instead of an
  *     area)
  */
 public boolean isForcePolygonLine() {
   if (!hasTags()) {
     return false;
   }
   OSMTagMapping mapping = OSMTagMapping.getInstance();
   for (short tag : this.tags) { // NOPMD by bross on 25.12.11 13:05
     if (mapping.getWayTag(tag).isForcePolygonLine()) {
       return true;
     }
   }
   return false;
 }
Esempio n. 2
0
 /**
  * Extracts known way tags and returns their ids.
  *
  * @param entity the way
  * @return the ids of the identified tags
  */
 public static short[] extractKnownWayTags(Entity entity) {
   TShortArrayList currentTags = new TShortArrayList();
   OSMTagMapping mapping = OSMTagMapping.getInstance();
   if (entity.getTags() != null) {
     for (Tag tag : entity.getTags()) {
       OSMTag wayTag = mapping.getWayTag(tag.getKey(), tag.getValue());
       if (wayTag != null) {
         currentTags.add(wayTag.getId());
       }
     }
   }
   return currentTags.toArray();
 }
Esempio n. 3
0
  /** @return true, if the way represents a coastline */
  public boolean isCoastline() {
    if (this.tags == null) {
      return false;
    }
    OSMTag tag;
    for (short tagID : this.tags) { // NOPMD by bross on 25.12.11 13:04
      tag = OSMTagMapping.getInstance().getWayTag(tagID);
      if (tag.isCoastline()) {
        return true;
      }
    }

    return false;
  }
Esempio n. 4
0
 /** @return the zoom level this entity appears first */
 public byte getMinimumZoomLevel() {
   return OSMTagMapping.getInstance().getZoomAppearWay(this.tags);
 }