[postgis-users] line simplication

strk strk at freek.keybit.net
Fri Feb 28 01:40:01 PST 2003


For the polygon-reduced-to-point-or-line issue:

We don't wont to loose coordinates of a single record geometry.
If we have the shape of a little island we need it even when
after simplification it reduces to a single point. If we keep
it we can still query the map and know where the island is, if
we remove it we'll never find it in the world !

The adjustments we can make nonetheless is to discard all internal
rings reduced to 2 or 3 pts, discard all internal rings of external
once reduced to 2 or 3 pts and to keep what remains valid adding a
third point if needed (2pts case).

QUICK_NOTE: the choice of first and last point in a ring is right
            now not taken in consideration. There are probably
            chances that choosing appropriate points could result
            in a wider point set. This must be inspected, and
            after that rings that keep reducing to a point should
            be rapresented with an appropriate middle-point
            (centroid?).

-- I think we should solve one problem at time.. more later..


--strk;

dblasby wrote:
> >
> >
> >I'd like to receive feedback about some issues:
> >
> >   1: Some polygon rings reduce to a single point or line (2 or 3 points).
> >
> >   2: Some lines reduce to a single point (1 point).
> >
> >   3: Points are untouched.
> >
> >   When encountering these cases what should the function do ?
> >  
> >
> 
> I think the primary goal should be to produce valid geometries:
> 
> 1. remove rings that are are 2 or 3 points.  If its the outer ring, 
> remove the entire polygon
> 2. remove lines that are only one point.  Alternatively, you could 
> return a POINT (but the type change will be problematic), or a line with 
> the first and last points being the same.
> 
> As an aside, if you're simplifying polygons, you're probably running the 
> risk of producing non-valid ones.  You could be introducing 
> self-intersection  problems or having your holes outside the polygon.
> 
> I cannot wait to get this in the main code base!
> 
> 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