[postgis-devel] More work on Cascade Union
Obe, Regina
robe.dnd at cityofboston.gov
Wed Aug 20 15:15:00 PDT 2008
>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/20080820/022725f3/attachment.html>
More information about the postgis-devel
mailing list