org.geotools.feature
Interface GeometryAttributeType

All Superinterfaces:
AttributeDescriptor, AttributeType, GeometryDescriptor, PrimativeAttributeType, PropertyDescriptor
All Known Implementing Classes:
ChoiceAttributeType.Geometric, GeometricAttributeType

public interface GeometryAttributeType
extends AttributeType, PrimativeAttributeType, GeometryDescriptor

A CoordinateSystem aware Geometry AttributeType.

This class is the bridge between our FeatureType/AttributeType classes and the CoordianteSystem.

This also allows access to the GeometryFactory used by this GeometryAttributeType parse( Object ) method.

With JTS14 you can use GeometryFactory to to provide your own CoordianteSequence representation. CoordinateSystem is given the responsiblity of providing this class for the GeometryAttributeType as only it knows the CoordianteSequence class and PercisionModel mosted suitable. It also may know an SRID number suitable for the GeometryFactory to use when constructing new Geometry objects.

It is recomended that the CoordinateSystem GeometryFactory also supply the CoordinateSystem as the value for Geometry.getUserData().

Author:
Jody Garnett, Refractions Research, Inc.
Module:

Method Summary
 Class getBinding()
          Type must be an sub type of Geometry.class.
 CoordinateReferenceSystem getCoordinateSystem()
          Retrieve the CS_CoordinateSystem used by this GeometryAttributeType.
 GeometryFactory getGeometryFactory()
          Deprecated. Please use GeometrFactory associated with your FeatureFactory using the hinting system.
 Filter getRestriction()
          Restriction is assumed to be in agreement with Geometry class indicated.
 boolean isGeometry()
          Deprecated. replace with type instnaceof GeometryAttribtueType
 
Methods inherited from interface GeometryDescriptor
getCoordinateReferenceSystem, getType
 

Method Detail

getBinding

Class getBinding()
Type must be an sub type of Geometry.class.

If this was java I would say Class. Warning this will need revisiting for Geotools 2.2 when GeoAPI Geometry enters use.

Specified by:
getBinding in interface AttributeType
See Also:
AttributeType.getBinding()

getRestriction

Filter getRestriction()
Restriction is assumed to be in agreement with Geometry class indicated.

Specified by:
getRestriction in interface AttributeType
Specified by:
getRestriction in interface PrimativeAttributeType
Returns:
Filter, or Filter.INCLUDE if no restriction is needed.
See Also:
AttributeType.getRestriction()

getCoordinateSystem

CoordinateReferenceSystem getCoordinateSystem()
Retrieve the CS_CoordinateSystem used by this GeometryAttributeType.

OUT OF DATE: The class CoordinateSystem holds a GeometryFactory that is used for creating new content. By extension this includes the SRID, PercisionModel and CoordinateSequenceFactory information.

Returns:
The coordinate reference system for this GeometryAttributeType

getGeometryFactory

GeometryFactory getGeometryFactory()
Deprecated. Please use GeometrFactory associated with your FeatureFactory using the hinting system.

The Geometryfactory used for creating new content.

Replace with the following code:


 Map hints = new HashMap();
 hints.put( CoordinateReferneceSystem.class, type.getCoordinateSystem() );
 GeometryFactory gf = FactoryFinder.getGeometryFactory( Map hints );

 // You can now use gf create methods
 

Returns:
GeometryFactory used for new Content

isGeometry

boolean isGeometry()
Deprecated. replace with type instnaceof GeometryAttribtueType

Must return true

See Also:
org.geotools.feature.AttributeType#isGeometry()


Copyright © 1996-2009 Geotools. All Rights Reserved.