Architecture¶
Having an understanding of how the GeoTools library is structured is helpful for sorting out what jars you need to include with your application.
This page introduces you to the modules of the GeoTools library and how they fit together. By including only the jars you need you can select just the right amount of GeoTools for your next project.
GeoTools Library¶
The GeoTools library forms a software “stack” with each module building on the ideas and concepts defined in the previous one.
Each layer of the “stack” is built on the ones below it:
To use Referencing you require
gt-api
,gt-metadata
andgt-referencing
. To make use of “EPSG” codes you need one plugin, such asgt-epsg-hsql
, to supply the EPSG definitions to the Referencing module.To use Coverage you require
gt-api
,gt-metadata
,gt-referencing
(with plugingt-epsg-hsql
),gt-main
, andgt-covearge
. To make full use of the Coverage module a plugin such asgt-geotiff
is used to access GeoTIFF files.
The maven tool can calculate the jars you need, please see the Eclipse or Netbeans quickstart for an example use.
Module |
Purpose |
---|---|
|
Map API, with Java2D rendering engine for mapping. |
|
Implements for accessing spatial database |
|
Implements of common spatial XML formats |
|
Implements of Common Query Language for filters |
|
Implementation for accessing raster information |
|
Data API, with default implementations of filter, feature, etc… |
|
Implementation of co-ordinate location and transformation |
|
Implementation of identification and description |
|
Definition of interfaces for common spatial concepts |
|
JTS Topology Suite (external library) implementing Geometry |
GeoTools Plugins¶
GeoTools offers plug-ins to support additional data formats, different coordinate reference system authorities and so on.
Module |
JAR |
Plugin |
---|---|---|
|
||
|
|
Geometry in DB2 |
|
Pure Java “H2” database |
|
|
Geometry in MySQL |
|
|
Oracle SDO Geometry |
|
|
PostgreSQL extension PostGIS |
|
|
SQL Server |
|
|
SAP HANA |
|
|
||
|
||
|
|
Shapefile read/write support |
|
WFS read/write support |
|
|
|
GeoTIFF raster format |
|
arcgrid format |
|
|
MIF format |
|
|
JPG, PNG, TIFF formats |
|
|
|
Official EPSG database in Access |
|
Pure Java port of EPSG database |
|
|
Lightweight copy of EPSG codes |
|
|
PostgreSQL port of EPSG database |
|
|
||
|
||
|
Usually at least one plug-in is needed for each layer for GeoTools to do something. As an example every time you use the referencing module please make sure you have an EPSG plugin around (or the referencing module will not know that “EPSG:4326” is the world as we know it).
GeoTools Extensions¶
We have gone a bit further and implemented some interesting “extensions” on top of the GeoTools library. These extensions provide additional capabilities that are built on top of GeoTools using the full functionality of the core library.
The extensions are independent of each other offering and may be of use in your application. Here is a brief listing of the extensions at the time of writing.
JAR |
Extension |
---|---|
|
Map from application schema to complex feature model |
|
Generation of styles using color brewer |
|
Support for making custom complex feature model |
|
Work with graph and network traversals |
|
Dynamicly generate features from grid definiton |
|
Transform features on the fly |
|
Web Map Server client |
|
Web Map Tile Server client |
|
Parsing/Encoding for common OGC schemas |
XML¶
To support the XML module in GeoTools we have bundled up several XML schemas in JAR form (to prevent needing to download them from the Internet each time they are needed). In addition these jars contain a generated Java data structure produced with the Eclipse Modeling Framework.
JAR |
Schema |
---|---|
|
open web services schema |
|
web feature service |
|
web processing service schema |
|
web coverage service schema |
|
web feature service schema |
|
XLink schema |
These facilities are used by the XSD parser by way of a series of XSD plugins. These plugins indicating how to parse and encode additional content using Eclipse XSD library to parse XML schema documents and offer “bindings” showing how to parse and encode to Java classes such as String, Date, URL and Geometry.
JAR |
Bindings |
---|---|
|
Basic types defined by XML schema |
|
filter 2.0 |
|
filter (used by OGC CAT and WFS) |
|
keyhole markup language |
|
web feature service |
|
web processing service |
|
geographic markup language 3 |
|
geographic markup language 2 |
|
open web services |
|
web coverage service |
|
web map service |
|
style layer descriptor |
GeoTools Unsupported¶
There are also a number of “unsupported” plugins and extensions. These modules are not distributed by the project management committee as part of the GeoTools download, however they are available via maven or individual download.
Unsupported |
Purpose |
---|---|
|
Standard widget toolkit interactive map |
|
Swing interactive map |
|
retired oracle support |
|
retired PostGIS support |
|
retired db2 support |
|
Web Processing Service client |
|
Job system for spatial data |