uchicago.src.sim.Schelling
Class SchellingPolygon
java.lang.Object
|
+--uchicago.src.sim.network.DefaultNode
|
+--uchicago.src.sim.gis.PolygonAdapter
|
+--uchicago.src.sim.gui.DrawablePolygon
|
+--uchicago.src.sim.Schelling.SchellingPolygon
- All Implemented Interfaces:
- CustomProbeable, DrawableGisFeature, DrawableMultiFeature, Node, RepastGisFeature, SpatialNode
- public class SchellingPolygon
- extends DrawablePolygon
- implements SpatialNode, CustomProbeable
This is a polygon for use in the schelling model. The probeable fields only
apply to this particular shapefile. You need to customize the fields to the data
in your shape file. If you run this on another shapefile without changing the params,
and get/set methods it will break.
| Methods inherited from class uchicago.src.sim.gis.PolygonAdapter |
addAttribute, crosses, disjoint, getAttribute, getAttributeNames, getAttributes, getGeometry, intersects, isMulti, overlaps, setAttributes, setFeature, setGeometry, touches, within |
| 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 interface uchicago.src.sim.network.Node |
addInEdge, addOutEdge, clearInEdges, clearOutEdges, getId, getInEdges, getNodeLabel, getOutEdges, hasEdgeFrom, hasEdgeTo, removeInEdge, removeOutEdge, setNodeLabel |
| Methods inherited from interface uchicago.src.sim.gis.RepastGisFeature |
addAttribute, crosses, disjoint, getAttribute, getAttributeNames, getGeometry, intersects, isMulti, overlaps, setAttributes, setFeature, setGeometry, touches, within |
SchellingPolygon
public SchellingPolygon(com.vividsolutions.jts.geom.Geometry geo,
Hashtable attr)
SchellingPolygon
public SchellingPolygon(org.geotools.feature.Feature f)
getPop
public double getPop()
- population is included in the shapefile.
- Returns:
getZip
public String getZip()
- zipcode is included in the shapefile.
- Returns:
getName
public String getName()
- name is included in the shapefile.
- Returns:
getProbedProperties
public String[] getProbedProperties()
- These properties only apply to this shapefile.
- Specified by:
getProbedProperties in interface CustomProbeable
- Returns:
getLayer
public GisLayer getLayer()
setLayer
public void setLayer(GisLayer layer)
getAgent
public SchellingAgent getAgent()
setAgent
public void setAgent(SchellingAgent agent)
reset
public void reset()
- clear out the agent and reset the color.
getCentroid
public com.vividsolutions.jts.geom.Point getCentroid()
setCentroid
public void setCentroid(com.vividsolutions.jts.geom.Point centroid)
getNeighbors
public ArrayList getNeighbors()
getOccupied
public boolean getOccupied()
draw
public void draw(SimGraphics g)
- Specified by:
draw in interface DrawableGisFeature- Overrides:
draw in class DrawablePolygon
getX
public double getX()
- Specified by:
getX in interface SpatialNode
getY
public double getY()
- Specified by:
getY in interface SpatialNode
getZ
public double getZ()
- Specified by:
getZ in interface SpatialNode
setX
public void setX(double x)
- Specified by:
setX in interface SpatialNode
setY
public void setY(double y)
- Specified by:
setY in interface SpatialNode
setZ
public void setZ(double z)
- Specified by:
setZ in interface SpatialNode
toString
public String toString()
- Overrides:
toString in class Object
Bug reports and feature requests to RePast