Monday, March 27, 2006

Topology and Representation in Repast

The use of GIS vector data has the advantage giving realism to models. Within Repast there are numerous ways of creating and calculating topology (e.g. which polygons are next to which polygons or which polygon a certain point is within). For representing the model (i.e. the displaying of vector data like maps). There are also numerous ways as can be seen below using either Repast.J or Repast.Net :

Topology and Representation with Repast.J
Within the current version of Repast (3.1) to represent vector (points, lines and polygons) topology the user has a few options with a set of predefined Repast classes (anl.repast.gis libraries).

The open source root which has no reliance in ESRI (means people who don’t have ArcGIS can still use programs once created) . You can use the OpenMap Java library which can be used both for both topologic calculations and for representations – (however within OpenMap its all in a Lat/Lon structure (decimal degrees which is an issue for representing small areas such as pavements but it is possible (more on this in the future). Another option is to use OpenMap for representation (display of the model) and JTS 1.4 topology suite for calculations (which I use and find it OK but tricky at times due to the precision of decimal degrees for small areas but the calculations appear to be easier). A third option is to code a representation tool by yourself or find one such as OpenJump but this requires a lot of effort.

If you want to use ESRI along with options in Java, you can use JTS 1.4 for calculations and Agent Analyst for representation (display). Agent Analyst is a tool developed by the Repast team, to refresh the ArcGIS 9.x screen after every Repast step. Problem here is that the shapefiles need to be preloaded into ArcGIS before starting the model so one can visualise the change.

Topology and Representation with Repast.Net

ESRI option using Visual Studio, you can use JTS1.4 topologic suite - Vivid Solutions is now also available as GeoTools.NET for Visual Studio (C# and Visual-Basic) which includes all the Java Geotools functionality. However Repast 3.1 .NET does not yet support GIS (no anl.repast.gis libraries therefore saving and creating shapefiles is also made slightly trickier) and no C# interface for Agent Analyst. You can write your own classes for GIS functionality in Repast.NET choosing any ESRI (MapObjects, ArcEngine etc) or other available .NET vector representation tool. For topologic calculations you can use either Geotools.NET or any ESRI product. However this is for the keen programmer who does not want to use Java.

No comments: