Examples of GeometryCollection


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

Examples of chunmap.model.geom.GeometryCollection

    g2 = m2;
  }

  @Override
  protected void computeIM() {
    GeometryCollection c1 = (GeometryCollection) g1;
    GeometryCollection c2 = (GeometryCollection) g2;
    for (Geometry ge1 : c1) {
      for (Geometry ge2 : c2) {
        IntersectionMatrix tim = ComputeImFactory.getInstance()
            .getImComputer(ge1, ge2).getIM();
        im.unite(tim);
View Full Code Here

Examples of chunmap.model.geom.GeometryCollection

                return false;
            }
        }
        else if (geom instanceof GeometryCollection)
        {
            GeometryCollection gs = (GeometryCollection)geom;
            for (Geometry g : gs)
            {
                if (hasIntersect(env, g)) return true;
            }
            return false;
View Full Code Here

Examples of chunmap.model.geom.GeometryCollection

      drawLineSymbol((Graphics2D) g, pg.getShell());
      for (Ring r : pg.getHoles()) {
        drawLineSymbol((Graphics2D) g, r);
      }
    } else if (geo instanceof GeometryCollection) {
      GeometryCollection gs = (GeometryCollection) geo;
      for (Geometry ge : gs) {
        drawGeo(g, ge, renderer);
      }
    }
  }
View Full Code Here

Examples of chunmap.model.geom.GeometryCollection

    } else if (geo instanceof LineString) {
      drawHelper.drawLineString(g, geo,view);
    } else if (geo instanceof Polygon) {
      drawHelper.drawPolygon(g, geo,view);
    } else if (geo instanceof GeometryCollection) {
      GeometryCollection geoCollection = (GeometryCollection) geo;
      for (Geometry geo2 : geoCollection) {
        draw(geo2);
      }
    } else {
      throw new UnsupportedOperationException();
View Full Code Here

Examples of com.simplegeo.client.types.GeometryCollection

  @Test
  public void testGetHistorySync() {
    try {
      String jsonString = client.getHistory("casey.testing.layer", "simplegeo-boulder", null);
      GeometryCollection geoColl = GeometryCollection.fromJSONString(jsonString);
     
      Assert.assertNotNull(geoColl.getGeometries());
    } catch (IOException e) {
      Assert.fail(e.getMessage());     
    } catch (JSONException e) {
      Assert.fail(e.getMessage());     
    }
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryCollection

   * Writes a <code>GeometryCollection</code> object.
   *
   * @param o The <code>LineString</code> to be encoded.
   */
  public void writeObject(Object o, GraphicsDocument document, boolean asChild) throws RenderException {
    GeometryCollection coll = (GeometryCollection) o;
    document.writeElement("vml:shape", asChild);
    document.writeAttribute("fill-rule", "evenodd");
    document.writeAttributeStart("path");
    for (int i = 0; i < coll.getNumGeometries(); i++) {
    }
    document.writeAttributeEnd();
  }
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryCollection

   * Writes a <code>GeometryCollection</code> object.
   *
   * @param o The <code>LineString</code> to be encoded.
   */
  public void writeObject(Object o, GraphicsDocument document, boolean asChild) throws RenderException {
    GeometryCollection coll = (GeometryCollection) o;
    document.writeElement("path", asChild);
    document.writeAttribute("fill-rule", "evenodd");
    document.writeAttributeStart("d");
    for (int i = 0; i < coll.getNumGeometries(); i++) {
      document.writeObject(coll.getGeometryN(i), true); // TODO delegate to appropriate writers, is this correct?
    }
    document.writeAttributeEnd();
  }
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryCollection

    String key4 = "key4";
    PipelineContext pipelineContext = new PipelineContextImpl();
    pipelineContext.put(key1, key1);
    pipelineContext.put(key3, key3);
    GeometryFactory geometryFactory = new GeometryFactory();
    pipelineContext.put(key4, new GeometryCollection(new Geometry[] {}, geometryFactory));

    // a context
    CacheContext cacheContext1 = cacheKeyService.getCacheContext(pipelineContext, new String[] {key1, key2, key4});
    Assert.assertEquals(key1, cacheContext1.get(key1));
    Assert.assertNull(cacheContext1.get(key2));
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryCollection

    CacheContext context = new MyCacheContext();
    String cacheKey1 = cacheKeyService.getCacheKey(context);
    context.put("bla", "bla");
    String cacheKey2 = cacheKeyService.getCacheKey(context);
    GeometryFactory geometryFactory = new GeometryFactory();
    context.put("geom", new GeometryCollection(new Geometry[] {}, geometryFactory));
    String cacheKey3 = cacheKeyService.getCacheKey(context);
    System.out.println("keys " + cacheKey1 + " " + cacheKey2 + " " + cacheKey3);
    Assert.assertFalse(cacheKey1.equals(cacheKey2));
    Assert.assertFalse(cacheKey2.equals(cacheKey3));
    Assert.assertFalse(cacheKey3.equals(cacheKey1));
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.