Examples of OsmosisReader


Examples of crosby.binary.osmosis.OsmosisReader

            compression = resolveCompressionMethod(file);
        }

        RunnableSource reader;
        if (pbf) {
            reader = new OsmosisReader(dataIn);
        } else {
            reader = new org.locationtech.geogig.osm.internal.XmlReader(dataIn, true, compression);
        }

        final WorkingTree workTree = workingTree();
View Full Code Here

Examples of org.osm2world.core.osm.creation.OsmosisReader

    } else {
     
      /* try to read file using Osmosis */
     
      try {
        osmData = new OsmosisReader(osmFile).getData();
      } catch (IOException e) {
       
        System.out.println("could not read file," +
            " trying workaround for files created by JOSM");
       
        useJOSMHack = true;
             
      }
     
    }
   
    /* create a temporary "cleaned up" file as workaround for JOSM files */
   
    if (useJOSMHack) {
     
      File tempFile;
      try {
        tempFile = JOSMFileHack.createTempOSMFile(osmFile);
      } catch (Exception e2) {
        throw new IOException("could not read OSM file" +
            " (not even with workaround for JOSM files)", e2);
      }
     
      osmData = new OsmosisReader(tempFile).getData();
     
    }
   
    return createRepresentations(osmData, worldModules, config, targets);
   
View Full Code Here

Examples of org.osm2world.core.osm.creation.OsmosisReader

  @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());
   
View Full Code Here

Examples of org.osm2world.core.osm.creation.OsmosisReader

  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.creation.OsmosisReader

    /* 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
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.