anl.repast.gis.data
Class GeotoolsData

java.lang.Object
  extended by anl.repast.gis.data.GeotoolsData

public class GeotoolsData
extends java.lang.Object

Author:
Robert Najlis

Constructor Summary
GeotoolsData()
           
 
Method Summary
 java.util.ArrayList createAgents(java.lang.Class clazz, java.lang.String datasource)
           
 int getAttributePosition(java.lang.String name, org.geotools.feature.FeatureType ft)
           
 double[] getCenter(com.vividsolutions.jts.geom.Envelope envelope)
           
 com.vividsolutions.jts.geom.Envelope getEnvelope(java.lang.String datasource)
           
 java.lang.reflect.Method getGetMethodForAttributeType(java.lang.Class clazz, org.geotools.feature.AttributeType at)
           
static GeotoolsData getInstance()
           
 java.lang.reflect.Method getSetMethodForAttributeType(java.lang.Class clazz, org.geotools.feature.AttributeType at)
           
 FieldNameAndType[] interrogate(java.lang.String fileName)
           
 void readNeighborhoodInfo(java.lang.String neighborhoodFile, java.util.ArrayList gisAgents)
           
 java.util.Collection sortGisAgentsByIndex(java.util.Collection gisAgents)
          Sorts a Collection of GisAgents using the GisAgent's getGisAgentIndex function
 java.util.ArrayList updateAgentsFromShapefile(java.lang.Class clazz, java.util.ArrayList agentList, java.lang.String datasource)
           
 void writeAgents(java.util.Collection agents, java.lang.String datasource)
           
 void writeAgents(java.util.Collection agents, java.lang.String origDatasource, java.lang.String newDatasource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeotoolsData

public GeotoolsData()
Method Detail

getInstance

public static GeotoolsData getInstance()

readNeighborhoodInfo

public void readNeighborhoodInfo(java.lang.String neighborhoodFile,
                                 java.util.ArrayList gisAgents)

createAgents

public java.util.ArrayList createAgents(java.lang.Class clazz,
                                        java.lang.String datasource)

updateAgentsFromShapefile

public java.util.ArrayList updateAgentsFromShapefile(java.lang.Class clazz,
                                                     java.util.ArrayList agentList,
                                                     java.lang.String datasource)

interrogate

public FieldNameAndType[] interrogate(java.lang.String fileName)
                               throws java.io.IOException
Throws:
java.io.IOException

writeAgents

public void writeAgents(java.util.Collection agents,
                        java.lang.String datasource)

writeAgents

public void writeAgents(java.util.Collection agents,
                        java.lang.String origDatasource,
                        java.lang.String newDatasource)

sortGisAgentsByIndex

public java.util.Collection sortGisAgentsByIndex(java.util.Collection gisAgents)
Sorts a Collection of GisAgents using the GisAgent's getGisAgentIndex function

Parameters:
gisAgents -
Returns:

getEnvelope

public com.vividsolutions.jts.geom.Envelope getEnvelope(java.lang.String datasource)

getCenter

public double[] getCenter(com.vividsolutions.jts.geom.Envelope envelope)

getSetMethodForAttributeType

public java.lang.reflect.Method getSetMethodForAttributeType(java.lang.Class clazz,
                                                             org.geotools.feature.AttributeType at)

getGetMethodForAttributeType

public java.lang.reflect.Method getGetMethodForAttributeType(java.lang.Class clazz,
                                                             org.geotools.feature.AttributeType at)

getAttributePosition

public int getAttributePosition(java.lang.String name,
                                org.geotools.feature.FeatureType ft)