public abstract class FeatureCoreGenerator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BoundingBox |
boundingBox
Features bounding box
|
protected Projection |
boundingBoxProjection
Bounding Box projection
|
protected Map<String,FeatureColumn> |
columns
Table columns
|
protected static Projection |
EPSG_WGS84
EPSG WGS84
|
protected GeometryColumns |
geometryColumns
Table Geometry Columns
|
protected GeoPackageCore |
geoPackage
GeoPackage
|
protected GeoPackageProgress |
progress
GeoPackage progress
|
protected Projection |
projection
Features projection
|
protected SpatialReferenceSystem |
srs
Spatial Reference System
|
protected String |
tableName
Table Name
|
protected int |
transactionLimit
Number of rows to save in a single transaction
|
| Constructor and Description |
|---|
FeatureCoreGenerator(GeoPackageCore geoPackage,
String tableName)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addColumn(FeatureColumn featureColumn)
Add a new column
|
protected void |
addProjection(Projections projections,
String authority,
String code)
Add a projection
|
protected FeatureColumn |
createColumn(String name,
Object value)
Create a feature column
|
protected void |
createFeature(Geometry geometry,
Map<String,Object> properties)
Create the feature
|
protected GeoPackageGeometryData |
createGeometryData(Geometry geometry)
Create the geometry data
|
protected Projection |
createProjection(String authority,
String code)
Create a projection
|
void |
createSrs()
Create the Spatial Reference System
|
protected void |
createTable(Map<String,Object> properties)
Create the feature table
|
abstract int |
generateFeatures()
Generate the features
|
BoundingBox |
getBoundingBox()
Get bounding box
|
Projection |
getBoundingBoxProjection()
Get the bounding box projection
|
protected FeatureColumn |
getColumn(String column,
Object value)
Get the column, create if needed
|
Map<String,FeatureColumn> |
getColumns()
Get the columns
|
GeometryColumns |
getGeometryColumns()
Get the geometry columns
|
GeoPackageCore |
getGeoPackage()
Get the GeoPackage
|
GeoPackageProgress |
getProgress()
Get the progress
|
Projection |
getProjection()
Get the projection
|
SpatialReferenceSystem |
getSrs()
Get the Spatial Reference System
|
protected Projection |
getSrsProjection()
Get the projection for creating the Spatial Reference System
|
String |
getTableName()
Get the table name
|
int |
getTransactionLimit()
Get the single transaction limit
|
static GeoPackageDataType |
getType(Object value)
Get the type for the object value
|
static Object |
getValue(Object value,
GeoPackageDataType type)
Get the value for the object value with the data type
|
protected Object |
getValue(String column,
Object value)
Get the column value
|
protected void |
initializeTable()
Initialize after the feature table is created
|
boolean |
isActive()
Determine if the feature generator should remain active
|
protected abstract void |
saveFeature(Geometry geometry,
Map<String,Object> values)
Save the feature
|
void |
setBoundingBox(BoundingBox boundingBox)
Set the bounding box
|
void |
setBoundingBoxProjection(Projection boundingBoxProjection)
Set the bounding box projection
|
void |
setProgress(GeoPackageProgress progress)
Set the progress
|
void |
setProjection(Projection projection)
Set the projection
|
void |
setTransactionLimit(int transactionLimit)
Set the single transaction limit
|
protected static final Projection EPSG_WGS84
protected final GeoPackageCore geoPackage
protected final String tableName
protected BoundingBox boundingBox
protected Projection boundingBoxProjection
protected Projection projection
protected int transactionLimit
protected GeoPackageProgress progress
protected GeometryColumns geometryColumns
protected Map<String,FeatureColumn> columns
protected SpatialReferenceSystem srs
public FeatureCoreGenerator(GeoPackageCore geoPackage, String tableName)
geoPackage - GeoPackagetableName - table namepublic GeoPackageCore getGeoPackage()
public String getTableName()
public BoundingBox getBoundingBox()
public void setBoundingBox(BoundingBox boundingBox)
boundingBox - bounding boxpublic Projection getBoundingBoxProjection()
public void setBoundingBoxProjection(Projection boundingBoxProjection)
boundingBoxProjection - bounding box projectionpublic Projection getProjection()
public void setProjection(Projection projection)
projection - projectionpublic int getTransactionLimit()
public void setTransactionLimit(int transactionLimit)
transactionLimit - transaction limitpublic GeoPackageProgress getProgress()
public void setProgress(GeoPackageProgress progress)
progress - progresspublic boolean isActive()
public GeometryColumns getGeometryColumns()
public Map<String,FeatureColumn> getColumns()
public SpatialReferenceSystem getSrs()
public abstract int generateFeatures()
throws SQLException
SQLException - upon errorprotected abstract void addColumn(FeatureColumn featureColumn)
featureColumn - feature columnprotected void initializeTable()
protected abstract void saveFeature(Geometry geometry, Map<String,Object> values)
geometry - geometryvalues - column to value mappingprotected void createFeature(Geometry geometry, Map<String,Object> properties) throws SQLException
geometry - geometryproperties - propertiesSQLException - upon errorpublic void createSrs()
throws SQLException
SQLException - upon errorprotected Projection getSrsProjection()
protected void createTable(Map<String,Object> properties) throws SQLException
properties - propertiesSQLException - upon errorprotected Object getValue(String column, Object value)
column - column namevalue - valueprotected FeatureColumn getColumn(String column, Object value)
column - column namevalue - valueprotected FeatureColumn createColumn(String name, Object value)
name - column namevalue - valueprotected GeoPackageGeometryData createGeometryData(Geometry geometry)
geometry - geometrypublic static GeoPackageDataType getType(Object value)
value - valuepublic static Object getValue(Object value, GeoPackageDataType type)
value - valuetype - data typeprotected void addProjection(Projections projections, String authority, String code)
projections - projectionsauthority - authoritycode - codeprotected Projection createProjection(String authority, String code)
authority - authoritycode - codeCopyright © 2019 National Geospatial-Intelligence Agency. All rights reserved.