Examples of toGeometry()


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

    if (distance <= 0.0)
      distance = env.getSpan(0) / 100.0;
    Envelope search = new Envelope(point.getCoordinate());
    search.expandBy(distance);
    GeometryFactory factory = layer.getGeometryFactory();
    return findClosestEdges(point, layer, factory.toGeometry(search));
  }

    /**
     * Find geometries in the given layer that are closest to the given point while applying the filter
     * currently only handles point and linestrings (projecting them to a point) TODO Craig for other geoms
View Full Code Here

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

                    Geometry centroidGeom = null;

                    // get geometry of the area of interest
                    Envelope aoi = mapContent.getRenderingArea();
                    GeometryFactory factory = new GeometryFactory();
                    Geometry displayGeom = factory.toGeometry(new Envelope(aoi.getMinX(), aoi
                            .getMaxX(), aoi.getMinY(), aoi.getMaxY()));

                    // get the styles for this feature
                    SimpleFeatureType featureType = features.getSchema();
                    FeatureTypeStyle[] fts = KMLUtils.filterFeatureTypeStyles(layer.getStyle(),
View Full Code Here

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

    public MultiDimDataStore(String parentLocation) {
  super(false);
  GeometryFactory geometryBuilder = new GeometryFactory();
  SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(FEATURE_TYPE);
      featureBuilder.add(geometryBuilder.toGeometry(new Envelope(10, 30, 40, 70)));
     
      featureBuilder.add(parentLocation + "/2DLatLonCoverage.nc");
      Date theDate = new Date();
      featureBuilder.add(theDate);
      featureBuilder.set(BAND_DIMENSION, "MyBand");
View Full Code Here

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

      featureBuilder.set(LABEL_ATTRIBUTE, "X" + 0 + "Y" + 0);
      feature1 = featureBuilder.buildFeature("feature1");
     
      featureBuilder = new SimpleFeatureBuilder(FEATURE_TYPE);
     
      featureBuilder.add(geometryBuilder.toGeometry(new Envelope(35, 55, 40, 70)));
     
      featureBuilder.add(parentLocation + "/2DLatLonCoverage2.nc");
      featureBuilder.add(theDate);
      featureBuilder.set(BAND_DIMENSION, "MyBand");
      featureBuilder.set(LABEL_ATTRIBUTE, "X" + 0 + "Y" + 0);
View Full Code Here

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

                    Geometry centroidGeom = null;

                    // get geometry of the area of interest
                    Envelope aoi = mapContext.getAreaOfInterest();
                    GeometryFactory factory = new GeometryFactory();
                    Geometry displayGeom = factory.toGeometry(new Envelope(aoi
                            .getMinX(), aoi.getMaxX(), aoi.getMinY(), aoi
                            .getMaxY()));

                    // get the styles for this feature
                    SimpleFeatureType featureType = features.getSchema();
View Full Code Here

Examples of com.vividsolutions.jts.geom.OctagonalEnvelope.toGeometry()

     }

     static public Geometry octagonalEnvelope(Geometry arg0) {
         if (arg0 == null) return null;
         OctagonalEnvelope env = new OctagonalEnvelope(arg0);
         return env.toGeometry(arg0.getFactory());
     }
    
     static public Geometry minimumDiameter(Geometry arg0) {
         if (arg0 == null) return null;
         MinimumDiameter minDiameter = new MinimumDiameter(arg0);
View Full Code Here

Examples of org.geotools.grid.PolygonElement.toGeometry()

    }

    @Test
    public void toGeometry() {
        PolygonElement hexagon = new HexagonImpl(0.0, 0.0, SIDE_LEN, HexagonOrientation.FLAT, null);
        Geometry polygon = hexagon.toGeometry();
        assertNotNull(polygon);
        assertTrue(polygon instanceof Polygon);

        Set<Coordinate> polyCoords = new HashSet<Coordinate>(Arrays.asList(polygon.getCoordinates()));
        for (Coordinate c : hexagon.getVertices()) {
View Full Code Here

Examples of org.geotools.grid.PolygonElement.toGeometry()

    }

    @Test
    public void toGeometry() {
        PolygonElement oblong = new OblongImpl(MINX, MINY, WIDTH, HEIGHT, null);
        Geometry polygon = oblong.toGeometry();
        assertNotNull(polygon);
        assertTrue(polygon instanceof Polygon);

        Set<Coordinate> polyCoords = new HashSet<Coordinate>(Arrays.asList(polygon.getCoordinates()));
        for (Coordinate c : oblong.getVertices()) {
View Full Code Here

Examples of org.zkoss.openlayers.base.Bounds.toGeometry()

    Vector boxes = new Vector("Boxes");

    for (int i = 0; i < box_extents.length; i++) {
      Bounds bounds = Bounds.fromArray(new ArrayList(box_extents[i]));
      org.zkoss.openlayers.feature.Vector box = new org.zkoss.openlayers.feature.Vector(
          bounds.toGeometry());
      boxes.addFeature(box);
    }

    map.addLayers(Arrays.asList(ol_wms, boxes));
    map.addControl(new LayerSwitcher());
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.