public final class DefaultGridFeatureBuilder extends GridFeatureBuilder
GridFeatureBuilder
which will create a SimpleFeatureType
having two properties:
Grid elements will be assigned sequential id values starting with 1.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_TYPE_NAME
Default feature TYPE name: "grid"
|
static String |
ID_ATTRIBUTE_NAME
Name used for the integer id attribute: "id"
|
DEFAULT_GEOMETRY_ATTRIBUTE_NAME
Constructor and Description |
---|
DefaultGridFeatureBuilder()
Creates a new instance with a feature TYPE having the default name and a null coordinate
reference system.
|
DefaultGridFeatureBuilder(CoordinateReferenceSystem crs)
Creates a new instance with a feature TYPE having the default name and the supplied
coordinate reference system.
|
DefaultGridFeatureBuilder(String typeName,
CoordinateReferenceSystem crs)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected static SimpleFeatureType |
createType(String typeName,
CoordinateReferenceSystem crs)
Creates the feature TYPE
|
void |
setAttributes(GridElement el,
Map<String,Object> attributes)
Overrides GridFeatureBuilder.setAttributes(GridElement, Map) to assign a
sequential integer id value to each grid element feature as it is constructed.
|
getCreateFeature, getFeatureID, getType
public static final String DEFAULT_TYPE_NAME
public static final String ID_ATTRIBUTE_NAME
public DefaultGridFeatureBuilder()
DEFAULT_TYPE_NAME
public DefaultGridFeatureBuilder(CoordinateReferenceSystem crs)
crs
- coordinate reference system (may be null
)DEFAULT_TYPE_NAME
public DefaultGridFeatureBuilder(String typeName, CoordinateReferenceSystem crs)
typeName
- name for the feature TYPE; if null
or empty, DEFAULT_TYPE_NAME will be usedcrs
- coordinate reference system (may be null
)protected static SimpleFeatureType createType(String typeName, CoordinateReferenceSystem crs)
typeName
- name for the feature TYPE; if null
or empty, DEFAULT_TYPE_NAME will be usedcrs
- coordinate reference system (may be null
)public void setAttributes(GridElement el, Map<String,Object> attributes)
setAttributes
in class GridFeatureBuilder
el
- the element from which the new feature is being constructedattributes
- a Map
with the single key "id"Copyright © 1996–2019 Geotools. All rights reserved.