Package org.openstreetmap.josm.plugins.graphview.core.data

Examples of org.openstreetmap.josm.plugins.graphview.core.data.TagGroup


public class BarrierModule extends AbstractModule {
 
  @Override
  protected void applyToWaySegment(MapWaySegment line) {

    TagGroup tags = line.getTags();
    if (!tags.containsKey("barrier")) return; //fast exit for common case
   
    if (Wall.fits(tags)) {
      line.addRepresentation(new Wall(line));
    } else if (CityWall.fits(tags)) {
      line.addRepresentation(new CityWall(line));
View Full Code Here


  }
 
  @Override
  protected void applyToNode(MapNode node) {

    TagGroup tags = node.getTags();
    if (!tags.containsKey("barrier") && !tags.containsKey("power")) return; //fast exit for common case

    if (Bollard.fits(tags)) {
      node.addRepresentation(new Bollard(node, tags));
    }
View Full Code Here

  @Override
  protected void applyToArea(MapArea area) {
   
    if (!area.getRepresentations().isEmpty()) return;
   
    TagGroup tags = area.getTags();
   
    if (tags.containsKey("surface")) {
      area.addRepresentation(new SurfaceArea(area, tags.getValue("surface")));
    } else {
   
      for (Tag tagWithDefault : defaultSurfaceMap.keySet()) {
        if (tags.contains(tagWithDefault)) {
          area.addRepresentation(new SurfaceArea(
              area, defaultSurfaceMap.get(tagWithDefault)));
        }
      }
     
View Full Code Here

     * by the "building" key.
     */
    private void setAttributes(boolean useBuildingColors,
        boolean drawBuildingWindows) {
     
      TagGroup tags = area.getTags();
      TagGroup buildingTags = building.area.getTags();
     
      /* determine defaults for building type */
     
      int defaultLevels = 3;
      double defaultHeightPerLevel = 2.5;
View Full Code Here

    }
       
    public static boolean hasComplexRoof(MapArea area) {
      for (MapOverlap<?,?> overlap : area.getOverlaps()) {
        if (overlap instanceof MapOverlapWA) {
          TagGroup tags = overlap.e1.getTags();
          if (tags.contains("roof:ridge", "yes")
              || tags.contains("roof:edge", "yes")) {
            return true;
          }
        }
      }
      return false;
View Full Code Here

     
    }

    for (MapNode node : grid.getMapNodes()) {

      TagGroup tags = node.getOsmNode().tags;
     
      List<Road> connectedRoads = getConnectedRoads(node, false);
     
      if (connectedRoads.size() > 2) {
       
        node.addRepresentation(new RoadJunction(node));
       
      } else if (connectedRoads.size() == 2
          && tags.contains("highway", "crossing")
          && !tags.contains("crossing", "no")) {
       
        node.addRepresentation(new RoadCrossingAtConnector(node));
       
      } else if (connectedRoads.size() == 2) {
       
View Full Code Here

          }
         

          //lane itself
         
          TagGroup tags = (laneTags != null)
              ? laneTags[i]
              : EMPTY_TAG_GROUP;
         
          layout.getLanes(roadPart).add(new Lane(this,
              VEHICLE_LANE, roadPart, tags));
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.plugins.graphview.core.data.TagGroup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.