public class FeatureUtils extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
FeatureUtils.FeatureCrsProvider |
Constructor and Description |
---|
FeatureUtils() |
Modifier and Type | Method and Description |
---|---|
static org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
clipCollection(org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> sourceCollection,
org.opengis.referencing.crs.CoordinateReferenceSystem defaultSourceCrs,
com.vividsolutions.jts.geom.Geometry clipGeometry,
org.opengis.referencing.crs.CoordinateReferenceSystem clipCrs,
String targetID,
org.opengis.referencing.crs.CoordinateReferenceSystem targetCrs,
ProgressMonitor pm)
Clips the given
sourceCollection against the clipGeometry and reprojects the clipped features
to the targetCrs. |
static org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
clipFeatureCollectionToProductBounds(org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> featureCollection,
Product product,
FeatureUtils.FeatureCrsProvider crsProvider,
ProgressMonitor pm) |
static org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
createFeatureCollection(URL url,
org.opengis.referencing.crs.CoordinateReferenceSystem targetCrs,
com.vividsolutions.jts.geom.Geometry clipGeometry) |
static String |
createFeatureId(int base) |
static String |
createFeatureTypeName(String defaultGeometry) |
static com.vividsolutions.jts.geom.Geometry |
createGeoBoundaryPolygon(Product product) |
static org.geotools.data.FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
getFeatureSource(URL url) |
static org.geotools.geometry.jts.GeometryCoordinateSequenceTransformer |
getTransform(org.opengis.referencing.crs.CoordinateReferenceSystem sourceCrs,
org.opengis.referencing.crs.CoordinateReferenceSystem targetCrs) |
static org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
loadFeatureCollectionFromShapefile(File shapefile) |
static org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
loadShapefileForProduct(File file,
Product product,
FeatureUtils.FeatureCrsProvider crsProvider,
ProgressMonitor pm) |
public static org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> createFeatureCollection(URL url, org.opengis.referencing.crs.CoordinateReferenceSystem targetCrs, com.vividsolutions.jts.geom.Geometry clipGeometry) throws IOException
IOException
public static org.geotools.data.FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> getFeatureSource(URL url) throws IOException
IOException
public static org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> loadShapefileForProduct(File file, Product product, FeatureUtils.FeatureCrsProvider crsProvider, ProgressMonitor pm) throws IOException
IOException
public static org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> clipFeatureCollectionToProductBounds(org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> featureCollection, Product product, FeatureUtils.FeatureCrsProvider crsProvider, ProgressMonitor pm)
public static org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> loadFeatureCollectionFromShapefile(File shapefile) throws IOException
IOException
public static String createFeatureId(int base)
public static org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> clipCollection(org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> sourceCollection, org.opengis.referencing.crs.CoordinateReferenceSystem defaultSourceCrs, com.vividsolutions.jts.geom.Geometry clipGeometry, org.opengis.referencing.crs.CoordinateReferenceSystem clipCrs, String targetID, org.opengis.referencing.crs.CoordinateReferenceSystem targetCrs, ProgressMonitor pm)
sourceCollection
against the clipGeometry
and reprojects the clipped features
to the targetCrs.sourceCollection
- the feature collection to be clipped and reprojected. If it does not
have an associated CRS, the one specified by defaultSourceCrs
is used.defaultSourceCrs
- if sourceCollection
does not have an associated CRS, this one is used.clipGeometry
- the geometry used for clippingclipCrs
- the CRS of the clipGeometry
targetID
- the ID of the resulting FeatureCollection
. If null
the ID of
the sourceCollection is used.targetCrs
- the CRS the FeatureCollection
is reprojected to. If null
no reprojection
is applied.FeatureCollection
IllegalStateException
- if the sourceCollection
has no associated CRS and defaultSourceCrs
is null
public static org.geotools.geometry.jts.GeometryCoordinateSequenceTransformer getTransform(org.opengis.referencing.crs.CoordinateReferenceSystem sourceCrs, org.opengis.referencing.crs.CoordinateReferenceSystem targetCrs)
public static com.vividsolutions.jts.geom.Geometry createGeoBoundaryPolygon(Product product)
Copyright © 2014–2016 European Space Agency (ESA). All rights reserved.