Package com.vividsolutions.jts.geom

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


                    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

    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

      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

                    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

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.