[postgis-devel] Ordering of geometries in multipolygons, preparedgeometries

Obe, Regina robe.dnd at cityofboston.gov
Wed Aug 20 06:55:33 PDT 2008


Mark,

FYI - I've been working on a PostgreSQL only solution to Cascaded Union
and so far the results seem very promising.  To some it may seem counter
intuitive instead of just porting the JTS code straight into GEOS.
There are couple of reasons for me for going this somewhat round-about
way.

1) I'm scared of GEOS code at the moment.
2) It would be nice for people to reap benefits without having to
upgrade to the latest GEOS.
3) I think there are a few memory leaks in GEOS and I really think we
need to get that stabilized before we introduce new code into it.  This
I think Paul Ramsey is working on.

4) There is more of a cost I have observed between flipping into the
GEOS layer from PostgreSQL which seems a bit more costly than the cost
of flipping into lwpostgis code but still the flipping into lwpostgis
code layer is not a free flip.  This is easily demonstrated by the speed
differences between using ST_GeometryN and ST_Dump where ST_Dump only
needs to make one call and ST_GeometryN needs to make many.  

So I'm trying to minimize the cost of flipping so to speak - by doing
things like sorting before it even gets passed to the GEOS layer.

5) I'm not convinced a straight JTS to Geos port is the right thing to
do. From listening to this group,  I think the techniques you use in
each would be slightly different - just as if you were to do things in
database land - the techniques you would use to solve the same problems
optimally would be different than what you would do writing in C, C++ or
Java.  This is giving me an opportunity to get a sense of how JTS is
tackling things and if it really makes sense to make a 1 to 1
translation to GEOS or if such a thing is even possible.

Thanks,
Regina

-----Original Message-----
From: postgis-devel-bounces at postgis.refractions.net
[mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of Mark
Cave-Ayland
Sent: Wednesday, August 20, 2008 9:22 AM
To: PostGIS Development Discussion
Subject: Re: [postgis-devel] Ordering of geometries in
multipolygons,preparedgeometries

Paul Ramsey wrote:
> No big issues. How's your C++? Basically you can take the cascaded
> union from JTS, port it to GEOS and then add a C-API facade. Then move
> the PostGIS ST_Union code from the current place to the new place.
> 
> P.

Hmmmm. Definitely porting cascaded union from JTS would be the ultimate 
solution to this problem. Does anyone know how much work would be 
involved? I tried looking for some kind of jts-commits list to get an 
idea of the sizes of the changes involved, but didn't get anywhere.


ATB,

Mark.

-- 
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063
_______________________________________________
postgis-devel mailing list
postgis-devel at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-devel
-----------------------------------------
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.




More information about the postgis-devel mailing list