Friday, December 17, 2010

GeoTools 2.7-beta Released

GeoTools 2.7-beta has been released and is now available for download.

Notable features added since 2.7-M4 include much improved performance of raster re-projection, and a SLD 1.1 / Symbology Encoding 1.1 parser.

This release also removes dependency on the GeoAPI project, rolling those interfaces into a new gt-opengis module. This removes many deprecations in the GeoTools code base while still remaining 100% api compatible.
As usual this release also contains a number of key bug fixes. See the change log for all the details.

Try out the release and report any issues encountered in the bug tracker or on the mailing list.

- The GeoTools Community

Wednesday, December 1, 2010

Tuesday, September 21, 2010

GeoSpatial for Java Workbooks available

It has now been a couple of weeks since foss4g and life is returning to normal. Thanks to everyone who contributed to a great experience. Part of that great experience was the workshop program; facilities were excellent; that staff helpful and due to a bit of scheduling fun the GeoSpatial for Java workshop was packed.

Justin and Jody were on hand for an intensive hands-on workshop "GeoSpatial for Java". This workshop offered an introduction to GIS concepts for Java developers - which is a really nice introduction since you can try out ideas and see how they work using running code.

The workshop materials have been published here:

These workbooks are detailed step by step instructions written in a "code first" style. This allows you to carefully go through the steps required to produce runnable code. If you have any questions about the concepts or ideas covered you can continue reading for the background information.

Geospatial for Java
View more presentations from jgarnett.

This tutorial information has been gathered up in the "sphinx" documentation system; and pulls directly from Java source code examples that are built as part of our GeoTools nightly build.

Thanks to Justin for his help in setting up the sphinx nightly build; and if anyone is good at sphinx "rst2pdf" I would love to get this content out in printable form.

Monday, September 20, 2010

GeoTools Maven Repository Reminder

The original GeoTools maven repository at is down at the moment; for projects still making use of historical versions of GeoTools we encourage you to switch to our main repository.

To make the switch you will need to add the following to your maven pom.xml file:


OpenGeo has also kindly provided a high performance maven repository for SNAPSHOT releases; so if you are interested in the latest and greatest (populated by a nightly build) you can add the following:


We would of course like to thank Refractions, OSGeo and OpenGeo for their community support. Setting up a public maven repository is a large commitment that is often transparent to those making use of the service.

We encourage sponsorship and donations to the OSGeo Foundation, and you are welcome to check out the commercial services offered by Refractions and OpenGeo. Let them know we sent you :-)

Thursday, September 2, 2010

GeoTools 2.7-M3 Released

GeoTools 2.7-M3 was created on Sept 03, 2010:
For more information please review the Release Notes:
For more information on GeoTools and the 2.7 series:

Thursday, August 12, 2010

GeoTools 2.6.5 Released

GeoTools 2.6.5 was created on August 8th, 2010:
New features for this release:
  • Support for "Units of Measure" when drawing allowing symbol size or line width to be supplied with real
    world units such as 10km.
  • DataStore implementations can now allow users a chance to specify their own FeatureID (used to supply your
    own primary key value when adding information to a database)
  • Bridge to JFreeChat allowing JFreeChat to offer simple plotting of Geometry
  • Reorganised website documentation with both stable and development javadocs avalable
  • Reorganised website documentation with both stable and development sphinx available
  • Coordinate Reference System definitions are now provided by EPSG Database 7.5 (when working with epsg-h2 or epsg-hsql)
  • Improvements to rendering symbols: correct handling of DPI parameter, fixes when working with SVG symbols,
This release is made in conjunction with uDig 1.2.0.
For more information please review the Release Notes:
For more information on GeoTools and the 2.6 series:

Monday, August 2, 2010

GeoTools 2.7-M2 Released

GeoTools 2.7-M2 was created on July 18, 2010:
This release is made in conjunction with FOSS4G Workshop materials, this message was delayed while negotiating recent OSGeo website changes. For those using maven the release is now available on our project maven repository.
For more information please review the Release Notes:
For more information on GeoTools and the 2.7 series:

Tuesday, June 22, 2010

GeoTools 2.7-M1 Released

Second milestone release in the 2.7 series wraps up a refractor of the classes used to make maps. We are also gathering up our website and documentation in preparation for the 2.7 release.
GeoTools 2.7-M1 was created on June 21, 2010 and is now available for download:
This release features:
The 2.7 series features:
  • Unit of Measure support for styling; allowing line symbolizer width to be specified in meters (thanks to Jonathan Milton)
  • JDBC Virtual Table
For more information please review the Release Notes:
For more information on GeoTools and the 2.7 series:

Friday, May 28, 2010

GeoTools 2.7-M0 Released

GeoTools 2.7-M0 is now available for download:

In keeping with the usability and quality theme of the 2.7.x series this release focuses on simplifications to the GeoTools api. While this is the first milestone release made to the public the branch has been ongoing for eight months resulting in an impressive number of resolved issues. As an example 158 issues were closed in the last 30 days.

