Package repast.simphony.space.gis
Class FeatureAgentFactory<T>
- java.lang.Object
-
- repast.simphony.space.gis.FeatureAgentFactory<T>
-
- Direct Known Subclasses:
DefaultFeatureAgentFactory
,ShapefileFeatureAgentFactory
public abstract class FeatureAgentFactory<T> extends Object
Abstract factory for adapting agents to features. This creates a FeatureType given an agent class. TODO Geotools [minor] - this class would benefit from cleanup since there's lots of duplicate code, along with subclasses: ShapefileFeatureAgentFactory DefaultFeatureAgentFactory- Author:
- Nick Collier, Eric Tatara
-
-
Field Summary
Fields Modifier and Type Field Description protected List<repast.simphony.space.gis.FeatureAgentFactory.ObjectClassAttributeData>
classAttributeList
static String
GEOM_ATTRIBUTE_NAME
-
Constructor Summary
Constructors Constructor Description FeatureAgentFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
createClassAttributes(Class<T> agentClass)
Create a list of class attributes for the FeatureAgentabstract FeatureAgent
getFeature(T agent, Geography geography)
protected org.opengis.feature.simple.SimpleFeatureType
getFeatureType(Class agentClass, org.opengis.referencing.crs.CoordinateReferenceSystem coordRefSystem, Class<? extends org.locationtech.jts.geom.Geometry> geomClass)
protected org.opengis.feature.simple.SimpleFeatureType
getFeatureType(Class agentClass, org.opengis.referencing.crs.CoordinateReferenceSystem coordRefSystem, Class<? extends org.locationtech.jts.geom.Geometry> geomClass, List<FeatureAttributeAdapter> adapters)
protected org.opengis.feature.simple.SimpleFeatureType
getShapefileFeatureType(Class agentClass, org.opengis.referencing.crs.CoordinateReferenceSystem coordRefSystem, Class<? extends org.locationtech.jts.geom.Geometry> geomClass)
Gets a feature type appropriate for writing to shapefile.protected org.opengis.feature.simple.SimpleFeatureType
getShapefileFeatureType(Class agentClass, org.opengis.referencing.crs.CoordinateReferenceSystem coordRefSystem, Class<? extends org.locationtech.jts.geom.Geometry> geomClass, List<FeatureAttributeAdapter> adapters)
Gets a feature type appropriate for writing to shapefile.
-
-
-
Field Detail
-
GEOM_ATTRIBUTE_NAME
public static final String GEOM_ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
classAttributeList
protected List<repast.simphony.space.gis.FeatureAgentFactory.ObjectClassAttributeData> classAttributeList
-
-
Method Detail
-
getFeature
public abstract FeatureAgent getFeature(T agent, Geography geography)
-
getShapefileFeatureType
protected org.opengis.feature.simple.SimpleFeatureType getShapefileFeatureType(Class agentClass, org.opengis.referencing.crs.CoordinateReferenceSystem coordRefSystem, Class<? extends org.locationtech.jts.geom.Geometry> geomClass) throws IntrospectionException, org.geotools.feature.SchemaException
Gets a feature type appropriate for writing to shapefile.- Parameters:
agentClass
-coordRefSystem
-geomClass
-- Returns:
- Throws:
IntrospectionException
org.geotools.feature.SchemaException
-
getShapefileFeatureType
protected org.opengis.feature.simple.SimpleFeatureType getShapefileFeatureType(Class agentClass, org.opengis.referencing.crs.CoordinateReferenceSystem coordRefSystem, Class<? extends org.locationtech.jts.geom.Geometry> geomClass, List<FeatureAttributeAdapter> adapters) throws IntrospectionException, org.geotools.feature.SchemaException
Gets a feature type appropriate for writing to shapefile.- Parameters:
agentClass
-coordRefSystem
-geomClass
-- Returns:
- Throws:
IntrospectionException
org.geotools.feature.SchemaException
-
getFeatureType
protected org.opengis.feature.simple.SimpleFeatureType getFeatureType(Class agentClass, org.opengis.referencing.crs.CoordinateReferenceSystem coordRefSystem, Class<? extends org.locationtech.jts.geom.Geometry> geomClass) throws IntrospectionException, org.geotools.feature.SchemaException
- Throws:
IntrospectionException
org.geotools.feature.SchemaException
-
getFeatureType
protected org.opengis.feature.simple.SimpleFeatureType getFeatureType(Class agentClass, org.opengis.referencing.crs.CoordinateReferenceSystem coordRefSystem, Class<? extends org.locationtech.jts.geom.Geometry> geomClass, List<FeatureAttributeAdapter> adapters) throws IntrospectionException, org.geotools.feature.SchemaException
- Throws:
IntrospectionException
org.geotools.feature.SchemaException
-
-