[postgis-users] Topology: Simplifying Coastlines with Islands

Sandro Santilli strk at keybit.net
Tue May 29 07:36:31 PDT 2012


On Tue, May 29, 2012 at 03:23:06PM +0200, Sandro Santilli wrote:
> On Tue, May 29, 2012 at 02:33:54PM +0200, Michiel J. van Heek wrote:

> > Screenshot1.png: Long Island, New York (prevents east coast of USA
> > from simplifying)
> > 
> > Screenshot2.png: Afua islands, Brazil
> > 
> > Screenshot3.png: mouth of the Uruquay River (prevents south coast of
> > Uruquay from simplifying)
> > 
> > I hope these pictures will help you get a better idea of how to
> > solve these kind of simplifying challenges.
> 
> Yes, ok. It's clear now.
> 
> I recon that for long island, splitting the unsimplified edge on
> the closest point to the island might make it simplifiable.
> Probably a single point is not enough for the Brazil case, but
> a recursive approach would find next closest point and succeed.

Just wanted to get back on this as I think it's the logical continuation
of the SimplifyEdgeGeom approach. On "collision" exception you would
basically have the information about the edge being simplified (let's call
it "E") _and_ the colliding obstacle (let's call it "O", be it a node or
edge).

You would then compute the closest point of "O" onto "E" and split "E"
by that point. Then re-run on each of the sub-edges "E1" and "E2" resulting
from the split.

Re-joining the sub-edges after simplification may or may not be something
you'll want to do within the same function.

I'll love to know if such approach would have all the required lower-level
editing functions in place.

--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