Class GeoData
- java.lang.Object
-
- eu.europa.ec.eurostat.jgiscotools.io.geo.GeoData
-
public class GeoData extends Object
Some generic function to load data from mainstream data formats: gpkg, shp, geojson.- Author:
- julien Gaffuri
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.opengis.referencing.crs.CoordinateReferenceSystem
getCRS()
static org.opengis.referencing.crs.CoordinateReferenceSystem
getCRS(String filePath)
ArrayList<Feature>
getFeatures()
static ArrayList<Feature>
getFeatures(String filePath)
Get featuresstatic ArrayList<Feature>
getFeatures(String filePath, String idAtt)
Get featuresstatic ArrayList<Feature>
getFeatures(String filePath, String idAtt, org.opengis.filter.Filter filter)
Get featuresorg.opengis.feature.simple.SimpleFeatureType
getSchema()
static org.opengis.feature.simple.SimpleFeatureType
getSchema(String filePath)
static <T extends Feature>
voidsave(Collection<T> fs, String filePath, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
static <T extends Feature>
voidsave(Collection<T> fs, String filePath, org.opengis.referencing.crs.CoordinateReferenceSystem crs, boolean createSpatialIndex)
static <T extends org.locationtech.jts.geom.Geometry>
voidsaveGeoms(Collection<T> geoms, String outFile, org.opengis.referencing.crs.CoordinateReferenceSystem crs, boolean createSpatialIndex)
-
-
-
Method Detail
-
getSchema
public org.opengis.feature.simple.SimpleFeatureType getSchema()
- Returns:
- The schema
-
getCRS
public org.opengis.referencing.crs.CoordinateReferenceSystem getCRS()
- Returns:
- The coordinate reference system
-
getFeatures
public static ArrayList<Feature> getFeatures(String filePath)
Get features- Parameters:
filePath
-- Returns:
-
getFeatures
public static ArrayList<Feature> getFeatures(String filePath, String idAtt)
Get features- Parameters:
filePath
-idAtt
-- Returns:
- Throws:
Exception
-
getFeatures
public static ArrayList<Feature> getFeatures(String filePath, String idAtt, org.opengis.filter.Filter filter)
Get features- Parameters:
filePath
-idAtt
-filter
-- Returns:
- Throws:
Exception
-
getSchema
public static org.opengis.feature.simple.SimpleFeatureType getSchema(String filePath)
- Parameters:
filePath
-- Returns:
- Throws:
Exception
-
getCRS
public static org.opengis.referencing.crs.CoordinateReferenceSystem getCRS(String filePath)
- Parameters:
filePath
-- Returns:
-
save
public static <T extends Feature> void save(Collection<T> fs, String filePath, org.opengis.referencing.crs.CoordinateReferenceSystem crs, boolean createSpatialIndex)
- Parameters:
fs
-filePath
-crs
-createSpatialIndex
-
-
save
public static <T extends Feature> void save(Collection<T> fs, String filePath, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
- Parameters:
fs
-filePath
-crs
-
-
saveGeoms
public static <T extends org.locationtech.jts.geom.Geometry> void saveGeoms(Collection<T> geoms, String outFile, org.opengis.referencing.crs.CoordinateReferenceSystem crs, boolean createSpatialIndex)
- Type Parameters:
T
-- Parameters:
geoms
-outFile
-crs
-createSpatialIndex
-
-
-