Class OrthoLineFeatureBuilder

Object
GridFeatureBuilder
OrthoLineFeatureBuilder

public class OrthoLineFeatureBuilder extends GridFeatureBuilder
A basic implementation of LineFeatureBuilder which will create a SimpleFeatureType having two properties:
  • element - TYPE LineString
  • id - TYPE Integer
The attribute names can also be referred to using LineFeatureBuilder#DEFAULT_GEOMETRY_ATTRIBUTE_NAME and ID_ATTRIBUTE_NAME

Line elements will be assigned sequential id values starting with 1.

Since:
2.7
Author:
mbedward
  • Field Details

    • DEFAULT_TYPE_NAME

      public static final String DEFAULT_TYPE_NAME
      Default feature TYPE name: "linegrid"
      See Also:
    • ID_ATTRIBUTE_NAME

      public static final String ID_ATTRIBUTE_NAME
      Name used for the integer id attribute: "id"
      See Also:
    • LEVEL_ATTRIBUTE_NAME

      public static final String LEVEL_ATTRIBUTE_NAME
      Name of the Integer level attribute ("level")
      See Also:
    • VALUE_ATTRIBUTE_NAME

      public static final String VALUE_ATTRIBUTE_NAME
      Name of the Object value attribute ("value")
      See Also:
    • id

      protected int id
  • Constructor Details

    • OrthoLineFeatureBuilder

      public OrthoLineFeatureBuilder()
      Creates a new instance with a feature TYPE having the default name and a null coordinate reference system.
      See Also:
    • OrthoLineFeatureBuilder

      public OrthoLineFeatureBuilder(CoordinateReferenceSystem crs)
      Creates a new instance with a feature TYPE having the default name and the supplied coordinate reference system.
      Parameters:
      crs - coordinate reference system (may be null)
      See Also:
    • OrthoLineFeatureBuilder

      public OrthoLineFeatureBuilder(String typeName, CoordinateReferenceSystem crs)
      Creates a new instance.
      Parameters:
      typeName - name for the feature TYPE; if null or empty, DEFAULT_TYPE_NAME will be used
      crs - coordinate reference system (may be null)
  • Method Details

    • createType

      protected static SimpleFeatureType createType(String typeName, CoordinateReferenceSystem crs)
      Creates the feature TYPE
      Parameters:
      typeName - name for the feature TYPE; if null or empty, DEFAULT_TYPE_NAME will be used
      crs - coordinate reference system (may be null)
      Returns:
      the feature TYPE
    • setAttributes

      public 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
      Specified by:
      setAttributes in class GridFeatureBuilder
      Parameters:
      el - the element from which the new feature is being constructed
      attributes - a Map into which the attributes will be put