[postgis-users] Postgis Simplify

Brent Wood pcreso at pcreso.com
Sun Jul 24 13:14:01 PDT 2005



--- Christo Du Preez <christo at mecola.com> wrote:


I think you are confusing the meanings of issimple & simplify. Issimple checks
to see if it is a "simple" geometry. Which has to do with the
topology/structure of the feature rather than the number of points. (see the
docs for a more complete description)

The simplify function uses a Peuker-Douglas algorithm to reduce the number of
vertices in a line. As in point reduction or thinning.

FYI, I have found that views on a geometry table with simplified geometries
work well with scale dependent layering for viewng data. The function is very
quick, and means the viewing software can have several orders of magnitude less
vertices to render... 

Brent Wood

  



> SELECT Simplify(the_geom, 80), the_geom
> 
> Produces:
> 
> SRID=-1;MULTIPOLYGON(((-3.40056774339641e-063
> -4.38828018269539e+033,1.29793581702902e-099
> -4.71199750007451e+156,2.14675261499012e-179
> 6.45280524121602e-108,3.18999891494113e+087
> -2.9437206290273e+237,-2.11301423329521e+231
> -2.41070996669296e-010,-4.80307 (..)
> 
> SRID=-1;MULTIPOLYGON(((18.441127 -33.919793,18.442126
> -33.91885,18.442537 -33.918462,18.442729 -33.918603,18.442464
> -33.918852,18.441329 -33.919914,18.442208 -33.92056,18.44628
> -33.920351,18.44426 -33.91886,18.443569 -33.91835,18.444617
> -33.917363,18.4404 (..)
> 
> With 85000 points I presumed that the IsSimple method would return
> False, but I was wrong. IsSimple returns True.
> 
> It does say in the documentation to test IsSimple otherwise the
> Simplify method might loose the geometries simplicity. I take it, this
> is what they meant.
> 
> So my question, what do I do to simplify the geometry eg. reduce the
> number of points for displaying my maps on different scales?
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 




More information about the postgis-users mailing list