[postgis-devel] Collapsing behavior for simplify

Nicklas Avén nicklas.aven at jordogskog.no
Sat Apr 4 14:11:29 PDT 2015


Then I am on the right track with SimplifyVW. But I use the most significant points instead of evenly distributed 4 points. 
But I don't know if that is easy to implement with possible with Douglas-Pecker.

As a side note I have not succeeded to get ST_SimplifyVW as fast as ST_Simplify. ST_Simplify I think is very impressive when it comes to speed. 

/Nicklas


Sent from my Cat® phone.

Den 4 apr 2015 23:00 skrev Paul Ramsey <pramsey at cleverelephant.ca>:
>
> I think we should probably move the Simplify behavior to return minimum values for dimensions, start-end lines, start-middle-middle-end polygons, etc.  
>
>
> --  
> http://postgis.net  
> http://cleverelephant.ca 
>
>
> On April 4, 2015 at 2:00:12 PM, Nicklas Avén (nicklas.aven at jordogskog.no) wrote: 
> > Hallo 
>> > When adding tests to ST_SimplifyVW (the Visvalingam-Whyatt version of 
> > simplify) I noticed some differences in behavior between ST_Simplify and 
> > ST_SimplifyVW. Since the ST_Simplify behavior somewhat strange I want to 
> > discuss it before I copy that behavior to ST_SimplifyVW. 
>> > It is discussied in many tickets, and I haven't taken the time to read 
> > them all. But I think #1698 comes closest to a solution 
> > http://trac.osgeo.org/postgis/ticket/1698 
>>> > First an inconsistency with ST_Simplify that I don't understand if is 
> > intentional: 
> > in regression test nr 9 it shows that a polygon collapses and returns 
> > nothing: 
> > http://trac.osgeo.org/postgis/browser/trunk/regress/simplify_expected 
>> > But if you take the last test, nr 12 and change last parameter to 200 so 
> > it collapses it returns an empty multipolygon. 
> > SELECT '12', ST_astext(ST_Simplify('MULTIPOLYGON(((0 0, 10 0, 10 10, 0 
> > 10, 0 0),(5 5, 5 6, 6 6, 8 5, 5 5)),((100 100, 100 130, 130 130, 130 
> > 100, 100 100)))', 200)); 
>>> > Then from what i understand in ticket #1698 ST_Simplify is expected not 
> > to remove the entire boundary but instead return something. 
>> > In Visvalingam-Whyatt this is the situation right now (which I am quite 
> > happy with): 
> > For linestrings they always return at least start and end point. 
>> > Polygons can collapse inner rings. 
> > Boundaries is never collapsed. THey always return 4 points. That is 
> > start and end point of pointarray (same point) and the two points with 
> > highest effective area. So the result will be a triangle with as big 
> > area as possible (not too thin triangle). 
>> > in multipolygons all inner rings can be collapsed but all sub-geometry 
> > boundaries will remain. 
>> > Is there any reason to leave that concept? 
>> > I guess it have to be explained in doc as a difference from 
> > ST_Simplify. 
>> > The doc now for the new functions is: 
> > http://postgis.net/docs/manual-dev/ST_SetEffectiveArea.html 
> > and 
> > http://postgis.net/docs/manual-dev/ST_SimplifyVW.html 
>>> > Regards 
>> > Nicklas 
>>> > _______________________________________________ 
> > postgis-devel mailing list 
> > postgis-devel at lists.osgeo.org 
> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel 
>>
>


More information about the postgis-devel mailing list