On Sat, Jan 22, 2011 at 4:28 PM, Andrea Aime <[email protected]> wrote: > > On Sat, Jan 22, 2011 at 4:44 AM, Roald de Wit <[email protected]> wrote: >> >> Hi Andrea, >> >> Thanks for the clarification. The buffer example that you gave works as >> expected. >> >> I was hoping to take a shortcut to queries like: give me all tasmanian roads >> that intersect with tasmanian water bodies. After reading your response, I >> tried it using a JTS:intersects process that consumes the output of the >> gt:CollectGeometries sub-processes for both the roads and water bodies. It >> turns out that JTS:intersects is not happy with GeometryCollections. > > What you are trying to do is simply not supported by the current processes, > in order to select the roads crossing water bodies > we'd need a new process that is given two collections and returns every > feature in the first collection that intersects > a feature in the second collection. That operation is known as a spatial join. > I don't know of anyone working on such process, but relatively soon we should > have a process that returns the intersections > between two feature collections, as in, the result of intersecting the > geometries, with each intersection output having > all the attribute of the two features that generated the intersection
Btw, just changed CollectGeometries to return a type specific geometry collection if possible (http://jira.codehaus.org/browse/GEOS-4324) With that change the intersects call works, but as the description says, it just returns "true" or "false". In this case it returns "true", meaning one of the roads does intersect the lakes, but you don't get to know which ones because CollectGeometries merged all the geometries of the layer into a single one making them loose identity. As said before, to know _which_ road does intersect we'd need a different process Cheers Andrea -- Ing. Andrea Aime Technical Lead GeoSolutions S.A.S. Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584962313 fax: +39 0584962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ----------------------------------------------------- ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
