Package org.osm2world.core.map_data.data

Examples of org.osm2world.core.map_data.data.MapElement


    if (node.getTags().containsKey("ele")
        && node.getRepresentations().isEmpty()) {
     
      boolean isInGroundSegment = false;
      for (MapSegment segment : node.getConnectedSegments()) {
        MapElement element;
        if (segment instanceof MapWaySegment) {
          element = (MapWaySegment)segment;
        } else {
          element = ((MapAreaSegment)segment).getArea();
        }
        if (element.getPrimaryRepresentation() != null
            && element.getPrimaryRepresentation().getGroundState()
              == GroundState.ON) {
          isInGroundSegment = true;
          break;
        }
      }
View Full Code Here


        boolean drawBuildingWindows) {
     
      this.area = area;
     
      for (MapOverlap<?,?> overlap : area.getOverlaps()) {
        MapElement other = overlap.getOther(area);
        if (other instanceof MapArea
            && other.getTags().containsKey("building:part")) {
         
          MapArea otherArea = (MapArea)other;
         
          //TODO: check whether the building contains the part (instead of just touching it)
          if (area.getPolygon().contains(
View Full Code Here

     
      VectorXZ explicitPinPosition = null;
     
      for (MapOverlap<?, ?> overlap : area.getOverlaps()) {
       
        MapElement other = overlap.getOther(area);
       
        if (other.getTags().contains("golf","pin")
            && other instanceof MapNode) {
         
          explicitPinPosition = ((MapNode)other).getPos();
         
          break;
View Full Code Here

      }
     
      /* start an object with the object's class
       * and the underlying OSM element's name/ref tags */
     
      MapElement element = object.getPrimaryMapElement();
      OSMElement osmElement;
      if (element instanceof MapNode) {
        osmElement = ((MapNode) element).getOsmNode();
      } else if (element instanceof MapWaySegment) {
        osmElement = ((MapWaySegment) element).getOsmWay();
View Full Code Here

         * that overlap with the building */
       
        List<TerrainBoundaryWorldObject> tbWorldObjects = new ArrayList<TerrainBoundaryWorldObject>();
               
        for (MapOverlap<?,?> overlap : area.getOverlaps()) {
          MapElement other = overlap.getOther(area);
          if (other.getPrimaryRepresentation() instanceof TerrainBoundaryWorldObject
              && other.getPrimaryRepresentation().getGroundState() == GroundState.ON
              && (other.getTags().contains("tunnel", "passage")
                  || other.getTags().contains("tunnel", "building_passage"))) {
            tbWorldObjects.add((TerrainBoundaryWorldObject)
                other.getPrimaryRepresentation());
          }
        }
       
        /* render building parts where the building polygon does not overlap with terrain boundaries */
       
 
View Full Code Here

    /* ensure a minimum vertical distance to ways and areas below,
     * at intersections */
   
    for (MapOverlap<?,?> overlap : segment.getOverlaps()) {
     
      MapElement other = overlap.getOther(segment);
      WorldObject otherWO = other.getPrimaryRepresentation();
     
      if (otherWO == null
          || otherWO.getGroundState() != ON//TODO remove the ground state check
        continue;
     
View Full Code Here

TOP

Related Classes of org.osm2world.core.map_data.data.MapElement

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.