From fa4a8f7b73429623d8d4e9aae36c3c71ebc26ad8 Mon Sep 17 00:00:00 2001 From: Oliver Tonnhofer Date: Wed, 4 Jan 2017 14:44:04 +0100 Subject: [PATCH] document load_all:true requirements for relation/relation_members #51 --- docs/relations.rst | 2 ++ mapping/filter.go | 3 +++ 2 files changed, 5 insertions(+) diff --git a/docs/relations.rst b/docs/relations.rst index 55b3f38..0dbf512 100644 --- a/docs/relations.rst +++ b/docs/relations.rst @@ -72,6 +72,8 @@ These relations can not be mapped to `simple` linestrings or polygons as they ca The Imposm table types ``relation`` and ``relation_member`` allow you to import all relevant data for these relations. +.. note:: ``relation`` and ``relation_member`` require :ref:`load_all` to have access to all keys. + ``relation_member`` ^^^^^^^^^^^^^^^^^^^ diff --git a/mapping/filter.go b/mapping/filter.go index 5e7e48a..d5507d6 100644 --- a/mapping/filter.go +++ b/mapping/filter.go @@ -132,6 +132,9 @@ func (f *RelationTagFilter) Filter(tags *element.Tags) bool { if tags == nil { return false } + + // TODO improve filtering for relation/relation_member mappings + // right now this only works with tags.load_all:true if t, ok := (*tags)["type"]; ok { if t != "multipolygon" && t != "boundary" && t != "land_area" { *tags = nil