public class OrthoLineFeatureBuilder extends GridFeatureBuilder
LineFeatureBuilder
which will create a SimpleFeatureType
having two properties:
Line 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: "linegrid"
|
protected int |
id |
static String |
ID_ATTRIBUTE_NAME
Name used for the integer id attribute: "id"
|
static String |
LEVEL_ATTRIBUTE_NAME
Name of the Integer level attribute ("level")
|
static String |
VALUE_ATTRIBUTE_NAME
Name of the Object value attribute ("value")
|
DEFAULT_GEOMETRY_ATTRIBUTE_NAME
Constructor and Description |
---|
OrthoLineFeatureBuilder()
Creates a new instance with a feature TYPE having the default name and a null coordinate
reference system.
|
OrthoLineFeatureBuilder(CoordinateReferenceSystem crs)
Creates a new instance with a feature TYPE having the default name and the supplied
coordinate reference system.
|
OrthoLineFeatureBuilder(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)
Sets the following attributes in the provided
Map :
id: sequential integer
level: integer level of associated with the element
value: X-ordinate for a vertical line; Y-ordinate for a horizontal line
|
getCreateFeature, getFeatureID, getType
public static final String DEFAULT_TYPE_NAME
public static final String ID_ATTRIBUTE_NAME
public static final String LEVEL_ATTRIBUTE_NAME
public static final String VALUE_ATTRIBUTE_NAME
protected int id
public OrthoLineFeatureBuilder()
DEFAULT_TYPE_NAME
public OrthoLineFeatureBuilder(CoordinateReferenceSystem crs)
crs
- coordinate reference system (may be null
)DEFAULT_TYPE_NAME
public OrthoLineFeatureBuilder(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)
Map
:
setAttributes
in class GridFeatureBuilder
el
- the element from which the new feature is being constructedattributes
- a Map
into which the attributes will be putCopyright © 1996–2022 Geotools. All rights reserved.