Package org.geojson

Examples of org.geojson.Geometry


   * Contents of the file are assumed to be GeoJSON.**/
  public static Shape loadShapeJSON(File source) {
    try (FileInputStream fs = new FileInputStream(source)){
      FeatureCollection fc = new ObjectMapper().readValue(fs, FeatureCollection.class);
      Feature feature = fc.getFeatures().get(0);
      @SuppressWarnings("rawtypes")

      Geometry geometry = (Geometry) feature.getGeometry();
      if (geometry instanceof MultiPolygon) {
        return toArea((MultiPolygon) geometry);
      } else {
View Full Code Here

TOP

Related Classes of org.geojson.Geometry

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.