Gaby,

there is a detailed example in the user guide that shows how to use a 
Query to filter a SimpleFeatureCollection from (amongst other sources) a 
shapefile. Spatial queries in CQL are supported. One example is a CQL BBOX:
http://docs.geotools.org/latest/userguide/tutorial/filter/query.html

I expect that the ECQL spatial predicates listed in the GeoServer manual 
are supported:
http://docs.geoserver.org/latest/en/user/filter/ecql_reference.html
These functions should also be supported:
http://docs.geoserver.org/latest/en/user/filter/function_reference.html

You should be able to construct a CQL expression to test whether a 
catchment shape contains a given point.

Please let me know if these work for you. I have not tried these in raw 
GeoTools as most of my work is in the context of GeoServer.

More of GeoTools CQL and ECQL:
http://docs.geotools.org/latest/userguide/library/cql/cql.html
http://docs.geotools.org/latest/userguide/library/cql/ecql.html

Kind regards,
Ben.

On 16/09/14 12:51, Gabriella Turek wrote:
> I have a shapefile of catchments (multipoly shapes) and I need to find
> which catchment contains a given asset (a point)
> How can I do that without iterating thru thru each shape?
> Can I filter with CQL? The link to the grammar in the javadocs is broken.
> Can I do better that check whether the bounding box contains the point?
> Thanx
> Gaby
>
>
> ------------------------------------------------------------------------------
> Want excitement?
> Manually upgrade your production database.
> When you want reliability, choose Perforce.
> Perforce version control. Predictably reliable.
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>

-- 
Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au>
Software Engineer
CSIRO Mineral Resources Flagship
Australian Resources Research Centre

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to