|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--uchicago.src.sim.network.DefaultNode
|
+--uchicago.src.sim.gis.PolygonAdapter
This is an adapter between a geotools Polygon, a JTS Polygon and a Repast Node. It contains all of the good bits from each of those.
| Nested Class Summary |
| Nested classes inherited from class uchicago.src.sim.network.DefaultNode |
DefaultNode.OrderedHashMap |
| Field Summary | |
protected Hashtable |
attributes
|
protected com.vividsolutions.jts.geom.Geometry |
geometry
|
protected String |
label
|
protected boolean |
multi
|
protected LinePoint[] |
points
|
| Fields inherited from class uchicago.src.sim.network.DefaultNode |
inEdges, inMap, outEdges, outMap |
| Constructor Summary | |
PolygonAdapter()
creates an empty PolygonAdapter. |
|
PolygonAdapter(org.geotools.feature.Feature f)
creates a PolygonAdapter from a geotools feature. |
|
PolygonAdapter(com.vividsolutions.jts.geom.Geometry geo,
Hashtable attr)
Creates a PolygonAdapter from a geometry and an attributes table. |
|
| Method Summary | |
void |
addAttribute(String key,
Object value)
add an attribute to this feature. |
boolean |
crosses(RepastGisFeature g)
Returns true if the feature is a "multi" type. |
boolean |
disjoint(RepastGisFeature g)
Returns true if the feature is a "multi" type. |
Object |
getAttribute(String key)
retrieve an attribute from this feature. |
String[] |
getAttributeNames()
get a list of the Attribute names. |
Hashtable |
getAttributes()
get the attributes table. |
com.vividsolutions.jts.geom.Geometry |
getGeometry()
return the jts geometry from this feature. |
boolean |
intersects(RepastGisFeature g)
Returns true if the feature is a "multi" type. |
boolean |
isMulti()
Returns true if the feature is a "multi" type. |
boolean |
overlaps(RepastGisFeature g)
Returns true if the feature is a "multi" type. |
void |
setAttributes(Hashtable attr)
set the attributes table. |
void |
setFeature(org.geotools.feature.Feature f)
set the feature. |
void |
setGeometry(com.vividsolutions.jts.geom.Geometry geo)
set the jts geometry from this feature |
boolean |
touches(RepastGisFeature g)
Returns true if the feature is a "multi" type. |
boolean |
within(RepastGisFeature g)
Returns true if the feature is a "multi" type. |
| Methods inherited from class uchicago.src.sim.network.DefaultNode |
addInEdge, addInEdges, addOutEdge, addOutEdges, clearInEdges, clearOutEdges, getEdgesFrom, getEdgesTo, getFromNodes, getId, getInDegree, getInEdges, getInNodes, getNode, getNodeLabel, getNumInEdges, getNumOutEdges, getOutDegree, getOutEdges, getOutNodes, getRandomFromNode, getRandomNodeIn, getRandomNodeOut, getRandomToNode, getToNodes, hasEdgeFrom, hasEdgeTo, hasEdgeToOrFrom, makeRandomInEdge, makeRandomOutEdge, removeEdgesFrom, removeEdgesTo, removeInEdge, removeOutEdge, setNodeLabel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Hashtable attributes
protected com.vividsolutions.jts.geom.Geometry geometry
protected LinePoint[] points
protected String label
protected boolean multi
| Constructor Detail |
public PolygonAdapter()
public PolygonAdapter(org.geotools.feature.Feature f)
f -
public PolygonAdapter(com.vividsolutions.jts.geom.Geometry geo,
Hashtable attr)
geo - attr - | Method Detail |
public void setFeature(org.geotools.feature.Feature f)
throws IllegalArgumentException,
org.geotools.feature.IllegalFeatureException
setFeature in interface RepastGisFeaturef -
IllegalArgumentException - IllegalFeatureException
org.geotools.feature.IllegalFeatureExceptionpublic String[] getAttributeNames()
getAttributeNames in interface RepastGisFeature
public void addAttribute(String key,
Object value)
addAttribute in interface RepastGisFeaturekey - value - public Object getAttribute(String key)
getAttribute in interface RepastGisFeaturekey -
public com.vividsolutions.jts.geom.Geometry getGeometry()
getGeometry in interface RepastGisFeature
public void setGeometry(com.vividsolutions.jts.geom.Geometry geo)
throws IllegalArgumentException
setGeometry in interface RepastGisFeaturegeo -
IllegalArgumentException - If geo not a polygon.public void setAttributes(Hashtable attr)
setAttributes in interface RepastGisFeatureattr - public Hashtable getAttributes()
public boolean isMulti()
isMulti in interface RepastGisFeaturepublic boolean intersects(RepastGisFeature g)
intersects in interface RepastGisFeatureg -
public boolean touches(RepastGisFeature g)
touches in interface RepastGisFeatureg -
public boolean within(RepastGisFeature g)
within in interface RepastGisFeatureg -
public boolean crosses(RepastGisFeature g)
crosses in interface RepastGisFeatureg -
public boolean overlaps(RepastGisFeature g)
overlaps in interface RepastGisFeatureg -
public boolean disjoint(RepastGisFeature g)
disjoint in interface RepastGisFeatureg -
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||