public class RdfToShp extends java.lang.Object implements ReverseConverter
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.String |
attrGeom |
private static org.opengis.referencing.crs.CRSAuthorityFactory |
crsFactory |
private ReverseConfiguration |
currentConfig |
private java.lang.String |
encoding |
(package private) org.geotools.feature.simple.SimpleFeatureBuilder |
featureBuilder |
(package private) org.geotools.data.simple.SimpleFeatureSource |
featureSource |
(package private) org.geotools.data.simple.SimpleFeatureStore |
featureStore |
(package private) java.lang.String |
geomType |
(package private) Assistant |
myAssistant |
(package private) org.geotools.data.shapefile.ShapefileDataStore |
newDataStore |
(package private) int |
numRecs |
private java.lang.String |
outputFile |
(package private) com.vividsolutions.jts.io.WKTReader |
reader |
private org.opengis.referencing.operation.MathTransform |
reproject |
(package private) int |
sourceSRID |
(package private) int |
targetSRID |
(package private) org.geotools.data.Transaction |
transaction |
(package private) java.lang.String |
typeName |
Constructor and Description |
---|
RdfToShp(ReverseConfiguration config,
java.lang.String outFile,
int sourceSRID,
int targetSRID)
Constructor for the reverse transformation process from RDF to ESRI shapefile.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes output file, once all results have been written.
|
boolean |
createSchema(java.util.List<java.lang.String> attrList,
org.apache.jena.query.QuerySolution sol)
Determine schema with all attribute names and their data types.
|
com.vividsolutions.jts.geom.Geometry |
getGeometry(java.lang.String g)
Identifies SRID (EPSG code) and geometry type from a WKT literal.
|
java.lang.String |
getGeometrySpec(org.apache.jena.rdf.model.Literal g)
Identifies SRID (EPSG code) and geometry type from a WKT literal.
|
java.lang.String |
getGeometrySpec(java.lang.String g)
Identifies SRID (EPSG code) and geometry type from a WKT string.
|
java.lang.Integer |
store(java.util.List<java.lang.String> attrList,
java.util.List<java.util.List<java.lang.String>> results)
Creates a feature collection from current batch of records and writes them into the output shapefile.
|
Assistant myAssistant
private org.opengis.referencing.operation.MathTransform reproject
com.vividsolutions.jts.io.WKTReader reader
int sourceSRID
int targetSRID
private ReverseConfiguration currentConfig
private java.lang.String outputFile
private java.lang.String encoding
org.geotools.data.shapefile.ShapefileDataStore newDataStore
org.geotools.feature.simple.SimpleFeatureBuilder featureBuilder
java.lang.String geomType
java.lang.String typeName
java.lang.String attrGeom
org.geotools.data.simple.SimpleFeatureSource featureSource
org.geotools.data.simple.SimpleFeatureStore featureStore
org.geotools.data.Transaction transaction
int numRecs
private static final org.opengis.referencing.crs.CRSAuthorityFactory crsFactory
public RdfToShp(ReverseConfiguration config, java.lang.String outFile, int sourceSRID, int targetSRID)
config
- Parameters for Reverse Transformation.outFile
- Path to the output shapefile.sourceSRID
- Spatial reference system (EPSG code) of geometries in the input RDF triplestargetSRID
- Spatial reference system (EPSG code) of the output shapefilepublic void close()
close
in interface ReverseConverter
public boolean createSchema(java.util.List<java.lang.String> attrList, org.apache.jena.query.QuerySolution sol)
createSchema
in interface ReverseConverter
attrList
- List of attribute names. Attributes in the schema will be created in the same order as specified in the SELECT query that fetches results from the RDF graph.sol
- A single result (record) from a SELECT query in SPARQL.public java.lang.String getGeometrySpec(org.apache.jena.rdf.model.Literal g)
getGeometrySpec
in interface ReverseConverter
g
- A geometry WKT literal.public java.lang.Integer store(java.util.List<java.lang.String> attrList, java.util.List<java.util.List<java.lang.String>> results)
store
in interface ReverseConverter
attrList
- List of attribute names.results
- Collection of records in the current batch.public java.lang.String getGeometrySpec(java.lang.String g)
ReverseConverter
getGeometrySpec
in interface ReverseConverter
g
- A geometry WKT string.public com.vividsolutions.jts.geom.Geometry getGeometry(java.lang.String g)
ReverseConverter
getGeometry
in interface ReverseConverter
g
- A geometry WKT literal.