This is a bug fix release made to solicit feedback from the geotools users list on several recent api changes:

The download artefacts include examples for 2.7-M0 showing the use of SimpleFeatureCollection and SimpleFeatureSource.

For more information please review the Release Notes:

For more information on GeoTools and the 2.7 series:

The GeoTools Community

Wednesday, May 19, 2010

GeoTools 2.6.4 Released

The GeoTools 2.6.4 release is now available for download:

This is a bug fix release made in conjunction with uDig 1.2-RC3.

This release adds support for Oracle Georaster access as the result of a productive collaboration between Christian and Baskar. It is great to see developers from different organisations combine forces.

There are many small but interesting improvements in the release notes. I am exited by the new interpolate functions which will be very useful when styling maps, generated SLD files no longer write out "default" values which will make for a more readable result.

This release also features more documentation then normal; we have exported out the 2.6.4 documentation from our website and the users guide. It is nice to have archives of this material that match a specific release.

For more information please review the Release Notes:

For more information on GeoTools and the 2.6 series:

The GeoTools Community

Wednesday, May 12, 2010

Oracle GeoRaster & Custom JDBC Access

Coming with version 2.6.4, the Imagemosiac-jdbc module adds support for storing image/raster data in a customized database layout. This enables integration of an already existing database table structure into geotools.

The standard imagemosiac-jdbc module is based on a predefined table setup and is useful if you start importing your image data in a SQL database. Handling tiles and pyramids is supported.

For special use cases, other database designs may be necessary . The module was redesigned to encapsulate JDBC Access in a single plugin. Developing a customized JDBC Access plugin will create the missing link between the image composing logic and a custom database layout.

Additionally, users having an existing image database could make their data available for developers using the geotools API.

Look at the documentation .

A first implementation of this concept is a plugin for Oracle GeoRaster integrating the Oracle RASTER data type into imagemosaic-jdbc.

Again, look at the documentation .

Tuesday, May 4, 2010

Open Trip Planner

One of the really cool parts of GeoTools is the graph module - which offers services similar to PGRouting; but years before PGRounting :-) The code is actually a port of an original JUMP graph plugin done by Refractions; and has been steadily improved by grad students over the years in GeoTools.

While I have used this module myself; one thing I am always on the look out for is creative uses of the GeoTools library for this blog; and this week on the user list I was pointed in the direction of OpenTripPlanner.

Thanks to Nicholas from the user list for the pointer; Nicholas is a contributor the Open Trip Planner project.

Now before you get too excited; just as with PGRouting; the ability to go from point A to point B (with a few waypoints along the way) is really dependent on the quality of your data and how much information you have about the intersections (turn directions and so forth).

Check out the links to both OpenTripPlanner and the GeoTools graph module; perhaps you can use a bit of direction in your next Java project.

Update: After hunting in the internals it looks like OpenTripPlanner has there own implementation of graph functionality and are using GeoTools for data access.

Friday, April 30, 2010

A faster, better GeoTools 2.7

GeoTools 2.7.x is current development branch (or "trunk"). Consider this a sneak peak of some of the ideas that are taking shape for the future.

First up we have speed. One of the common use-cases we have on the geotools-gt2-users email list is displaying a Map in a Java Swing application. Still it is nice to see something; especially when learning. With this in mind we have recast our initial introduction tutorials to be a bit more visual.

Out of the box GeoTools focus on providing a standard compliant SLD rendering engine. This engine is not specific to display - and actually never loads data into memory (it simply streams it off disk onto the screen).

In the interest of performance Andrea has donated a wrapper that will cache data in memory (storing it in a JTS spatial index).

File file = JFileDataStoreChooser.showOpenFile("shp", null);

FileDataStore store = FileDataStoreFinder.getDataStore(file);

FeatureSource featureSource = store.getFeatureSource();

CachingFeatureSource cache = new CachingFeatureSource(featureSource);

MapContext map = new DefaultMapContext();

map.setTitle("Using cached features");

map.addLayer(cache, null);


For more details please see the updated (and aptly named) Quickstart. This functionality has been back ported to 2.6.x and we are soliciting feedback (and test cases) from users.

Returning to 2.7 we have two great usability improvements:
  • For the longest time we have had a Query interface and a DefaultQuery implementation. These have been combined making code examples just that much readable.
  • We introduced the use of Generics to support application schema work. While we now have a happy team working on application schema; it did impact readably.
    Specifically FeatureCollection < SimpleFeatureType, SimpleFeature > gets tiring.
    Introducing SimpleFeatureCollection to the rescue.
With this in mind a couple of recent proposals have allowed us to write the following:

SimpleFeatureSource source = dataStore.getFeatureSource( typeName );

Query query = new Query( typeName, filter, attributes );

SimpleFeatureCollection features = source.getFeatures(query);

It is all good!

If you are using maven switch to 2.7-SNAPSHOT to try out these improvements today; we will issue a milestone release laster this month.

Friday, March 26, 2010

GeoTools 2.6.3 released

The GeoTools project is pleased to announce the release of GeoTools version 2.6.3.

