summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wildemann <metalstrolch@users.noreply.github.com>2021-09-06 11:03:57 +0200
committerGitHub <noreply@github.com>2021-09-06 11:03:57 +0200
commite071fb187020c81d0cc0de190cb4b7c60e589ce8 (patch)
tree296084bcc9b85d56ad0797d6d57573051fb6743a
parentd8416623db99f05d638f4454a2a826d348d693ba (diff)
downloadnavit-e071fb187020c81d0cc0de190cb4b7c60e589ce8.tar.gz
Fix:maptool:osm fix multipolygon filter. (#1143)
Change done at #1129 causes maptool to filter out all multipolygons if -n is given due to not correctly initializing item_bin buffer prior check. Sorry my fault.
-rw-r--r--navit/maptool/osm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c
index fcfc46b36..aece0ea7e 100644
--- a/navit/maptool/osm.c
+++ b/navit/maptool/osm.c
@@ -1684,6 +1684,7 @@ static inline void osm_end_relation_multipolygon (struct maptool_osm * osm) {
/*Don't write out multipolygons that will result in unknown types if -n is given.
*So we don't process useless multipolygons. May save a lot of time.
*/
+ tmp_item_bin->type = types[a];
if(filter_unknown(tmp_item_bin))
continue;
/* no need to clone the item in memory. We just write it out multiple times */
@@ -1691,7 +1692,6 @@ static inline void osm_end_relation_multipolygon (struct maptool_osm * osm) {
/*add duplicate tag if 2nd type. The tag stays for all subsequent writes */
item_bin_add_attr_int(tmp_item_bin, attr_duplicate, 1);
}
- tmp_item_bin->type = types[a];
item_bin_write(tmp_item_bin, osm->multipolygons);
}
} else {