Examples of createPolygon()


Examples of com.vividsolutions.jts.geom.GeometryFactory.createPolygon()

    Coordinate[] newCoords = rotationShell.toArray(new Coordinate[rotationShell.size()]);
    LinearRing shell = gf.createLinearRing(newCoords);

    LinearRing[] rings = holes.toArray(new LinearRing[holes.size()]);

    return gf.createPolygon(shell, rings);
  }

  /**
   * Rotate the given coordinate.
   *
 
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPolygon()

          new Coordinate(25 * i+25, 25 * i+25), new Coordinate(25 * i, 25 * i+25),
          new Coordinate(25 * i, 25 * i),

      });

      polys[i] = factory.createPolygon(ring1, new LinearRing[] {});
      attrValues[i] = "value" + i; //$NON-NLS-1$
    }
    SimpleFeature[] features = createTestFeatures(typename, polys, attrValues,
        DefaultEngineeringCRS.GENERIC_2D);

View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPolygon()

       }

       // create the polygon.
       assert shellCoords != null : "there should be at least shell coordinates to build a polygon."; //$NON-NLS-1$
       LinearRing shellRing = gf.createLinearRing(shellCoords);
       Polygon newPolygon = gf.createPolygon(shellRing, rings);
      
       AdaptedPolygon rebuildedPolygon = new AdaptedPolygon(newPolygon);

       return rebuildedPolygon;
   }
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPolygon()

     */
    private Geometry createReferenceGeom() {
        LinearRing ring = GeometryBuilder.create().safeCreateGeometry(LinearRing.class,
                shape.coordArray());
        GeometryFactory fac = new GeometryFactory();
        return fac.createPolygon(ring, new LinearRing[0]);

    }
    public void rollback( IProgressMonitor monitor ) throws Exception {
        GeometryOperationAnimation indicator = new GeometryOperationAnimation(
                PrimitiveShapeIterator.getPathIterator(shape).toShape(), new IsBusyStateProvider(
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPolygon()

        readerDetails.setPersNr(4711);
        GeometryFactory fac = new GeometryFactory();
        LinearRing r = fac.createLinearRing(new Coordinate[] { new Coordinate(11, 11),
                new Coordinate(14, 11), new Coordinate(14, 14), new Coordinate(11, 14),
                new Coordinate(11, 11), });
        Polygon poly = fac.createPolygon(r, new LinearRing[] {});
        poly.setUserData("EPSG:4326");
        readerDetails.setGeometryRestriction(poly);

        GeoXACMLConfig.getXACMLRoleAuthority().transformUserDetails(readerDetails);
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPolygon()

          Coordinate[] interior=decimate(line.getInteriorRingN(i)).getCoordinates();
          forceClosed(interior);
          if(interior.length>3)
            rings.add(gFac.createLinearRing(interior));
        }
        return gFac.createPolygon(ring, rings.toArray(new LinearRing[] {}));
      }
      return null;
    }
    return geom;
  }
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPolygon()

    public void testHeterogeneousGeometry() throws Exception {
        GeometryFactory gf = new GeometryFactory();
        Point point = gf.createPoint(new Coordinate(10, 10));
        LineString line = gf.createLineString(new Coordinate[] {
                new Coordinate(50, 50), new Coordinate(100, 100) });
        Polygon polygon = gf.createPolygon(gf
                .createLinearRing(new Coordinate[] { new Coordinate(0, 0),
                        new Coordinate(0, 200), new Coordinate(200, 200),
                        new Coordinate(200, 0), new Coordinate(0, 0) }), null);
       
        SimpleFeatureTypeBuilder ftb = new SimpleFeatureTypeBuilder();
View Full Code Here

Examples of org.eclipse.graphiti.services.IGaService.createPolygon()

     * @return
     */
    private Polyline createArrow(GraphicsAlgorithmContainer gaContainer) {

      IGaService gaService = Graphiti.getGaService();
      Polyline polyline = gaService.createPolygon(
          gaContainer, new int[] { -9, 6, 0, 0, -9, -6 });
      polyline.setForeground(manageColor(IColorConstant.BLACK));
      polyline.setBackground(manageColor(IColorConstant.BLACK));
      polyline.setLineWidth(1);

View Full Code Here

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

            new Coordinate(210, 10), new Coordinate(210, 110), new Coordinate(110, 110),
            new Coordinate(110, 10) });
        LinearRing hole = factory.createLinearRing(new Coordinate[] { new Coordinate(140, 40),
            new Coordinate(170, 40), new Coordinate(170, 70), new Coordinate(140, 70),
            new Coordinate(140, 40) });
        Polygon polygon = factory.createPolygon(shell, new LinearRing[] { hole });
        ShapeStyle style = new ShapeStyle("#9933EE", 0.5f, "#9900FF", 1, 2);
        map.getVectorContext().drawPolygon(group2, "Polygon", polygon, style);
      }
    });
    button3.setWidth100();
View Full Code Here

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

    worldImage.setStyle(new PictureStyle(0.8));

    // 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);
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.