Examples of OSMData


Examples of org.osm2world.core.osm.data.OSMData

   
    List<OSMWay> ways = asList(
        new OSMWay(new MapBasedTagGroup(new Tag("power","line"), new Tag("cables","4")), 201, nodes)
        );
   
    OSMData osmData = new OSMData(EMPTY_LIST, nodes, ways, EMPTY_LIST);
   
    /* render to multiple targets */
   
    ConversionFacade cf = new ConversionFacade();
   
View Full Code Here

Examples of org.osm2world.core.osm.data.OSMData

   
    if (osmFile == null) {
      throw new IllegalArgumentException("osmFile must not be null");
    }
   
    OSMData osmData = null;
    boolean useJOSMHack = false;
   
    if (JOSMFileHack.isJOSMGenerated(osmFile)) {
      useJOSMHack = true;
    } else {
View Full Code Here

Examples of org.osm2world.core.osm.data.OSMData

  @Test
  public void testValidFile() throws IOException {
   
    File testFile = new File("test"+File.separator+"files"
        +File.separator+"validFile.osm");
    OSMData osmData = new OsmosisReader(testFile).getData();
   
    assertSame(4, osmData.getNodes().size());
    assertSame(1, osmData.getWays().size());
    assertSame(1, osmData.getRelations().size());
   
    List<OSMNode> wayNodes = osmData.getWays().iterator().next().nodes;
    assertSame(3, wayNodes.size());
   
    assertEquals("traffic_signals", wayNodes.get(1).tags.getValue("highway"));
   
    OSMRelation relation = osmData.getRelations().iterator().next();   
    assertEquals("associatedStreet", relation.tags.getValue("type"));
   
  }
View Full Code Here

Examples of org.osm2world.core.osm.data.OSMData

  private static MapData loadMapData(String filename) throws IOException {
   
    File testFile = new File("test"+File.separator+"files"
        +File.separator+filename);
   
    OSMData osmData = new OsmosisReader(testFile).getData();
    OriginMapProjection mapProjection = new MetricMapProjection();
    mapProjection.setOrigin(osmData);
   
    return new OSMToMapDataConverter(mapProjection).createMapData(osmData);
   
View Full Code Here

Examples of org.osm2world.core.osm.data.OSMData

    /* create map data */
   
    File testFile = new File("test"+File.separator+"files"
        +File.separator+filename);
   
    OSMData osmData = new OsmosisReader(testFile).getData();
    OriginMapProjection mapProjection = new MetricMapProjection();
    mapProjection.setOrigin(osmData);
   
    OSMToMapDataConverter converter = new OSMToMapDataConverter(mapProjection);
    MapData mapData = converter.createMapData(osmData);
View Full Code Here

Examples of org.osm2world.core.osm.data.OSMData

    }
  }
 
  @Override
  public OSMData getData() {
    return new OSMData(bounds, ownNodes, ownWays, ownRelations);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.