Package org.geotools.grid
Class DefaultGridFeatureBuilder
Object
GridFeatureBuilder
DefaultGridFeatureBuilder
A basic implementation of 
GridFeatureBuilder which will create a SimpleFeatureType having two
 properties:
 - element - TYPE Polygon
 - id - TYPE Integer
 
Grid elements will be assigned sequential id values starting with 1.
- Since:
 - 2.7
 - Author:
 - mbedward
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault feature TYPE name: "grid"static final StringName used for the integer id attribute: "id"Fields inherited from class GridFeatureBuilder
DEFAULT_GEOMETRY_ATTRIBUTE_NAME - 
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance with a feature TYPE having the default name and a null coordinate reference system.DefaultGridFeatureBuilder(String typeName, CoordinateReferenceSystem crs) Creates a new instance.Creates a new instance with a feature TYPE having the default name and the supplied coordinate reference system. - 
Method Summary
Modifier and TypeMethodDescriptionprotected static SimpleFeatureTypecreateType(String typeName, CoordinateReferenceSystem crs) Creates the feature TYPEvoidsetAttributes(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.Methods inherited from class GridFeatureBuilder
getCreateFeature, getFeatureID, getType 
- 
Field Details
- 
DEFAULT_TYPE_NAME
Default feature TYPE name: "grid"- See Also:
 
 - 
ID_ATTRIBUTE_NAME
Name used for the integer id attribute: "id"- See Also:
 
 
 - 
 - 
Constructor Details
- 
DefaultGridFeatureBuilder
public DefaultGridFeatureBuilder()Creates a new instance with a feature TYPE having the default name and a null coordinate reference system.- See Also:
 
 - 
DefaultGridFeatureBuilder
Creates a new instance with a feature TYPE having the default name and the supplied coordinate reference system.- Parameters:
 crs- coordinate reference system (may benull)- See Also:
 
 - 
DefaultGridFeatureBuilder
Creates a new instance.- Parameters:
 typeName- name for the feature TYPE; ifnullor empty, DEFAULT_TYPE_NAME will be usedcrs- coordinate reference system (may benull)
 
 - 
 - 
Method Details
- 
createType
Creates the feature TYPE- Parameters:
 typeName- name for the feature TYPE; ifnullor empty, DEFAULT_TYPE_NAME will be usedcrs- coordinate reference system (may benull)- Returns:
 - the feature TYPE
 
 - 
setAttributes
Overrides GridFeatureBuilder.setAttributes(GridElement, Map) to assign a sequential integer id value to each grid element feature as it is constructed.- Specified by:
 setAttributesin classGridFeatureBuilder- Parameters:
 el- the element from which the new feature is being constructedattributes- aMapwith the single key "id"
 
 -