[postgis-users] line simplication

Paul Ramsey pramsey at refractions.net
Wed Jan 8 09:35:02 PST 2003


I think spatial operators should allow us to do this better. Automatic 
simplified highways, for example:

   select simplify(union(geom),200)
   from roads
   where rd_type = 'HWY'
   group by rd_hwy_num;

Should be great...

P.

David Blasby wrote:
> Mapserver's simplification is effective and easy.  When it loads in spatial
> data, it transforms each of your points to an integer (x,y) location on the
> resulting Image.  If it finds two or more points in a row that are in the same
> pixel, it ignores all but the first.  The resulting picture looks the same as
> rendering each of the points in the line/polygon.  This method is really fast
> and easy.
> 
> A proper line simplification (like D-P) works on the input data in world
> coordinates, and is much more costly to compute. You'll probably find that, at
> LAN speeds, you can
>     QUERY + TRANSMIT + MAPSERVER SIMPLIFY + RENDER
> faster than you could
>     QUERY + HARD SIMPLIFY + TRANSMIT + MAPSERVER SIMPLIFY + RENDER
> 
> 
> Alternatively, you could have two columns (or even two tables) in your database
> - one with full resolution data, and one created using the simplification
> method.  In mapserver, you use a scale-dependent layer system to show the full
> resolution data when you're zooomed in and the lower resolution when you're
> zoomed out.
> 
> The main drawback is that you're doing your simplification based on
> line-segments, not on the entire feature.  For example, if you're rendering a
> highway feature that is made up of 50,000 individual segments, you're still
> going to be rendering 50,000 segments no matter how much simplification you
> do.  Ideally, you'd want to create a highway line and simplify it!
> 
> dave
> 
> 
> _______________________________________________
> 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