App Engine + Java Topology Suite

For several days I’ve been working on the exploration of GIS (Geographical Information Systems) that runs on GAE (Google App Engine) using Java. In the process, I found an application called giscloud that helped me understand the basics of how to run an application of its kind in the cloud using JTS (Java Topology Suite).

Note: while Google makes it easy to import existing libraries and frameworks into your application, not all are compatible with this platform, so have created a repository of reference.

JTS is an API that gives you a spatial object model and algorithms geometric 2D space, which seeks to facilitate the creation of geometric objects and relations between them and external to the model points (intersections, areas, center, among other things) and in this tutorial I detail the steps necessary to run giscloud :

  1. Before you start you should download the code from this link, using a subversion client:

    In this tut, I’ll be using…

    • Eclipse 3.5 aka Galileo
    • Google App Engine SDK 1.3.1
    • GWT SDK 2.0.2
  2. The first thing you want to do is import the project into your eclipse instance.
  3. After importing the project you will notice a red icon appears in the project folder, this happens because the Java compiler could not resolve all dependencies and libraries needed to run this project. To see what’s wrong, you can enter to see libraries found within the project build path (Right click>> Properties>> Java Build Path> Libraries) and you will notice that the library ‘gwt-maps.jar is not there.


  4. To solve the problem, you must delete the existing reference in the build path and recreate it by downloading the gwt-maps library from Google Code site. To re-create the file reference you must add the just added  library to the WEB-INF/lib source and build the path to the file.
  5. If all went OK, you should be able to see an icon with the name ‘gwt-maps’ folder above the war.
  6. Giscloud uses a modified version of JTS, which allows the serialization of objects STRtree type so that they can be added to the cache (this feature is not available in the latest version published by vividsolutions). What you should do to solve the reference loss is to remove the reference ‘java-topology-suite’  to the project(Right click>> Properties>> Java Build Path> Projects) and search the file path WEB-INF/lib ‘JTS-1.11-serializable-indexes.jar ‘, then  build the library path (Right click>> Build Path>> Add to Buid Path).
  7. Finally, you run the program  as ‘web application’, copy the link provided by the Development mode in your favorite browser and see something like this:

I hope this helps to start with learning geographic information systems using JTS App Engine.