Class FeatureUtil
- java.lang.Object
-
- eu.europa.ec.eurostat.jgiscotools.feature.FeatureUtil
-
public class FeatureUtil extends Object
- Author:
- julien Gaffuri
-
-
Constructor Summary
Constructors Constructor Description FeatureUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends Feature>
HashMap<String,Integer>checkIdentfier(Collection<T> fs, String idAtt)
static ArrayList<Feature>
clip(Collection<Feature> fs, org.locationtech.jts.geom.Envelope env)
static Feature
copy(Feature f)
static Collection<Feature>
dissolve(Collection<Feature> fs, String propName)
static void
dissolveById(Collection<Feature> fs)
static void
ensureGeometryNotAGeometryCollection(Feature f)
static void
ensureGeometryNotAGeometryCollection(Collection<Feature> fs)
static <T extends Feature>
Collection<org.locationtech.jts.geom.Geometry>featuresToGeometries(Collection<T> fs)
static Collection<Feature>
filterFeaturesWithNonEmptyGeometries(Collection<Feature> fs)
static <T extends org.locationtech.jts.geom.Geometry>
HashSet<Feature>geometriesToFeatures(Collection<T> geoms)
static Set<String>
getAttributesSet(Feature... fs)
static <T extends Feature>
org.locationtech.jts.geom.EnvelopegetEnvelope(Collection<T> features)
static <T extends Feature>
org.locationtech.jts.geom.EnvelopegetEnvelope(Collection<T> features, double enlargementFactor)
static <T extends Feature>
ArrayList<Feature>getFeaturesWithSimpleGeometrie(Collection<T> in)
static <T extends Feature>
ArrayList<Feature>getFeaturesWithSimpleGeometrie(T f)
static <T extends Feature>
Collection<org.locationtech.jts.geom.Geometry>getGeometries(Collection<T> fs)
static <T extends Feature>
Collection<org.locationtech.jts.geom.LineString>getGeometriesLS(ArrayList<T> fs)
static <T extends Feature>
Collection<org.locationtech.jts.geom.MultiLineString>getGeometriesMLS(ArrayList<T> fs)
static <T extends Feature>
Collection<org.locationtech.jts.geom.Geometry>getGeometriesSimple(Collection<T> fs)
static <T extends Feature>
Collection<String>getIdValues(Collection<T> fs, String idAtt)
static <T extends Feature>
ArrayList<Map<String,Object>>getInfoSmallPolygons(Collection<T> fs, double areaThreshold)
static Set<String>
getPropValues(Collection<Feature> fs, String propKey)
static List<String>
getPropValuesAsList(Collection<Feature> fs, String propKey)
static <T extends Feature>
org.locationtech.jts.index.quadtree.QuadtreegetQuadtree(Collection<T> fs)
static <T extends Feature>
org.locationtech.jts.index.strtree.STRtreegetSTRtree(Collection<T> fs)
static <T extends Feature>
org.locationtech.jts.index.strtree.STRtreegetSTRtreeCoordinates(Collection<T> fs)
static <T extends Feature>
intgetVerticesNumber(Collection<T> fs)
static <T extends Feature>
HashMap<String,T>index(Collection<T> fs, String indexKey)
static void
setId(ArrayList<Feature> fs, String idAtt)
static Collection<Feature>
toFeatures(ArrayList<Map<String,String>> ps)
static Collection<Feature>
toFeatures(Collection<Map<String,Object>> ps)
-
-
-
Method Detail
-
getSTRtree
public static <T extends Feature> org.locationtech.jts.index.strtree.STRtree getSTRtree(Collection<T> fs)
-
getQuadtree
public static <T extends Feature> org.locationtech.jts.index.quadtree.Quadtree getQuadtree(Collection<T> fs)
-
getSTRtreeCoordinates
public static <T extends Feature> org.locationtech.jts.index.strtree.STRtree getSTRtreeCoordinates(Collection<T> fs)
-
getEnvelope
public static <T extends Feature> org.locationtech.jts.geom.Envelope getEnvelope(Collection<T> features)
-
getEnvelope
public static <T extends Feature> org.locationtech.jts.geom.Envelope getEnvelope(Collection<T> features, double enlargementFactor)
-
getIdValues
public static <T extends Feature> Collection<String> getIdValues(Collection<T> fs, String idAtt)
-
checkIdentfier
public static <T extends Feature> HashMap<String,Integer> checkIdentfier(Collection<T> fs, String idAtt)
-
getVerticesNumber
public static <T extends Feature> int getVerticesNumber(Collection<T> fs)
-
getInfoSmallPolygons
public static <T extends Feature> ArrayList<Map<String,Object>> getInfoSmallPolygons(Collection<T> fs, double areaThreshold)
-
getGeometries
public static <T extends Feature> Collection<org.locationtech.jts.geom.Geometry> getGeometries(Collection<T> fs)
-
getGeometriesSimple
public static <T extends Feature> Collection<org.locationtech.jts.geom.Geometry> getGeometriesSimple(Collection<T> fs)
-
getGeometriesMLS
public static <T extends Feature> Collection<org.locationtech.jts.geom.MultiLineString> getGeometriesMLS(ArrayList<T> fs)
-
getGeometriesLS
public static <T extends Feature> Collection<org.locationtech.jts.geom.LineString> getGeometriesLS(ArrayList<T> fs)
-
dissolveById
public static void dissolveById(Collection<Feature> fs)
-
dissolve
public static Collection<Feature> dissolve(Collection<Feature> fs, String propName)
-
toFeatures
public static Collection<Feature> toFeatures(Collection<Map<String,Object>> ps)
-
getPropValues
public static Set<String> getPropValues(Collection<Feature> fs, String propKey)
-
getPropValuesAsList
public static List<String> getPropValuesAsList(Collection<Feature> fs, String propKey)
-
index
public static <T extends Feature> HashMap<String,T> index(Collection<T> fs, String indexKey)
-
filterFeaturesWithNonEmptyGeometries
public static Collection<Feature> filterFeaturesWithNonEmptyGeometries(Collection<Feature> fs)
-
getFeaturesWithSimpleGeometrie
public static <T extends Feature> ArrayList<Feature> getFeaturesWithSimpleGeometrie(Collection<T> in)
-
getFeaturesWithSimpleGeometrie
public static <T extends Feature> ArrayList<Feature> getFeaturesWithSimpleGeometrie(T f)
-
ensureGeometryNotAGeometryCollection
public static void ensureGeometryNotAGeometryCollection(Collection<Feature> fs)
-
ensureGeometryNotAGeometryCollection
public static void ensureGeometryNotAGeometryCollection(Feature f)
-
clip
public static ArrayList<Feature> clip(Collection<Feature> fs, org.locationtech.jts.geom.Envelope env)
-
featuresToGeometries
public static <T extends Feature> Collection<org.locationtech.jts.geom.Geometry> featuresToGeometries(Collection<T> fs)
-
geometriesToFeatures
public static <T extends org.locationtech.jts.geom.Geometry> HashSet<Feature> geometriesToFeatures(Collection<T> geoms)
-
-