[postgis-devel] More work on Cascade Union
Obe, Regina
robe.dnd at cityofboston.gov
Wed Aug 20 21:24:41 PDT 2008
It just occurred to me. Someone correct me if I am wrong, but even if we were to port Cascaded Union to GEOS there is no way that PostGIS can take advantage of it without having it push the whole array to GEOS since the Cascaded Union needs to be able to see the full geometry array set coming to it before hand in order to intelligently bunch the set rather than being fed peacemeal as it currently is now. So until we do that fundamental step - seems Cascaded Union in GEOS would be pretty useless to PostGIS.
Thanks,
Regina
-----Original Message-----
From: postgis-devel-bounces at postgis.refractions.net on behalf of Obe, Regina
Sent: Wed 8/20/2008 6:15 PM
To: PostGIS Development Discussion
Subject: RE: [postgis-devel] More work on Cascade Union
>It's annoying that there's so much overhead in all the marshalling that
> goes on between Postgres, PostGIS, and GEOS. Points are the worst case
> for this, since they have so much overhead relative to their size. I'm
> not sure what the best approach is to mitigate this. One option might
> be to do more point operations directly in PostGIS, since they tend to
> be fairly simple compared to more complex geoms. But this starts
> getting into a lot of code to be developed...
Perhaps its just my ineptness at understanding C-code and more specifically how all these pieces fit together, but regarding the marshalling seems in the unite_garray
there is a lot of wasted time
1) pull a geometry out of PG_LWGEOM
2) convert pulled geometry to PostGIS2GEOS
3) Union with our GEOS result
4) copy our new GEOS result to g2
5) destroy our old result
6) rebuild new result by taking g2 and unioning with next PostGIS2GEOS
---
Would seem much more efficient to just marshall the whole array to some sort of GEOS array or Geometrycollection
do our busy work with the GEOS array/collection all in GEOS land
then return back a GEOS result which we then convert to GEOS2POSTGIS.
Looking at the JTS code - it seems to be doing that - working against the full set of lines and points in a collection rather than this busy back and forth stuff. I see GEOS code that seems to do that too (work with a collection)
Thanks,
Regina
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20080821/024bfad6/attachment.html>
More information about the postgis-devel
mailing list