Package ch.epfl.lbd.io.readers

Examples of ch.epfl.lbd.io.readers.ShapeFileReader.open()


  public static void convert(String input, String output) throws Exception{
    //load shp file
    ShapeFileReader reader = null;
    reader = new ShapeFileReader(new File(input));
    reader.open();
   
    //get all geometries and invert LAT,LNG coordinates
    Geometry[] geometries = reader.readAll();
   
    for(int i = 0 ; i < geometries.length ; i++ ){
View Full Code Here


       reader = new ShapeFileReader(new File("src/assets/shp/region.shp"));
     }
     catch (Exception e) {
      e.printStackTrace();
    }
    reader.open();
    Geometry[] geometries = reader.read();
    Assert.assertEquals(1, geometries.length);
    reader.close();
   }
}
View Full Code Here

        reader = new ShapeFileReader(new File("src/assets/shp/region.shp"));
       }
       catch (Exception e) {
        e.printStackTrace();
      }
      reader.open();
      Geometry[] geometries = reader.readAll();

      Assert.assertEquals(3, geometries.length);
      writer.write(geometries);
      reader.close();
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.