That is one of the examples covered in the user guide....
- http://docs.codehaus.org/display/GEOTDOC/Filter+Examples

The long and short of it is the spatial filter BBOX is made specifically 
to work with an Envelope; we have an implementation of Envelope called 
ReferencedEnvelope that also implements the geoapi class you need.

Cheers,
Jody

Tim Swanson wrote:
> I've got what I think is a relatively simple problem that seems not so
> simple to implement in reality.
>
> The use case is this: the user drags a mouse over a map widget, and I
> want to select all the features that they have selected (either fully
> contains or simply touches, at the user's option).
>
> So what I need to do is, given a feature collection, find the features
> that either are fully or partially contained by the box that the user
> drew (represented as a JTS Envelope, though that could be changed if I
> needed to).
>
> (I have decided that "partially contains" is actually "intersects"
> rather than "overlaps". If I understand correctly, two geometries are
> considered to intersect and not overlap their edges touch but don't
> cross each other. Does that seem right?)
>
>
> The first place I look to do this is in the GeoAPI FilterFactory class.
> There is a contains method and an intersects method, but both expect an
> instance of a org.opengis.geometry.Geometry object, and I have a
> com.vividsolutions.jts.geom.Envelope object. I have already been told
> not to use the GeoAPI Geometry module in GeoTools (see
> http://www.nabble.com/Re%
> 3A-Creating-Polygons-and-SurfaceBoundarys-p18148909.html).
>
> Does this mean that I can't build filters that act on JTS objects?
>
>
> Thanks,
>
>
>
>
> Tim Swanson 
> Software Engineer
>
>
> Tyler Technologies, Inc.
> 14142 Denver West Parkway, Suite 155
> Lakewood, CO 80401
> Phone:  
> Fax: 303-271-1930
> E-mail: [EMAIL PROTECTED]
> Web: www.tylertech.com
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>   


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to