Examples of MapData


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

    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

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

   
    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

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

   * 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

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

    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

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

   * 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

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

   * 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

Examples of org.terrier.structures.indexing.singlepass.hadoop.MapData

    final int thisPartition = TaskAttemptID.forName(jc.get("mapred.task.id")).getTaskID().getId();
    final SplitEmittedTerm.SETPartitioner partitionChecker = new SplitEmittedTerm.SETPartitioner();
    partitionChecker.configure(jc);
   
   
    MapData tempHRD;
    for (FileStatus file : files)
    {
      //logger.info("Run data file "+ file.getPath().toString()+" has length "+Files.length(file.getPath().toString()));
      runDataIn = new DataInputStream(Files.openFileStream(file.getPath().toString()));
      tempHRD = new MapData(runDataIn);
      //check to see if this file contaned our split information
      if (mutipleIndices && partitionChecker.calculatePartition(tempHRD.getSplitnum(), jc.getNumReduceTasks()) != thisPartition)
        continue;
     
      mapTaskIDs.add(tempHRD.getMap());
      runData.add(tempHRD);
      runDataIn.close();
    }
    // Sort by splitnum
    Collections.sort(runData);
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.