RePast
v. 2.0

uchicago.src.sim.gis
Interface RepastGisFeature

All Known Subinterfaces:
DrawableGisFeature
All Known Implementing Classes:
DrawableLineString, DrawablePolygon, LineStringAdapter, PointAdapter, PolygonAdapter

public interface RepastGisFeature

This is the basic inteface that defines one of the adapters between the gis features and repast features. It provides methods for setting the data and also the basic geometric operations necessary for gis processing.


Method Summary
 void addAttribute(String key, Object value)
          Add an attribute to the Fature.
 boolean crosses(RepastGisFeature g)
          Defined in the openGis SimpleFeatureSpecification.
 boolean disjoint(RepastGisFeature g)
          Defined in the openGis SimpleFeatureSpecification.
 Object getAttribute(String key)
          Get the value of the Attribute with given name.
 String[] getAttributeNames()
          Gets a list of the Attributes.
 com.vividsolutions.jts.geom.Geometry getGeometry()
          Gets the geometry that defines this feature.
 boolean intersects(RepastGisFeature g)
          Defined in the openGis SimpleFeatureSpecification.
 boolean isMulti()
          Returns true if the feature is a "multi" type.
 boolean overlaps(RepastGisFeature g)
          Defined in the openGis SimpleFeatureSpecification.
 void setAttributes(Hashtable attr)
          Set the attributes for the feature.
 void setFeature(org.geotools.feature.Feature f)
          Set the gis feature.
 void setGeometry(com.vividsolutions.jts.geom.Geometry geo)
          Set the geometry that defines this feature.
 boolean touches(RepastGisFeature g)
          Defined in the openGis SimpleFeatureSpecification.
 boolean within(RepastGisFeature g)
          Defined in the openGis SimpleFeatureSpecification.
 

Method Detail

setFeature

public void setFeature(org.geotools.feature.Feature f)
                throws Exception
Set the gis feature. This feature includes both the geometry data and the attributes.

Parameters:
f - The feature to be added
Throws:
Exception - throws an exception if this is not a proper feature.

getAttributeNames

public String[] getAttributeNames()
Gets a list of the Attributes.

Returns:
list of attributes.

addAttribute

public void addAttribute(String key,
                         Object value)
Add an attribute to the Fature.

Parameters:
key -
value -

getAttribute

public Object getAttribute(String key)
Get the value of the Attribute with given name.

Parameters:
key -
Returns:
Value of Attribute.

getGeometry

public com.vividsolutions.jts.geom.Geometry getGeometry()
Gets the geometry that defines this feature.

Returns:

setGeometry

public void setGeometry(com.vividsolutions.jts.geom.Geometry geo)
                 throws IllegalArgumentException
Set the geometry that defines this feature.

Parameters:
geo -
IllegalArgumentException

setAttributes

public void setAttributes(Hashtable attr)
Set the attributes for the feature.

Parameters:
attr -

isMulti

public boolean isMulti()
Returns true if the feature is a "multi" type.

Returns:
multi

intersects

public boolean intersects(RepastGisFeature g)
Defined in the openGis SimpleFeatureSpecification.

Parameters:
g -
Returns:

touches

public boolean touches(RepastGisFeature g)
Defined in the openGis SimpleFeatureSpecification.

Parameters:
g -
Returns:

within

public boolean within(RepastGisFeature g)
Defined in the openGis SimpleFeatureSpecification.

Parameters:
g -
Returns:

crosses

public boolean crosses(RepastGisFeature g)
Defined in the openGis SimpleFeatureSpecification.

Parameters:
g -
Returns:

overlaps

public boolean overlaps(RepastGisFeature g)
Defined in the openGis SimpleFeatureSpecification.

Parameters:
g -
Returns:

disjoint

public boolean disjoint(RepastGisFeature g)
Defined in the openGis SimpleFeatureSpecification.

Parameters:
g -
Returns:

RePast
v. 2.0

Bug reports and feature requests to RePast