|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anl.repast.gis.data.OpenMapData
Field Summary | |
(package private) com.bbn.openmap.gui.OpenMapFrame |
frame
|
private static OpenMapData |
instance
|
(package private) com.bbn.openmap.MapBean |
mapBean
|
(package private) com.bbn.openmap.MapHandler |
mapHandler
|
(package private) com.bbn.openmap.gui.BasicMapPanel |
mapPanel
|
(package private) com.bbn.openmap.layer.shape.ShapeLayer |
shapeLayer
|
static int |
SHP_POINT
|
static int |
SHP_POLYGON
|
static int |
SHP_POLYLINE
|
Constructor Summary | |
OpenMapData()
|
Method Summary | |
com.bbn.openmap.dataAccess.shape.EsriGraphicList |
buildEsriGraphicList(java.util.Collection gisAgents)
Takes a Collection of GisAgents, gets the OMGraphic from each, and attempts to build an EsriGraphicList from them. |
com.bbn.openmap.dataAccess.shape.EsriGraphicList |
buildEsriGraphicList(java.util.Collection gisAgents,
int shpType)
Takes a Collection of GisAgents, gets the OMGraphic from each, and attempts to build an EsriGraphicList from them. |
anl.repast.gis.data.FeatureArrayList |
buildFeatureArrayList(java.util.Collection gisAgents,
java.lang.String datasource)
helper function for writeAgents takes a Collection of GisAgents and a datasource and creates a FeatureArrayList to store the features |
java.util.ArrayList |
createAgents(java.lang.Class clazz,
java.lang.String datasource)
Create a list of GisAgents given a class type that implements the GisInterface, and a Shapefile datasource |
double |
getArea(com.bbn.openmap.dataAccess.shape.EsriGraphic esriGraphic)
Gets the area for an EsriGraphic using the com.bbn.openmap.geo.Geo class |
double |
getArea(com.bbn.openmap.omGraphics.OMGraphic omGraphic)
Gets the area for an OMGraphic using the com.bbn.openmap.geo.Geo class |
int |
getAttributePosition(java.lang.String name,
org.geotools.feature.FeatureType ft)
given the feature type and the name, get the Attribute Position |
java.util.HashSet |
getAttributeValues(java.lang.String attributeName,
java.lang.String dataSource)
for a given attribute in a datasource (.shp file) gets a set of all the attribute's values |
com.bbn.openmap.LatLonPoint |
getCenter(com.bbn.openmap.dataAccess.shape.EsriGraphic eg)
gets the center of the extents of the EsriGraphic |
com.bbn.openmap.LatLonPoint |
getCenter(com.bbn.openmap.dataAccess.shape.EsriGraphicList egList)
gets the center of the extents of the EsriGraphicList |
com.bbn.openmap.LatLonPoint |
getCenter(float[] extents)
gets the center of the extents |
com.bbn.openmap.LatLonPoint |
getCenter(anl.repast.gis.OpenMapAgent omd)
gets the center of the extents of the OMGraphic Requires that the OMGraphic is an instance of EsriGraphic |
com.bbn.openmap.LatLonPoint |
getCenter(java.lang.String datasource)
gets the center of the extents of the datasource Requires that the datasource is a Shapefile |
com.bbn.openmap.plugin.esri.EsriLayer |
getEsriLayer(java.lang.String datasource)
given a shapefile, returns an OpenMap EsriLayer |
float[] |
getExtents(com.bbn.openmap.dataAccess.shape.EsriGraphicList egList)
gets the extents for an EsriGraphicList The lat/lon extent of the EsriGraphicList contents, returned as miny, minx, maxy maxx in order of the array. |
float[] |
getExtents(com.bbn.openmap.omGraphics.OMGraphic omg)
gets the extents for an OMGraphic The lat/lon extent of the EsriGraphic contents, returned as miny, minx, maxy maxx in order of the array. |
float[] |
getExtents(java.lang.String datasource)
gets the extents for a shapefile The lat/lon extent of the EsriGraphicList contents, returned as miny, minx, maxy maxx in order of the array. |
java.lang.reflect.Method |
getGetMethodForAttributeType(java.lang.Class clazz,
org.geotools.feature.AttributeType at)
helper function given an Attribute type (generally from a Shapefile's dbf file) get the related get method |
java.lang.reflect.Method |
getGetMethodForName(java.lang.Class clazz,
java.lang.String name)
helper function given an Column name (generally from a Shapefile's dbf file) get the related get method |
static OpenMapData |
getInstance()
|
java.lang.reflect.Method |
getSetMethodForAttributeType(java.lang.Class clazz,
org.geotools.feature.AttributeType at)
helper function given an Attribute type (generally from a Shapefile's dbf file) get the related set method |
java.lang.reflect.Method |
getSetMethodForName(java.lang.Class clazz,
java.lang.String columnName)
helper function given an Column name (generally from a Shapefile's dbf file) get the related set method |
int |
getShpType(java.lang.String datasource)
|
anl.repast.gis.data.FieldNameAndType[] |
interrogate(java.lang.String datasource)
Looks into a Shapefile and returns an array of FieldNameAndType objects which show the names and types of fields in the Shapefile's dbf file |
void |
readNeighborhoodInfo(java.lang.String neighborhoodFile,
java.util.ArrayList gisAgents)
Reads in a file in the .GAL format created from GEODA Geoda can give a list of neighbors for GIS data |
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)
Update a list of GisAgents from a Shapefile In case you have already created GisAgents, but want to update them from a Shapefile |
void |
writeAgents(java.util.Collection agents,
java.lang.String datasource)
write agents to the specified datasource datasource should end with .shp. |
void |
writeAgents(java.util.Collection gisAgents,
java.lang.String origDatasource,
java.lang.String newDatasource)
write agents to the specified datasource datasource should end with .shp. |
void |
writeAgentsNoShp(java.util.Collection gisAgents,
com.bbn.openmap.proj.Projection proj,
java.lang.String datasource)
Writes agents created from OpenMap to a Shapefile (.shp, .dbf and .shx). |
java.util.ArrayList |
writeDbfFromAgents(java.util.Collection gisAgents,
java.lang.String datasource)
helper function for writeAgentsNoShp writes the dbf file from a list of GisAgents |
void |
writeFeatureArrayListToDbf(java.util.Collection gisAgents,
anl.repast.gis.data.FeatureArrayList featureList,
java.lang.String origDatasource,
java.lang.String newDatasource)
helper function for writeAgents takes the FeatueArrayList and writes it to a dbf file |
void |
writeShpUsingShp(java.util.Collection gisAgents,
java.lang.String origDatasource,
java.lang.String newDatasource)
A helper function for the writeAgents function |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
com.bbn.openmap.gui.OpenMapFrame frame
com.bbn.openmap.gui.BasicMapPanel mapPanel
com.bbn.openmap.MapBean mapBean
com.bbn.openmap.MapHandler mapHandler
com.bbn.openmap.layer.shape.ShapeLayer shapeLayer
public static final int SHP_POINT
public static final int SHP_POLYLINE
public static final int SHP_POLYGON
private static OpenMapData instance
Constructor Detail |
public OpenMapData()
Method Detail |
public static OpenMapData getInstance()
public void readNeighborhoodInfo(java.lang.String neighborhoodFile, java.util.ArrayList gisAgents)
neighborhoodFile
- gisAgents
- - a list of agents that implement the GisAgetn interfacepublic java.util.ArrayList createAgents(java.lang.Class clazz, java.lang.String datasource)
clazz
- datasource
-
public java.util.ArrayList updateAgentsFromShapefile(java.lang.Class clazz, java.util.ArrayList agentList, java.lang.String datasource)
clazz
- agentList
- datasource
-
public anl.repast.gis.data.FieldNameAndType[] interrogate(java.lang.String datasource) throws java.io.IOException
datasource
-
java.io.IOException
public java.util.Collection sortGisAgentsbyIndex(java.util.Collection gisAgents)
gisAgents
-
public void writeAgents(java.util.Collection agents, java.lang.String datasource)
agents
- datasource
- public void writeAgents(java.util.Collection gisAgents, java.lang.String origDatasource, java.lang.String newDatasource)
gisAgents
- origDatasource
- newDatasource
- public void writeShpUsingShp(java.util.Collection gisAgents, java.lang.String origDatasource, java.lang.String newDatasource)
gisAgents
- origDatasource
- newDatasource
- public void writeAgentsNoShp(java.util.Collection gisAgents, com.bbn.openmap.proj.Projection proj, java.lang.String datasource)
gisAgents
- proj
- - use the OpenMapDisplay class to get the projectiondatasource
- - Shapefile to write to (should end in .shp)public java.util.ArrayList writeDbfFromAgents(java.util.Collection gisAgents, java.lang.String datasource)
gisAgents
- datasource
-
public int getShpType(java.lang.String datasource)
public com.bbn.openmap.dataAccess.shape.EsriGraphicList buildEsriGraphicList(java.util.Collection gisAgents)
gisAgents
-
public com.bbn.openmap.dataAccess.shape.EsriGraphicList buildEsriGraphicList(java.util.Collection gisAgents, int shpType)
gisAgents
- shpType
-
public anl.repast.gis.data.FeatureArrayList buildFeatureArrayList(java.util.Collection gisAgents, java.lang.String datasource)
gisAgents
- datasource
-
public void writeFeatureArrayListToDbf(java.util.Collection gisAgents, anl.repast.gis.data.FeatureArrayList featureList, java.lang.String origDatasource, java.lang.String newDatasource)
gisAgents
- featureList
- origDatasource
- newDatasource
- public java.util.HashSet getAttributeValues(java.lang.String attributeName, java.lang.String dataSource)
attributeName
- dataSource
-
public com.bbn.openmap.plugin.esri.EsriLayer getEsriLayer(java.lang.String datasource)
datasource
-
public float[] getExtents(java.lang.String datasource)
datasource
-
public float[] getExtents(com.bbn.openmap.dataAccess.shape.EsriGraphicList egList)
egList
-
public float[] getExtents(com.bbn.openmap.omGraphics.OMGraphic omg)
omg
-
public com.bbn.openmap.LatLonPoint getCenter(com.bbn.openmap.dataAccess.shape.EsriGraphic eg)
public com.bbn.openmap.LatLonPoint getCenter(com.bbn.openmap.dataAccess.shape.EsriGraphicList egList)
public com.bbn.openmap.LatLonPoint getCenter(anl.repast.gis.OpenMapAgent omd)
omd
-
public com.bbn.openmap.LatLonPoint getCenter(float[] extents)
public com.bbn.openmap.LatLonPoint getCenter(java.lang.String datasource)
public double getArea(com.bbn.openmap.omGraphics.OMGraphic omGraphic)
omGraphic
-
public double getArea(com.bbn.openmap.dataAccess.shape.EsriGraphic esriGraphic)
public java.lang.reflect.Method getSetMethodForAttributeType(java.lang.Class clazz, org.geotools.feature.AttributeType at)
clazz
- at
-
public java.lang.reflect.Method getSetMethodForName(java.lang.Class clazz, java.lang.String columnName)
clazz
-
public java.lang.reflect.Method getGetMethodForName(java.lang.Class clazz, java.lang.String name)
clazz
-
public java.lang.reflect.Method getGetMethodForAttributeType(java.lang.Class clazz, org.geotools.feature.AttributeType at)
clazz
- at
-
public int getAttributePosition(java.lang.String name, org.geotools.feature.FeatureType ft)
name
- ft
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |