public class ShpToRdf
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Classification |
classification |
private static org.opengis.referencing.crs.CRSAuthorityFactory |
crsFactory |
private Configuration |
currentConfig |
(package private) org.geotools.data.DataStore |
dataStore |
(package private) java.lang.String |
inputFile |
(package private) Assistant |
myAssistant |
(package private) Converter |
myConverter |
(package private) java.lang.String |
outputFile |
private org.opengis.referencing.operation.MathTransform |
reproject |
(package private) int |
sourceSRID |
(package private) int |
targetSRID |
Constructor and Description |
---|
ShpToRdf(Configuration config,
Classification classific,
java.lang.String inFile,
java.lang.String outFile,
int sourceSRID,
int targetSRID)
Constructor for the transformation process from ESRI shapefile to RDF.
|
Modifier and Type | Method and Description |
---|---|
void |
apply()
Applies transformation according to the configuration settings.
|
private org.geotools.feature.FeatureIterator<?> |
collectData(java.lang.String shapePath)
Loads a shapefile from the configuration path and returns an iterable feature collection.
|
private boolean |
validateShapefile(java.io.File shpPath,
java.lang.String shpName)
Checks whether a valid shapefile is given as input, i.e., at least the three .shp, .shx, .dbf files are available in the same folder
|
Converter myConverter
Assistant myAssistant
private org.opengis.referencing.operation.MathTransform reproject
int sourceSRID
int targetSRID
private Configuration currentConfig
private Classification classification
java.lang.String inputFile
java.lang.String outputFile
org.geotools.data.DataStore dataStore
private static final org.opengis.referencing.crs.CRSAuthorityFactory crsFactory
public ShpToRdf(Configuration config, Classification classific, java.lang.String inFile, java.lang.String outFile, int sourceSRID, int targetSRID) throws java.lang.ClassNotFoundException
config
- Parameters to configure the transformation.classific
- Instantiation of the classification scheme that assigns categories to input features.inFile
- Path to input shapefile.outFile
- Path to the output file that collects RDF triples.sourceSRID
- Spatial reference system (EPSG code) of the input shapefile.targetSRID
- Spatial reference system (EPSG code) of geometries in the output RDF triples.java.lang.ClassNotFoundException
public void apply()
private org.geotools.feature.FeatureIterator<?> collectData(java.lang.String shapePath)
shapePath
- Specifies the path to the shapefile.private boolean validateShapefile(java.io.File shpPath, java.lang.String shpName)
shpPath
- Path to the shapefile on disk.shpName
- Name of the shapefile (without extensions)