[OSM-dev] Applying outer way attributes to multi-polygons
Andy Allan
gravitystorm at gmail.com
Sat Aug 14 16:26:54 BST 2010
On Mon, Aug 2, 2010 at 7:13 PM, Ben Supnik <bsupnik at xsquawkbox.net> wrote:
> Hi Y'all,
>
> Does anyone have a good set of heuristics for the cases where OSM-reading
> software should treat outer-way attributes as applying to a multipolygon?
>From a practical point of view, you can use the same heuristic as
osm2pgsql does for the mapnik map renderings.
http://trac.openstreetmap.org/browser/applications/utils/export/osm2pgsql/output-pgsql.c#L966
970 /* Copy the tags from the outer way(s) if the relation is
untagged */
971 /* or if there is just a name tag, people seem to like
naming relations */
972 if (!listHasData(&tags) || ((countList(&tags)==1) &&
getItem(&tags, "name"))) {
I've no idea how "theoretically correct" it might be, but it's used
fairly heavily across many projects!
Cheers,
Andy
More information about the dev
mailing list