[postgis-users] simplify weirdnesses

strk strk at keybit.net
Tue Feb 17 06:13:53 PST 2004


schabios wrote:
> Hello,
> 
> See the following:
> 
> logigis=# select count(*), vbef, vafter from (select isvalid(geom) as
> vbef, isvalid(simplify(geom,0.05)) as vafter from admin_area_bnd) as
> temp group by vbef,vafter; 
> 
>  count  | vbef | vafter 
> --------+------+--------
>    2283 | t    | f
>  205495 | t    | t
>   65087 | t    | 
> (3 rows)
> 
> Is it desired that a PostGIS operation on valid geometries can make them
> non-valid?

It is *not* desired, but it would be very expensive to avoid this.

> 
> And it seems that some (well, 65 thousand) Geometries even get
> deleted by simplify. 

Collapsed geometries do.

> 
> As another example shows, the size of the deleted geometries can be
> much larger than the given simplification threshold:
> 
> logigis=# select box3d(geom) from admin_area_reconstruct where
> simplify(geom,0.05) is null;
> 
>                             box3d
> -------------------------------------------------------------
> BOX3D(5.95587 45.81802 1.7e-308,10.49203 47.80838 1.7e-308) 
> (1 row)
> 
> Can you explain this?

What kind of geometries are you simplifying ?

You can set the VERBOSE flag in postgis_algo.c to 1 to get reports
of simplification activity. Set it to 5 for a very verbose log.

--strk;




More information about the postgis-users mailing list