Package ca.carleton.gcrc.geom

Examples of ca.carleton.gcrc.geom.GeometryCollection


   
    return multiPolygon;
  }
 
  private GeometryCollection parseGeometryCollection(BufferedReader br) throws Exception {
    GeometryCollection geometryCollection = new GeometryCollection();
   
    skipWhiteSpaces(br);
    popLeftParen(br);
   
    boolean done = false;
    do {
      skipWhiteSpaces(br);

      Geometry geometry = parseGeometry(br);
      geometryCollection.addGeometry(geometry);

      if( checkForRightParen(br) ) {
        done = true;
      } else {
        popComma(br);
View Full Code Here


      JSONArray geometries = geometryObj.getJSONArray("geometries");
      if( null == geometries ) {
        throw new Exception("A geometry must contain an array called 'coordinates'");
      }
     
      GeometryCollection geometryCollection = new GeometryCollection();
     
      for(int i=0,e=geometries.length(); i<e; ++i){
        JSONObject gObj = geometries.getJSONObject(i);
        Geometry g = parseGeometry(gObj);
        geometryCollection.addGeometry(g);
      }
     
      return geometryCollection;
     
    } catch(Exception e) {
View Full Code Here

    } else if( geometry instanceof MultiPolygon
     && filterType == Filter.POLYGONS ) {
      return true;
     
    } else if( geometry instanceof GeometryCollection ) {
      GeometryCollection collection = (GeometryCollection)geometry;
      for(Geometry g : collection.getGeometries()){
        if( false == acceptsGeometry(g) ) {
          return false;
        }
      }
      return true;
View Full Code Here

TOP

Related Classes of ca.carleton.gcrc.geom.GeometryCollection

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.