This release is a bug fix release (27 issues fixed) made in conjunction with uDig 1.2-RC2. A special thank you to to community members that submitted patches this release.

Improvements and new capabilities:
  • Improvements to JMapPane thanks to an active user list
  • Support for WMS Extent and Dimension information
  • Support for the Robinson projection
We also have a few internal improvements:
  • Support for Online Test cases using JUnit4
For the complete list please review the 2.6.3 release notes.

GeoTools 2.6.3 is available from source forge:

Or from our public maven or subversion repositories:

The GeoTools Community

Thursday, March 4, 2010

GeoTools 2.6.2 released

The GeoTools project is pleased to announce the release of GeoTools version 2.6.2.

This release is mostly intended to provide a number of important bug-fixes, but there are also some new features and improvements for your programming pleasure including:
  • The rendering system now has the ability to draw polygon fills and SVGs as vectors and draw marks with arbitrary sizes.
  • GeoTools applications can now use the H2 database with a spatial index provided by Hatbox.
  • Support added for polyconic projections.
Refer to the 2.6.2 release notes for full details.

You can download the complete GeoTools 2.6.2 source distribution from Sourceforge, or click the 'View all files' button on that page for separate downloads for pre-compiled binaries and javadocs. You can also download the source code with your favourite Subversion client from:

If you use Maven as your build tool, simply update the version number for GeoTools modules in your pom.xml files to "2.6.2".

Share and enjoy !
The GeoTools Community

Tuesday, March 2, 2010

Make your own map-based mashup

IBM produced a nice tutorial making use of GeoTools, JTS and SkateKML with the ever present OpenLayers and PostGIS database.

The tutorial mostly uses the MathTransform services to handle coordinates. You can actually use GeoTools DataStore to perform the SQL query for you resulting in a FeatureCollection. The IBM tutorial performs these steps by hand (Constructing the SQL and translating Well Known Binary into a JTS Geometry etc...).

For more information on using GeoTools FeatureCollection please review QueryLab (java).

Wednesday, February 24, 2010

GeoTools continuous map wrapping

Recently the GeoTools team under GeoSolutions' funding has addressed an issue with the rendering module that was preventing users from drawing polygons crossing the dateline change, or, to put it another way, to be able to have maps that were wrapping like continuous wrapped maps from Google.

As an example specific use case involved the use of a projection in which the dateline change has been moved away from the usual -180/+180 by using a non standard central meridian
The result, prior to the work described here, does not look so good across the discontinuity, as shown below

Bad results when crossing the dateline

The problem was that our renderer was performing point by point reprojections, therefore when a point was crossing the dateline the modular math we used kicked in, transforming +181 -> -179. This meant that the next point, when crossing the dateline, was moved to the other side of the world.

In order to perform proper processing of projection singularities and dateline wrapping on selected projections, in particular, Mercator, Transverse Mercator, and flat geographic, we have had to modify the renderer in its projection handling part. The outcome is that we finally have obtained seamless wrapping maps similar to the Google ones, as shown here:

Continents Oracle layer with EPSG:3329
Continents layer from Oracle datastore in EPSG:3329

Continents Oracle layer with EPSG:90013
Continents layer from Oracle datastore in EPSG:90013

You can try this work yourself starting from GeoTools 2.5.x and above. On the development versions of the two software the tweak is automatically applied while on the other side for the stable versions you need to specify two JVM options:

A big thanks goes to Andrea Aime who has been hired for the implementation of this feature.

Thursday, January 14, 2010

GeoTools 2.6.1 Released

The GeoTools 2.6.1 release is now available for download:
This release contains a host of improvements and bug fixes. In particular the JMapPane has received a lively round of testing and feedback, MySql is back among the supported data stores in its JDBC-NG implementation along with MS SQL Server and SpatiaLite.

The epsg-hsql module now creates its cached EPSG database much faster and with better concurrency control, and a new projection, the polyconic one, has been added to the referencing subsystem.

The rendering subsystem can now accept Function as a source for the Symbolizer geometry, meaning it's possible to perform a transformation (buffer, offset, point extraction) before the actual rendering chain starts (transformations are applied in the geometry native coordinate reference system).Also new is the ability to automatically displace point and polygon labels in search for a position that is not used by another label, using the same vendor parameter already available for lines.

A brand new JPEG2000 coverage reader that can leverage on kakadu has been added, more information can be found here.

Sunday, January 10, 2010


A couple of things surprised me in a recent trip to Brazil.

Interestingly there was a lack of adoption of many common open source geospatial tools. Turns out that open source is competing in the market with "free as in beer" products. I imagine that will shape into quite the dust up in the years ahead.

The other surprise for me was that GeoServer could not really be used; turns out that the local coordinate reference system for the Brazilian datasets was in a projection not supported by GeoTools. I managed a little bit of research into the topic; collecting some data samples and so on.

Over the holidays Andrea managed to implement the missing "Polyconic Projection" and it is great to have visual confirmation of the result.

Thanks for this fix Andrea - it really will open up a new market for GeoTools.