> I'm working with uDig 1.1.1 and I got some troubles to find
> documentation and code exemples for earlier geotools versions so...

You are correct; user documentation for GeoTools was started by me for
the GeoTools 2.5.x series (part of the improvements made for OSGEO
graduation).

You will find a few things documented here:
- http://docs.codehaus.org/display/GEOTDOC/19+Depreacted

But mostly you should be working from the code examples and test cases
that come with a 2.2.x GeoTool download

> My questions are :
> A- Is there a way to udpate udig 1.1.1 (stable) with Geotools 2.5 ?

None at all; the difference between GeoTools 2.2.x and GeoTools 2.5.x
is the entire reason for the uDig 1.2.x release.

> Actually, I'm facing some difficulties with Geotools 2.2 with filters
> as most of the documentation is based on 2.5 version especially with
> the use of Filter class.
>
> To update uDig to GeoTools 2.5 I thought to :
> - remove all the gt*.zip files from udig-sdk files from
> udig-sdk\plugins\net.refractions.udig.libs.source_1.1.0\src\net.refractions.udig.libs_1.1.0\lib
> - then to import Geotools library in my Eclipse project.
> B- Can this process work or will I have an unstable uDig ?
>
> C- If I have to forget about the idea upgrading geotools, can someone
> explain me how to adapt this 2.5 code to 2.2 compliant one :

You can make use of the uDig 1.2.x SDK; the upgrade has been done but
more hands helping on the QA side is very helpful.

> FilterFactory ff = CommonFactoryFinder.getFilterFactory(
> GeoTools.getDefaultHints() );
> Filter filter = ff.id( Collections.singleton( ff.featureId("fred")));

You may need FilterFactoryFinder - not sure if CommonFactoryFinder existed yet.
The FilterFactory methods are of the form "create" and you need to use
set methods after creation to fill in the blanks.
- http://docs.codehaus.org/display/GEOTDOC/Filter+Examples+with+GeoTools+Feature

You may want to use CQL in order to not have your code change when you upgrade?

> in order to apply filter to :
>    store.modifyFeatures( attributeType, new Integer(24), filter );
>
> I guess I have to create filter like:
> Filterfactory ff = FilterFactoryFinder.createFilterFactory();
> but then what about creating the Filter ?

Have a look in the test cases of a GeoTools 2.2.x download for lots of
examples of creating a filter. Or go direct to svn:
- 
http://svn.osgeo.org/geotools/branches/2.2.x/module/main/test/org/geotools/filter/

> Once again, I would appreciate so much if someone could help me.
> Thanks.

Jody
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to