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
IOExceptionpublic static org.geotools.data.FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> getFeatureSource(URL url) throws IOException
IOExceptionpublic 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
IOExceptionpublic 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
IOExceptionpublic 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 clipGeometrytargetID - 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.FeatureCollectionIllegalStateException - if the sourceCollection has no associated CRS and defaultSourceCrs
is nullpublic 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–2015 European Space Agency (ESA). All rights reserved.