[OSM-dev] Centroid-Column - Patch for osm3pgsql

Peter Körner osm-lists at mazdermind.de
Thu Sep 23 14:09:31 BST 2010


Hi

A while ago we talked about adding support for a centroid column to 
osm2pgsql [1]. Attached you'll find a patch that adds this 
functionality. I did not test it extensively, especially not with 
invalid geometries, but for most cases it should work.

Unfortunately the server I tested on has only geos v3.1 and to use 
interpolate on linestrings at least geos 3.2 ist required, so the 
centroid point does not sit in the middle of the linesting but .. 
somewhere else on the line.

Please, help me with testing and reviewing this patch.

Peter


[1] 
<http://lists.openstreetmap.org/pipermail/dev/2010-September/020536.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: centroid-column.patch
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20100923/15191ae8/attachment.ksh>


More information about the dev mailing list