[postgis-users] Adding a new GEOS call to PostGIS
Paul Ramsey
pramsey at refractions.net
Tue Feb 12 07:07:20 PST 2008
OK, it was a bit harder than you interpreted (takes more than a SQL
cut'n'paste) and not as straightforward as I thought it might be (the
simplify function that was already there was a native implementation,
not a GEOS call, so cutting and pasting it would do no good).
Anyhow, I have applied my incredible text editing skills and now there
is a ST_SimplifyPreserveTopology(geometry, float) in the -svn drop.
Paul
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
More information about the postgis-users
mailing list