Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.opengis.feature
Interface GeometryAttribute

All Superinterfaces:
  Attribute, Property

    public interface GeometryAttribute

extends Attribute

Represent a Geometry as an attribute content.

This class is cotton candy and does not add any new modelling ability beyond what could be accomplished by type narrowing an Attribute to return one of our Geometry classes based on the ISO 19107 specification.

What this class does allows is a bridge to applications making use of a more simple model of geometry. Two are in popular use:

- Java 2D Shape: Simple topology representation used for Graphics2D, with no concept of coordinate reference system.
- JTS Topology Suite Geometry: topology representation used by the SFSQL specification, coordinate reference system is indicated by a getSRS() integer (the meaning of which is application specific). In practice most applications use this value to store a EPSG code.

This GeometryAttribute interface supplements these strict definitions of topology with the information needed for wider use as a geometry.

- getCRS() - the CoordinateReferenceSystem of the geometry value
- getBounds() - a BoundingBox for the geometry value

We are not specifying the topology binding here, an application may safely implement this interface using any of the above options (or make use of propiatary definitions such as oracle SDO). We recommend the ISO 19107 Geometry definition supplied with GeoAPI simply because we know it is complete.

Method Summary
`BoundingBox` | `getBounds()` The bounds of this geometry.
`CoordinateReferenceSystem` | `getCRS()` The Coordinate Reference System of this geometry.
`GeometryType` | `getType()` GeometryType should be configured with a Geometry for getJavaType.
`Object` | `getValue()` Retrieve Geometry.
`void` | `setBounds(BoundingBox bounds)` Although this is tipically a derrived quantity of the contents, this value is often available in precomputed form from data providers.
`void` | `setCRS(CoordinateReferenceSystem crs)` Sets the coordinate reference system for the attribute.
`void` | `setValue(Object geom)` Set provided Geometry We may want to relax this to Object to allow for JTS or GeoAPI based objects for the first release.

Methods inherited from interface Attribute
`getDescriptor, getID, nillable, operation`

Methods inherited from interface Property
`descriptor, name`

Method Detail

### getCRS

    CoordinateReferenceSystem getCRS()

  The Coordinate Reference System of this geometry.

  This may not be needed when using GeoAPI Geometry, it would be a simple helper method for: ((Geometry)getValue()).getCoordinateReferenceSystem().

  As it stands this method will help transition code over from JTS as GeoAPI Geometry implementations are made avaialble.

### setCRS

    void setCRS(CoordinateReferenceSystem crs)

  Sets the coordinate reference system for the attribute.

### getBounds

    BoundingBox getBounds()

  The bounds of this geometry.

  This may not be needed when using GeoAPI Geometry, it would be a simple helper method for: ((Geometry)getValue()).getEnvelope().

  As it stands this method will help transition code over from JTS as GeoAPI Geometry implementations are made avaialble.

### setBounds

    void setBounds(BoundingBox bounds)

  Although this is tipically a derrived quantity of the contents, this value is often available in precomputed form from data providers.

  This method allows a data provider to store the bounds information associated with the contents of this geometry attribute.

  Parameters:
    `bounds` -

### getType

    GeometryType getType()

  GeometryType should be configured with a Geometry for getJavaType.

  Q: If needed a set of well-known GeometryType can be constructed, may be needed to report CRS and Bounds constraints on data? A: It was needed when we switched over to Attribute

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

### getValue

    Object getValue()

  Retrieve Geometry.

  We may want to relax this to Object to allow for JTS or GeoAPI based objects for the first release.

  Specified by:
    `getValue` in interface `Attribute`
  Returns:
    Value Object of the class indicated by getType().getBinding()

### setValue

    void setValue(Object geom)

  Set provided Geometry

  We may want to relax this to Object to allow for JTS or GeoAPI based objects for the first release.

  Specified by:
    `setValue` in interface `Attribute`
  Parameters:
    `geom` - Object of the class indicated by getType().getBinding()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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