2009/10/4 dadar wrote:
>
> Michael, I have some trouble understanding the source
You are really diving in at the deep end ! GeoTools is a very big
library and many of the concepts and usages will be new to you. I
think you need to take it slowly and study the examples and the
related pages in the GeoTools wiki.
> filter = ff.contains(ff.property(geometryAttributeName), ff.literal(point));
> what is ff in the code above??
An instance of FilterFactory2. You will find it defined at the top of
the class...
/*
* Factories that we will use to create style and filter objects
*/
private StyleFactory sf = CommonFactoryFinder.getStyleFactory(null);
private FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
private GeometryFactory geomFactory =
JTSFactoryFinder.getGeometryFactory(null);
> and can you explain to me what is this code for
> FeatureCollection<SimpleFeatureType, SimpleFeature> selectedFeatures =
> featureSource.getFeatures(filter);
>
> FeatureIterator<SimpleFeature> iter =
> selectedFeatures.features();
> Set<FeatureId> IDs = new HashSet<FeatureId>();
>
Have a look at these related pages in the user guide for more background:
http://docs.codehaus.org/display/GEOTDOC/02+Filter
http://docs.codehaus.org/display/GEOTDOC/Filter+Examples
http://docs.codehaus.org/display/GEOTDOC/06+FeatureSource
Hope this helps.
Michael
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users