[postgis-users] Simplify a perfect (hierarchical) partition of polygons (ST_SimplifyPreserveTopology and friends)

strk at keybit.net strk at keybit.net
Thu Mar 15 01:07:08 PDT 2012


On Thu, Mar 15, 2012 at 12:45:43AM +0000, Martin Tomko wrote:
> Hi Sandro, William, all,
> Thank you very much for the responses.
> 
> Sandro, this looks hopeful. I have checked and indeed the
> addTopologyColumn method contains the integer specifying a child layer. I
> "assume" that this is taken from the topology.layer table where each
> topological layer is registered, right?

Right. It is also returned by AddTopoGeometryColumn.
I know that function is not very friendly and I'm happy to discuss
proposals to make it more so (like taking "schema.table.column" ?)

> Sandro, you say:
> Quote:
> "Yes, it probably don't make sense to simplify single TopoGeoms in turn if
> you know you're going to simplify the whole topology. In that case you
> would
> just make a copy of the topology and then simplify all edges on the copy.
> Existing TopoGeometry objects (appropriately re-bound to the new topology)
> would magically convert to a simplified version of simple geometries. Both
> simple and hierarchical ones."
> 
> 
> Is this a "wished for" functionality, or is this doable? I have little
> experience with the topoGeom, a code snippet would make me very happy ;)

It is doable. You can get code snippets to create TopoGeometry objects
from the manual and presentations. For the "simplify whole topology"
there's a bit more work involved but it starts at CopyTopology.

> and we are an explicitly OS project. We are willing to contribute back
> (also in due course to other projects, such as Geotools), but we cannot
> contribute $, only code. For those interested, look up www.aurin.org.au

Glad to know you're ready to contribute. Note that also analysis and
discussion and testing are highly welcome. In this case I'm sure you
could help defining an easy way to copy layers (there's a ticket on trac
for a CopyTopologyLayer, I think). Only you'll need to understand 
TopoGeometry model some more I think.

--strk;

  ,------o-. 
  |   __/  |    Delivering high quality PostGIS 2.0 !
  |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
  `-o------'




More information about the postgis-users mailing list