|
The JTS Topology Suite is used to define Geometry objects, but the real wonderment is the stable operations as a result of years of dedicated effort.
You will be using JTS a lot as it literally is the where of GeoTools. It captures constructs like Coordiante, Point, Polygon and LineString. JTS is pure topology however, the Geometry objects are pure shapes with no meaning. For the meaning you will need to consult a CoordinateReferenceSystem. Note that JTS topologic operations assume a cartesian CoordinateSystem. Related
Relationship to GeoToolsGeoTools is all about implementing spatial solutions, and we do our very best to follow a don't invent here policy (rather than get off topic). We make use of the Java Topology Suite to represent "Simple" Geometry, and the GeoAPI project to represent everything else. We have been forced to define an API module of our own in a few cases, like data access, where something "official" is not ready yet. GeoTools stands on the shoulders of giants. On occasion they kick us down, but that is why we have maven to track the dependencies. Please use maven, life is too short to get class cast exceptions. Geometry SpecificationsJTS is an implementation of the OGC Simple Features for SQL Specification (ie SFSQL). It covers 2D constructs like Point, Line and Polygon. JTS is willing to carry a 3rd point around but does not use it for calculations - making it a 2.5D solution for cartesian space.
GeoTools makes a point of working with both implementations, but frankly the ISO Geometry implementations are not ready yet. |
|
What Implementation of Geometry Should I Use?
Use the JTS implementation - it works.