summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wildemann <gta04@metalstrolche.de>2019-08-01 01:16:16 +0200
committerStefan Wildemann <gta04@metalstrolche.de>2019-08-01 01:16:16 +0200
commitc77275205078616e81b1b9324dcc8c5035592d74 (patch)
treed5de59d79ed055e1d8683ab87a6a9947d556d656
parent10e8e075f87194a20c234579ab6049f211b798f2 (diff)
downloadnavit-c77275205078616e81b1b9324dcc8c5035592d74.tar.gz
Correctly sort multipolygons from boundaries
-rw-r--r--navit/maptool/osm.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c
index 588879d66..85bd4b484 100644
--- a/navit/maptool/osm.c
+++ b/navit/maptool/osm.c
@@ -1625,6 +1625,8 @@ void osm_end_relation(struct maptool_osm *osm) {
* indicating the turn restrictions */
//tmp_item_bin->type=type;
}
+ item_bin_add_attr_string(tmp_item_bin, attr_label, attr_strings[attr_string_label]);
+ item_bin_write(tmp_item_bin, osm->multipolygons);
} else {
if(attr_longest_match(attr_mapping_rel2poly_place, attr_mapping_rel2poly_place_count, &type, 1)) {
tmp_item_bin->type=type;
@@ -1634,17 +1636,13 @@ void osm_end_relation(struct maptool_osm *osm) {
* indicating the turn restrictions */
//tmp_item_bin->type=type;
}
+ if ((!g_strcmp0(relation_type, "multipolygon") || !g_strcmp0(relation_type, "boundary"))
+ && (boundary || type!=type_none)) {
+ item_bin_write(tmp_item_bin, osm->boundaries);
+ }
}
- if ((!g_strcmp0(relation_type, "multipolygon")) && (!boundary)) {
- item_bin_add_attr_string(tmp_item_bin, attr_label, attr_strings[attr_string_label]);
- item_bin_write(tmp_item_bin, osm->multipolygons);
- }
- if ((!g_strcmp0(relation_type, "multipolygon") || !g_strcmp0(relation_type, "boundary"))
- && (boundary || type!=type_none)) {
- item_bin_write(tmp_item_bin, osm->boundaries);
- }
if (!g_strcmp0(relation_type, "restriction") && (tmp_item_bin->type == type_street_turn_restriction_no
|| tmp_item_bin->type == type_street_turn_restriction_only))