[postgis-users] Adding a new GEOS call to PostGIS

Dylan Beaudette dylan.beaudette at gmail.com
Tue Feb 12 13:56:03 PST 2008


On Tuesday 12 February 2008, Paul Ramsey wrote:
> On 12-Feb-08, at 10:30 AM, Dylan Beaudette wrote:
> > Am I correct in understanding that the ST_SimplifyPreserveTopology
> > () function
> > would give topologically correct polygons after simplification? In
> > other
> > words, it would preserve adjacency after simplification?
>
> No, incorrect, perhaps this calls for a renaming. It will preserve
> validity, that is, each individual polygon will remain topologically
> correct.

I see-- thanks for the clarification. Perhaps a rename would be a good idea, 
maybe ST_RobustSimplify ??

> > I have noticed that running simplify() on a set of adjacent
> > polygons sometimes
> > has the not-so-nice result of causing previously overlapping (dang
> > simple
> > features!) edges to separate.
>
> Sorry, that remains a hard problem to crack. I doubt anything short
> of a build-coverage/simplify-edges/extract-polygons approach is going
> to do it.
>
> P.

Ok. I primarily use the simplify function for display at very coarse scales -- 
where these little "nuances" are not visible. 

Thanks,

Dylan

> > Dylan
> >
> >> On Feb 8, 2008, at 10:21 PM, Brian Hamlin wrote:
> >>> It recently came up in the IRC channel FreeNode #postgis
> >>> that there is a GEOS TopologyPreserveSimplify, in addition
> >>> to Simplify2D.
> >>>
> >>> I did a bit of checking just now.. on my machine, I see
> >>> nm /usr/local/pgsql/lib/liblwgeom.1.3.so
> >>>
> >>> _LWGEOM_simplify2d
> >>> _pg_finfo_LWGEOM_simplify2d
> >>> _simplify2d_lwgeom
> >>>
> >>>   and some others, but no TopologyPreserve anything
> >>>
> >>> nm /usr/lcoal/lib/libgeos_c.1.4.1.dylib
> >>>
> >>> _GEOSSimplify
> >>> _GEOSTopologyPreserveSimplify
> >>>
> >>> and lastly, in lwpostgis.sql
> >>>  CREATE OR REPLACE FUNCTION simplify(geometry, float8)
> >>>    RETURNS geometry
> >>>    AS '$libdir/liblwgeom', 'LWGEOM_simplify2d'
> >>>    LANGUAGE 'C' IMMUTABLE STRICT;
> >>>
> >>> --
> >>> since the last SQL line matches the exported symbol name from
> >>> liblwgeom
> >>> exactly, minus the front _, looks like there is the exact entry
> >>> point.
> >>>
> >>> Clearly no parallel entry for TopologyPreseveSimplify
> >>>
> >>> this makes me think that there is a little more to adding the
> >>> call to
> >>> lwpostgis.sql than copying and pasting the declaration.
> >>>
> >>> insights welcome
> >>>   -Brian
> >>>
> >>> _______________________________________________
> >>> postgis-users mailing list
> >>> postgis-users at postgis.refractions.net
> >>> http://postgis.refractions.net/mailman/listinfo/postgis-users
> >>
> >> _______________________________________________
> >> postgis-users mailing list
> >> postgis-users at postgis.refractions.net
> >> http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> > --
> > Dylan Beaudette
> > Soil Resource Laboratory
> > http://casoilresource.lawr.ucdavis.edu/
> > University of California at Davis
> > 530.754.7341



-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341



More information about the postgis-users mailing list