Subject: Exported From Confluence
Content-Type: text/html; charset=UTF-8
GeoTools version 2.2.x is the current stable release of the libr=
Who should be using 2.2?
Most developers should be using 2.2.x. The only exception to this are p=
eople who either need the functionality of 2.3.x or are making significant =
changes to Geotools.
If you want to make significant changes to Geotools, yo=
u are more than welcome to base a your work on 2.2.0 (or on the 2.2.x branc=
h) and later integrate them into the library.
TIP: If you are doing any work against in GeoTools 2.2.=
x, please use Expression all the time. Don't access featur=
e attributes directly! If you make use of expression you will have no code =
breakage when upgrading to 2.3.
This is just good programming practice, but following this guideline wil=
l explicitly save you pain when upgrading.
Where is 2.2.x?
You can access 2.2.x in two ways:
- With SVN access to the latest version (2.2.x branch)
- By downloading a numbered release (ie. 2.2RC1)
- Using a Maven 2 build script (sample in developers guide)
See the developers guide for more=
information on SVN access, especially t=
You can download the numbered releases from sourceforge.
Transitioning from 2.1.x to 2.2=
Here are my notes for transitioning geoserver 2.1.x to 2.2.x.
1. Add the referencing.jar, api.jar, and render.jar to your project
2. change all the "StyleFactory.createStyleFactory()" to "St=
Dont forget to add "import org.geotools.styling.StyleFactoryFinder;&q=
3. change all the "FilterFactory.createFilterFactory();" to "=
Dont forget to add "import org.geotools.filter.FilterFactoryFinder;&q=
4. NamedLayer.getFeatureTypeConstraint() is now spelt correctly
5. <Attribute>.isGeometry() should be replaced with:
6. Anything that implements FeatureStore will also have to have addFeature(=
FeatureCollection) added to the method. Its very similiar to addFeatures(F=
eatureReader) so probably not much work.
The Good (New Stuff!)
The following are new and shiney for the 2.2.x release:
- Aggregate Functions: sum, min, max etc.. are now available (and o=
ptimized!) on feature collections
- FeatureVisitor is how we get those aggregate functions optimized =
- Sorting into a FeatureList
- Consistent use of iterator and close( iterator )
- ColorBrewer: able to generate beautiful styles using academic resear=
ch from http://colorbrewer.org
- has been brought in line with SLD 1.0
- has events (for those making user interfaces)
- JTS: utility class has moved, the old one is still there and depreca=
- Shapefile: performance improvements, supports FeatureList api direct=
- Oracle: makes use of metadata to quickly report the bounds of a tabl=
- EPSG: hsql and property file implementations available. hsql impleme=
- Catalog API: finally some help in managing DataStores! An implementa=
tion of resource handles.
- Much More ...
The Bad (needs improvement)
There are some limitations with 2.2.x:
- Documentation has not yet been updated (please help!)
- We still don't have a seperation between FeatureType and FeatureFact=
- GridCoverage support is still poor (and GCE seems to be on its way o=
ut, try and use the formats directly)
- Tests are incomplete (many test cases are disabled, due to Maven 2 b=
eing more strict than Maven 1)
The Ugly (aka will break your=
We found a couple of Q&A mistakes from 2.1 that we fixed for 2.2:
- StyleFactory is no longer a class, please use StyleFactoryFinder to =
aquire a StyleFactory implemenation for use
We are sorry about these mistakes, they will require you to do a search =
and replace in your code
Removal of Deprecated classes<=
The following classes have been around for one public release cycle (the=
y were deprecated in 2.1.0 and will now be removed:
- ...we need a complete list
Working on 2.2.x
Found a scary bug? Did we mess up a specification? Did our documentation=
confuse you? Here is how to help make 2.2.x a happy place to work and play=
What changes should be made =
Anything that does not change the api. The following are fair game:
- Bug fixes
- minor improvements
- new plugins
- functionality fixes
What changes are not allow=
ed for 2.2.x?
Do not make any API changes! For example, the 2.2 branch implements GeoA=
PI 2.0. This dependency should not be changed. Transition to any other GeoA=
PI release should be done on the trunk. If you want to make "larger&qu=
ot; than minor changes (say we got a specification wrong), we may be able t=
o integrate them in on a numbered 2.2.x release (ie. 2.2.1).
If in doubt, just ask.
Don't lose your work!
Please make sure that you do the following when changing 2.2.x:
- create a JIRA task (and remember the number)
- mention the JIRA task in your commit message on 2.2.x
- mention the JIRA task in your commit message on 2.3.x
If you commit to 2.2.x, you should try to ensure your changes will be in=
the next stable version of Geotools. To do this, also move your changes t=
o trunk (2.3).
- --# Tell the geotools developer's list what you are working on (or report=
in the JIRA bug tracker)
--# Make your changes in 2.2.x
--# Test Test Test and run the automatic test cases
--# Commit your changes to the 2.2.x SVN respository
--# 'svn update' your 2.3 archive
--# Move your changes over to 2.3
--# run the 2.3 automatic test case (hand testing would be great too!)
--# commit your code to the 2.3 (trunk) SVN respository
For more information please see the Deve=
|Automatic Code Formating Tools|
Do NOT run any code formatting tools on 2.2.x or 2.3.x. You'll find that=
, when you (or others) try to move changes between 2.2.x and 2.3.x, you'll =
be spending a huge amount of frustrating time rectifying changes.
If we can set it up, we will restore Jalopy code formatting, so if you run =
the formatter before a commit pain will be minimal.
Changes to Expected on th=
e 2.2.x branch
Here's some things I've heard developers are talking about doing on the =
- fix FeatureType.create (done)
- move to JTS 1.7
- move to JTS 1.7's WKB parser (remove WKB4J)
- renderer improvements - adding highway shields
- renderer improvements - labeling improvements
- renderer improvements - moving SLD Filters to Datastore
- PostGIS datastore improvements
- NEW datastore - PostGIS Versioning datastore
- lots of bug fixes
All of these changes should not affect anyone else working on the 2.2.x =