Package org.osm2world.core.map_data.data

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


  }

  @Override
  public void actionPerformed(ActionEvent e) {

    MapData mapData = data.getConversionResults().getMapData();

    VectorXZ camLookAt = mapData.getCenter();

    renderOptions.camera = new Camera();
    renderOptions.camera.setCamera(camLookAt.x, 1000, camLookAt.z-1000,
                                       camLookAt.x, 0, camLookAt.z);
   
View Full Code Here


    final List<MapWaySegment> mapWaySegs = new ArrayList<MapWaySegment>();
    final List<MapArea> mapAreas = new ArrayList<MapArea>();
   
    createMapElements(osmData, mapNodes, mapWaySegs, mapAreas);
   
    MapData mapData = new MapData(mapNodes, mapWaySegs, mapAreas,
        calculateFileBoundary(osmData.getBounds()));
   
    calculateIntersectionsInMapData(mapData);

    return mapData;
View Full Code Here

   
    OriginMapProjection mapProjection = mapProjectionFactory.make();
    mapProjection.setOrigin(osmData);
   
    OSMToMapDataConverter converter = new OSMToMapDataConverter(mapProjection);
    MapData mapData = converter.createMapData(osmData);
   
    /* apply world modules */
    updatePhase(Phase.REPRESENTATION);
   
    if (worldModules == null) {
View Full Code Here

   * test code for a group multipolygon test files which
   * represent the same case with different multipolygon variants
   */
  private void genericMultipolygonTest(String filename) throws IOException {
   
    MapData mapData = loadMapData(filename);
   
    assertSame(13, mapData.getMapNodes().size());
    assertSame(0, mapData.getMapWaySegments().size());
    assertSame(1, mapData.getMapAreas().size());
   
    MapArea area = mapData.getMapAreas().iterator().next();

    assertSame(2, area.getHoles().size());
    assertSame(6, area.getOuterPolygon().size());
    assertSame(13, area.getAreaSegments().size());
   
View Full Code Here

    OSMData osmData = new OsmosisReader(testFile).getData();
    OriginMapProjection mapProjection = new MetricMapProjection();
    mapProjection.setOrigin(osmData);
   
    OSMToMapDataConverter converter = new OSMToMapDataConverter(mapProjection);
    MapData mapData = converter.createMapData(osmData);
   
    /* check coastline properties */
   
    List<MapArea> waterAreas = new ArrayList<MapArea>();

    for (MapArea area : mapData.getMapAreas()) {
      if (area.getTags().contains("natural", "water")) {
        waterAreas.add(area);
      }
    }
   
View Full Code Here

   * reads two nodes with the same coordinates
   */
  @Test
  public void testSameCoordNodes() throws IOException {
   
    MapData mapData = loadMapData("sameCoordNodes.osm");
   
    assertSame(2, mapData.getMapNodes().size());
   
    MapNode[] nodes = mapData.getMapNodes().toArray(new MapNode[2]);
    assertNotSame(nodes[0].getOsmNode().id, nodes[1].getOsmNode().id);
   
  }
View Full Code Here

   * reads a self intersecting polygon (can be filtered, but must not crash)
   */
  @Test
  public void testSelfIntersection() throws IOException {
   
    MapData mapData = loadMapData("self_intersection.osm");
   
  }
View Full Code Here

TOP

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

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.