public abstract class WriterHelper extends Object implements ShapeWriterDelegate
defineSchema()
method configures the
instance's fields appropriately and the attributes(SpatialFeature)
method returns the list of attribute values.Modifier and Type | Class and Description |
---|---|
protected static class |
WriterHelper.AttributeDefinition
Name and type of an attribute.
|
Modifier and Type | Field and Description |
---|---|
protected int |
epsgCode |
protected String |
geometryType |
protected List<WriterHelper.AttributeDefinition> |
schema |
protected String |
typeName |
Constructor and Description |
---|
WriterHelper()
Calls
defineSchema() . |
Modifier and Type | Method and Description |
---|---|
List |
attributes(Geometry geometry)
Returns an ordered list of the attributes of a particular feature to be
added to the Shapefile.
|
abstract List |
attributes(SpatialFeature feature) |
abstract void |
defineSchema() |
SimpleFeatureType |
featureType(GeometryDescriptor geometryDescriptor)
Returns a definition of the feature type and the attributes to be
written to the Shapefile.
|
protected List<WriterHelper.AttributeDefinition> schema
protected String geometryType
protected String typeName
protected int epsgCode
public WriterHelper()
defineSchema()
.public abstract void defineSchema()
public abstract List attributes(SpatialFeature feature)
public SimpleFeatureType featureType(GeometryDescriptor geometryDescriptor) throws SchemaException
featureType
in interface ShapeWriterDelegate
geometryDescriptor
- a class providing the magic constant used by
GeoTools to identify the geometry column in the ShapefileSchemaException
DataUtilities.createType
public List attributes(Geometry geometry)
featureType(org.opengis.feature.type.GeometryDescriptor)
definition.attributes
in interface ShapeWriterDelegate
geometry
- the feature the attributes of which to returnGeometry.getUserData()