|
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.DefaultEdge
|
+--uchicago.src.sim.gis.LineStringAdapter
This is an adapter between a geotools LineString, a JTS LineString and a Repast Edge. It contains all of the good bits from each of those.
| Field Summary | |
protected Hashtable |
attributes
|
protected com.vividsolutions.jts.geom.Geometry |
geometry
|
protected boolean |
multi
|
protected LinePoint[] |
points
|
| Fields inherited from class uchicago.src.sim.network.DefaultEdge |
from, label, strength, to, type |
| Constructor Summary | |
LineStringAdapter(org.geotools.feature.Feature f)
Create a LineString adapter from a Geotools feature. |
|
LineStringAdapter(com.vividsolutions.jts.geom.Geometry geo,
Hashtable attr)
Create a lineStringAdapter from a geometry (linestring) and an attributes table. |
|
LineStringAdapter(SpatialNode from,
SpatialNode to)
Create a lineString from two spatial nodes. |
|
| Method Summary | |
void |
addAttribute(String key,
Object value)
add another attribute to this feature. |
boolean |
crosses(RepastGisFeature g)
Defined in the openGis SimpleFeatureSpecification. |
boolean |
disjoint(RepastGisFeature g)
Defined in the openGis SimpleFeatureSpecification. |
Object |
getAttribute(String key)
get an attribute from this feature. |
String[] |
getAttributeNames()
returns a list of the names of the attributes for this feature. |
com.vividsolutions.jts.geom.Geometry |
getGeometry()
Gets the geometry that defines this feature. |
double |
getLength()
Calculates the distance of the linestring. |
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 attribute table for this feature. |
void |
setFeature(org.geotools.feature.Feature f)
Set the gis feature. |
void |
setGeometry(com.vividsolutions.jts.geom.Geometry geo)
set the geometry for this feature. |
boolean |
touches(RepastGisFeature g)
Defined in the openGis SimpleFeatureSpecification. |
boolean |
within(RepastGisFeature g)
Defined in the openGis SimpleFeatureSpecification. |
| Methods inherited from class uchicago.src.sim.network.DefaultEdge |
getFrom, getLabel, getStrength, getTo, getType, setFrom, setLabel, setStrength, setTo, setType |
| 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 boolean multi
| Constructor Detail |
public LineStringAdapter(SpatialNode from,
SpatialNode to)
from - to -
public LineStringAdapter(org.geotools.feature.Feature f)
throws Exception
f -
Exception
public LineStringAdapter(com.vividsolutions.jts.geom.Geometry geo,
Hashtable attr)
throws Exception
geo - attr - | Method Detail |
public double getLength()
public void setGeometry(com.vividsolutions.jts.geom.Geometry geo)
throws IllegalArgumentException
setGeometry in interface RepastGisFeaturegeo -
IllegalArgumentException
public void setFeature(org.geotools.feature.Feature f)
throws Exception
RepastGisFeature
setFeature in interface RepastGisFeaturef - The feature to be added
Exception - throws an exception if this is not a proper feature.public void setAttributes(Hashtable attr)
setAttributes in interface RepastGisFeatureattr - public 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()
RepastGisFeature
getGeometry in interface RepastGisFeaturepublic 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 | ||||||||||