## org.opengis.feature
Interface Feature

All Superinterfaces:
  Attribute, ComplexAttribute, Property

All Known Subinterfaces:
  DataFeatureCollection, FeatureCollection, SimpleFeature, SimpleFeatureCollection

    public interface Feature

extends ComplexAttribute

A Feature, of arbitrary complexity, with at a minimum Geometry and CRS information.

We have allowed for additional "temporary" user data to be associated with Attributes in order to facilitate processing services. These services traditionally end up hold "shadow" structures such as a HashMap referenced by FeatureID.

- putClientProperty(String key, Object value );
- getClientProperty(String key);

Method Summary
`BoundingBox` `getBounds()` The bounds of this Feature, if available.
`CoordinateReferenceSystem` `getCRS()` The CRS of this feature (if known).
`GeometryAttribute` `getDefaultGeometry()`
`String` `getID()` Feature ID, should be unique, inmutable identification for physical Feature being modeled.
`FeatureType` `getType()` Access the type of this Feature.
`Object` `getUserData(Object key)` Retrieve associated process specific information.
`void` `putUserData(Object key, Object value)` Allows the association of process specific information.
`void` `setCRS(CoordinateReferenceSystem crs)` Sets the CRS of the feature.
`void` `setDefaultGeometry(GeometryAttribute geometryAttribute)` Sets the default geometry attribute.

Methods inherited from interface ComplexAttribute
`associations, attributes, get, getDescriptor, getValue, setValue`

Methods inherited from interface Attribute
`nillable, operation, setValue`

Methods inherited from interface Property
`descriptor, name`

Method Detail

### putUserData

    void putUserData(Object key,
                     Object value)

  Allows the association of process specific information.

  Parameters:
    `key` - Object used to allow String and Enum keys
    `value` - Associated with key

### getUserData

    Object getUserData(Object key)

  Retrieve associated process specific information.

  Parameters:
    `key` - Object used to allow String and Enum keys

### getID

    String getID()

  Feature ID, should be unique, inmutable identification for physical Feature being modeled.

  Care must be taken to avoid generation based things that will change over time (mutable attribtues, or shapefile rows). It is hoped that the domain being modeled will have specific identity practices in palce that you can depend on, as example Airports make use of standards code such as YVR for the Victoria International Airport.

  As a consequence of this different Application Descriptors representing the same physical content should end up with the same idenification. This is a "dream", on the off chance is obtained you may wish to prepend the typeName to this ID when producing GML. This would only be a problem when creating one GML document based on two application schemas for Airport, both of which succeeded in using the actual physical identification strings for their ID.

  Specified by:
    `getID` in interface `Attribute`
  Returns:
    Feature ID generated in an opaque fashion, may not be null

### getCRS

    CoordinateReferenceSystem getCRS()

  The CRS of this feature (if known).

  This information is available as an optional attribute in a GML document, the idea is sound: if avalable the CRS information for a feature should be available here.

  Returns:
    CoordinateReferenceSystem if set or null.

### setCRS

    void setCRS(CoordinateReferenceSystem crs)

  Sets the CRS of the feature.

  Parameters:
    `crs` - The coordinate reference system of the feature.

### getBounds

    BoundingBox getBounds()

  The bounds of this Feature, if available.

  This should be a "shadow" of information available as part of the attribute model, for instance of BoundedFeatureType should show bounds as a required attribute and you would be able to expect a non-null value from this method.

  It is assumed the returned Envelope has a CRS, if not you can assume the value of getCRS() applies?

  Returns:
    Bounds if available or null

### getType

    FeatureType getType()

  Access the type of this Feature.

  Specified by:
    `getType` in interface `Attribute`
  Specified by:
    `getType` in interface `ComplexAttribute`
  Specified by:
    `getType` in interface `Property`
  Returns:
    AttributeType information describing allowable content

### getDefaultGeometry

    GeometryAttribute getDefaultGeometry()

  Returns:
    The default geometry attribute.

### setDefaultGeometry

    void setDefaultGeometry(GeometryAttribute geometryAttribute)

  Sets the default geometry attribute.

  Parameters:
    `geom` - A geometry attribute.

Copyright © 1994-2008 Open Geospatial Consortium. All Rights Reserved.