[postgis-devel] smoothing function Chaikins algorithm

Regina Obe lr at pcorp.us
Fri Mar 9 04:25:46 PST 2018


Sure.  Something I've always wanted.

As far as the name goes,  it would be nice to keep Chaikins in the name, but if you want the name to be searchable by purpose

Perhaps something like  ST_ChaikinsSmooth

Thanks,
Regina


-----Original Message-----
From: postgis-devel [mailto:postgis-devel-bounces at lists.osgeo.org] On Behalf Of Nicklas Avén
Sent: Friday, March 09, 2018 5:03 AM
To: postgis-devel at lists.osgeo.org
Subject: [postgis-devel] smoothing function Chaikins algorithm

Hello

I have implemented chiakins algorithm for smoothing geometries.

http://idav.ucdavis.edu/education/CAGDNotes/Chaikins-Algorithm/Chaikins
-Algorithm.html

The algorithm is amazing simple

Signature is:

st_chaikins(geom geometry, n_iterations int, preserve_endpoints
boolean)

Do we want it in PostGIS?

Should it be a more describing name than st_chaikins?

The function more or less doubles the number of vertex points per iteration, so I have to put in a max number of iterations. I tried it with 40 iterations without thinking about it and it of course crashed the server :-)

It can be combined with some simplify function to again reduce number of verteces.

The use case here is geometries generated from raster to smooth out the pixels.

I have some cleanup to do before putting it somewhere.

Thanks

Nicklas
_______________________________________________
postgis-devel mailing list
postgis-devel at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list