|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.cesr.sesamgim.util.GShapefileLoader<AgentT,T>
public class GShapefileLoader<AgentT extends GimMilieuAgent<AgentT>,T extends GimSuperContextAssignable<AgentT>>
SesamGIM - Geographical Initialisation for Milieu Agents
| Field Summary | |
|---|---|
protected Class<? extends GimAreaContext> |
areaContextClass
|
| Constructor Summary | |
|---|---|
GShapefileLoader(Class<T> clazz,
URL shapefile,
repast.simphony.space.gis.Geography geography)
Creates a shape file loader for agents of the specified class and whose data source is the specified shape file. |
|
| Method Summary | |
|---|---|
protected GimAreaContext<AgentT> |
checkWithinArea(com.vividsolutions.jts.geom.Geometry geometry,
boolean allowOverhang,
boolean useCentroid)
Checks whether the given PLZ area geometry intersects with any area shape. |
boolean |
hasNext()
Returns true if there are more features left to process, otherwise false. |
void |
load()
Creates all the agents for the shape file features, setting each agent's properties to the value of a feature's relevant attributes. |
T |
next()
Creates the next agent from the next feature in the shapefile, setting that agent's properties to the value of that feature's relevant attributes. |
T |
next(GimMcInitialiseService<AgentT> mcInitService)
Used for GimPlzContexts. |
T |
next(GimPlzInitialiseService<AgentT> plzInitService)
Used for GimPlzContexts. |
T |
next(T obj)
Sets the specified object's properties to the relevant attributes values of the next feature. |
T |
nextWithArgs(Object... constructorArgs)
Creates the next agent from the next feature in the shapefile, setting that agent's properties to the value of that feature's relevant attributes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Class<? extends GimAreaContext> areaContextClass
| Constructor Detail |
|---|
public GShapefileLoader(Class<T> clazz,
URL shapefile,
repast.simphony.space.gis.Geography geography)
clazz - the agent classshapefile - the shape file that serves as the data source for the agent propertiesgeography - the geography to hold spatial locations of the agentscontext - the context to add the agents to| Method Detail |
|---|
protected GimAreaContext<AgentT> checkWithinArea(com.vividsolutions.jts.geom.Geometry geometry,
boolean allowOverhang,
boolean useCentroid)
geometry - allowOverhang - if true resulting shapes may be larger then given geometry (important for plz areas)
public void load()
public T next()
public T nextWithArgs(Object... constructorArgs)
throws IllegalArgumentException
constructorArgs - parameters to pass to the constructor when creating the agent.
IllegalArgumentException - if the constructor args don't match a constructor.public T next(T obj)
obj - the object whose properties we want to set.
public T next(GimPlzInitialiseService<AgentT> plzInitService)
GimPlzContexts.
plzInitService -
public T next(GimMcInitialiseService<AgentT> mcInitService)
GimPlzContexts.
plzInitService -
public boolean hasNext()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||