Examples of createPolygon()


Examples of org.geomajas.gwt.client.spatial.geometry.GeometryFactory.createPolygon()

    // And some geometries
    final GfxGeometry worldGeometry = new GfxGeometry("MultiPolygonInWorldSpace");
    final GeometryFactory gf = new GeometryFactory(map.getMapModel().getSrid(), map.getMapModel().getPrecision());
    Polygon p1 = gf.createPolygon(gf.createLinearRing(new Bbox(10000000d, 1000d, 1000000d, 1000000d)), null);
    Polygon p2 = gf.createPolygon(gf.createLinearRing(new Bbox(12000000d, 1000d, 500000d, 500000d)), null);
    MultiPolygon mp = gf.createMultiPolygon(new Polygon[] {p1, p2});
    worldGeometry.setStyle(new ShapeStyle("#FF0000", 0.5f, "#FF0000", 1.0f, 2));
    worldGeometry.setGeometry(mp);

    final GfxGeometry worldGeometry2 = new GfxGeometry("MultiPointInWorldSpace");
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.geometry.GeometryFactory.createPolygon()

      LinearRing exteriorRing = (LinearRing) toGwt(geometry.getGeometries()[0]);
      LinearRing[] interiorRings = new LinearRing[geometry.getGeometries().length - 1];
      for (int i = 0; i < interiorRings.length; i++) {
        interiorRings[i] = (LinearRing) toGwt(geometry.getGeometries()[i + 1]);
      }
      gwt = factory.createPolygon(exteriorRing, interiorRings);
    } else if (Geometry.MULTI_POINT.equals(geometryType)) {
      Point[] points = new Point[geometry.getGeometries().length];
      gwt = factory.createMultiPoint((Point[]) convertGeometries(geometry, points));
    } else if (Geometry.MULTI_LINE_STRING.equals(geometryType)) {
      LineString[] lineStrings = new LineString[geometry.getGeometries().length];
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.geometry.GeometryFactory.createPolygon()

    if (maxBoundsDisplayed) {
      VectorLayer layer = getFeatureTransaction().getLayer();
      GeometryFactory factory = mapWidget.getMapModel().getGeometryFactory();
      LinearRing hole = factory.createLinearRing(new Bbox(layer.getLayerInfo().getMaxExtent()));
      LinearRing shell = factory.createLinearRing(mapWidget.getMapModel().getMapView().getMaxBounds());
      Polygon polygon = factory.createPolygon(shell, new LinearRing[] { hole });

      maxExtent = new GfxGeometry("maxExtent");
      maxExtent.setGeometry(polygon);
      maxExtent.setStyle(new ShapeStyle("#000000", .6f, "#990000", 1, 2));
      mapWidget.registerWorldPaintable(maxExtent);
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.geometry.GeometryFactory.createPolygon()

    LinearRing interiorRing1 = gwtFactory.createLinearRing(new Coordinate[] {new Coordinate(12.0, 12.0),
        new Coordinate(14.0, 12.0), new Coordinate(14.0, 18.0), new Coordinate(12.0, 18.0)});
    LinearRing interiorRing2 = gwtFactory.createLinearRing(new Coordinate[] {new Coordinate(16.0, 12.0),
        new Coordinate(18.0, 12.0), new Coordinate(18.0, 18.0), new Coordinate(16.0, 18.0)});

    polygon = gwtFactory.createPolygon(exteriorRing, new LinearRing[] {interiorRing1, interiorRing2});
  }

  // -------------------------------------------------------------------------
  // Actual tests:
  // -------------------------------------------------------------------------
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.geometry.GeometryFactory.createPolygon()

        new Coordinate(100.0, 0.0), new Coordinate(100.0, 100.0), new Coordinate(0.0, 100.0)});
    LinearRing interiorRing1 = factory.createLinearRing(new Coordinate[] {new Coordinate(20.0, 20.0),
        new Coordinate(40.0, 20.0), new Coordinate(40.0, 40.0), new Coordinate(20.0, 40.0)});
    LinearRing interiorRing2 = factory.createLinearRing(new Coordinate[] {new Coordinate(60.0, 60.0),
        new Coordinate(80.0, 60.0), new Coordinate(80.0, 80.0), new Coordinate(60.0, 80.0)});
    polygon = factory.createPolygon(exteriorRing, new LinearRing[] {interiorRing1, interiorRing2});
    multiPolygon = factory.createMultiPolygon(new Polygon[] {(Polygon) polygon.clone()});

    index = new TransactionGeomIndex();
    index.setCoordinateIndex(2);
    index.setGeometryIndex(0);
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.geometry.GeometryFactory.createPolygon()

        new Coordinate(100.0, 0.0), new Coordinate(100.0, 100.0), new Coordinate(0.0, 100.0)});
    LinearRing interiorRing1 = factory.createLinearRing(new Coordinate[] {new Coordinate(20.0, 20.0),
        new Coordinate(40.0, 20.0), new Coordinate(40.0, 40.0), new Coordinate(20.0, 40.0)});
    LinearRing interiorRing2 = factory.createLinearRing(new Coordinate[] {new Coordinate(60.0, 60.0),
        new Coordinate(80.0, 60.0), new Coordinate(80.0, 80.0), new Coordinate(60.0, 80.0)});
    polygon = factory.createPolygon(exteriorRing, new LinearRing[] {interiorRing1, interiorRing2});
    multiPolygon = factory.createMultiPolygon(new Polygon[] {(Polygon) polygon.clone()});

    index = new TransactionGeomIndex();
    index.setCoordinateIndex(2);
    index.setGeometryIndex(0);
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.geometry.GeometryFactory.createPolygon()

        new Coordinate(100.0, 0.0), new Coordinate(100.0, 100.0), new Coordinate(0.0, 100.0)});
    LinearRing interiorRing1 = factory.createLinearRing(new Coordinate[] {new Coordinate(20.0, 20.0),
        new Coordinate(40.0, 20.0), new Coordinate(40.0, 40.0), new Coordinate(20.0, 40.0)});
    LinearRing interiorRing2 = factory.createLinearRing(new Coordinate[] {new Coordinate(60.0, 60.0),
        new Coordinate(80.0, 60.0), new Coordinate(80.0, 80.0), new Coordinate(60.0, 80.0)});
    polygon = factory.createPolygon(exteriorRing, new LinearRing[] {interiorRing1, interiorRing2});
    multiPolygon = factory.createMultiPolygon(new Polygon[] {(Polygon) polygon.clone()});

    index = new TransactionGeomIndex();
    index.setCoordinateIndex(2);
    index.setGeometryIndex(0);
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.geometry.GeometryFactory.createPolygon()

        new Coordinate(100.0, 0.0), new Coordinate(100.0, 100.0), new Coordinate(0.0, 100.0)});
    LinearRing interiorRing1 = factory.createLinearRing(new Coordinate[] {new Coordinate(20.0, 20.0),
        new Coordinate(40.0, 20.0), new Coordinate(40.0, 40.0), new Coordinate(20.0, 40.0)});
    LinearRing interiorRing2 = factory.createLinearRing(new Coordinate[] {new Coordinate(60.0, 60.0),
        new Coordinate(80.0, 60.0), new Coordinate(80.0, 80.0), new Coordinate(60.0, 80.0)});
    polygon = factory.createPolygon(exteriorRing, new LinearRing[] {interiorRing1, interiorRing2});
    multiPolygon = factory.createMultiPolygon(new Polygon[] {(Polygon) polygon.clone()});

    index = new TransactionGeomIndex();
    index.setCoordinateIndex(2);
    index.setGeometryIndex(0);
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.geometry.GeometryFactory.createPolygon()

        new Coordinate(100.0, 0.0), new Coordinate(100.0, 100.0), new Coordinate(0.0, 100.0)});
    LinearRing interiorRing1 = factory.createLinearRing(new Coordinate[] {new Coordinate(20.0, 20.0),
        new Coordinate(40.0, 20.0), new Coordinate(40.0, 40.0), new Coordinate(20.0, 40.0)});
    LinearRing interiorRing2 = factory.createLinearRing(new Coordinate[] {new Coordinate(60.0, 60.0),
        new Coordinate(80.0, 60.0), new Coordinate(80.0, 80.0), new Coordinate(60.0, 80.0)});
    polygon = factory.createPolygon(exteriorRing, new LinearRing[] {interiorRing1, interiorRing2});
    multiPolygon = factory.createMultiPolygon(new Polygon[] {(Polygon) polygon.clone()});

    index = new TransactionGeomIndex();
    index.setCoordinateIndex(2);
    index.setGeometryIndex(0);
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.geometry.GeometryFactory.createPolygon()

        new Coordinate(20.0, 10.0), new Coordinate(20.0, 20.0), new Coordinate(10.0, 20.0),
        new Coordinate(10.0, 10.0)});
    LinearRing hole1 = factory.createLinearRing(new Coordinate[] {new Coordinate(12.0, 12.0),
        new Coordinate(18.0, 12.0), new Coordinate(18.0, 18.0), new Coordinate(12.0, 18.0),
        new Coordinate(12.0, 12.0)});
    geometries.add(factory.createPolygon(shell1, new LinearRing[] {hole1}));
    LinearRing shell2 = factory.createLinearRing(new Coordinate[] {new Coordinate(5.0, 5.0),
        new Coordinate(15.0, 5.0), new Coordinate(15.0, 25.0), new Coordinate(5.0, 25.0)});
    geometries.add(factory.createPolygon(shell2, null));
  }
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.