org.geotools.feature.type
Class ChoiceAttributeType.Geometric
Object
PropertyDescriptorImpl
AttributeDescriptorImpl
ChoiceAttributeType
ChoiceAttributeType.Geometric
- All Implemented Interfaces:
- AttributeType, GeometryAttributeType, PrimativeAttributeType, AttributeDescriptor, GeometryDescriptor, PropertyDescriptor
- Enclosing class:
- ChoiceAttributeType
public static final class ChoiceAttributeType.Geometric
- extends ChoiceAttributeType
- implements GeometryAttributeType
A special class that is made so a Choice can serve as the Default
Geometry in a FeatureType, by implementing GeometryAttributeType. It
must be a choice between other GeometryAttributeTypes.
- Author:
- Chris Holmes, TOPP
- TODO:
- TODO: Need to write code to check that all the geometry attributes
are in the same crs. Right now we just blindly assume they are
and return the first.
Methods inherited from class ChoiceAttributeType |
calculateNillable, copyChildren, createDefaultValue, duplicate, equals, find, find, getAttributeCount, getAttributeType, getAttributeType, getAttributeTypes, getBinding, getLocalName, getRestriction, hasAttributeType, hashCode, parse, toString, validate |
ChoiceAttributeType.Geometric
public ChoiceAttributeType.Geometric(ChoiceAttributeType.Geometric copy)
ChoiceAttributeType.Geometric
public ChoiceAttributeType.Geometric(String name,
int min,
int max,
GeometryAttributeType[] children,
Filter restriction)
ChoiceAttributeType.Geometric
public ChoiceAttributeType.Geometric(String name,
GeometryAttributeType[] children)
getType
public GeometryType getType()
- Specified by:
getType
in interface AttributeDescriptor
- Specified by:
getType
in interface GeometryDescriptor
- Specified by:
getType
in interface PropertyDescriptor
- Overrides:
getType
in class AttributeDescriptorImpl
getCoordinateSystem
public CoordinateReferenceSystem getCoordinateSystem()
- Description copied from interface:
GeometryAttributeType
- 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.
- Specified by:
getCoordinateSystem
in interface GeometryAttributeType
- Returns:
- The coordinate reference system for this GeometryAttributeType
getCoordinateReferenceSystem
public CoordinateReferenceSystem getCoordinateReferenceSystem()
- Specified by:
getCoordinateReferenceSystem
in interface GeometryDescriptor
getGeometryFactory
public GeometryFactory getGeometryFactory()
- Description copied from interface:
GeometryAttributeType
- 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
- Specified by:
getGeometryFactory
in interface GeometryAttributeType
- Returns:
- GeometryFactory used for new Content
isGeometry
public boolean isGeometry()
- Description copied from interface:
GeometryAttributeType
- Must return
true
- Specified by:
isGeometry
in interface GeometryAttributeType
- Overrides:
isGeometry
in class ChoiceAttributeType
- See Also:
org.geotools.feature.AttributeType#isGeometry()
Copyright © 1996-2010 Geotools. All Rights Reserved.