openmaptiles/layers
Brian Sperlongano ec74480414
BUGFIX: Fix name-based way fragmentation in transportation_name (#1295)
I discovered this bug while investigating issues with the updates process related to #1190 #1292, and #814.

The `transportation_name` layer produces slightly different `tags` hstore values in the `osm_transportation_name_linestring` table during the initial import versus when running an update.  As currently written, the import code produces null-value keys in the `tags` column, while the update code suppresses them.  This PR removes that difference and makes the import code use same method that is currently used in the update code.

With a test case I've written, the import code produces a tags hstore that looks like this:
`"name"=>"OpenMapTiles Secondary 2", "name:de"=>NULL, "name:en"=>NULL, "name_int"=>"OpenMapTiles Secondary 2", "name:latin"=>"OpenMapTiles Secondary 2"`

...while the update code produces a tags hstore that looks like this:

`"name"=>"OpenMapTiles Secondary 2", "name_int"=>"OpenMapTiles Secondary 2", "name:latin"=>"OpenMapTiles Secondary 2"`

Note the missing NULL values.

This bug causes a small amount of space wastage after an update is run, because the update matching code detects the `tags` value as different, resulting in a duplicate copy of the tags value if that row is updated.  This causes duplicate objects and breaks GROUP BY clauses that expect to group same-tagged features together.  I've tested this by inspection of a generated mbtiles, database spot checks, and the unit test code included in this PR.
2021-11-25 10:45:11 +01:00
..
aerodrome_label Upgrade to omt-tools v6, Imposm 0.11.1 and migrate SQL (#1246) 2021-10-14 11:38:28 -04:00
aeroway Upgrade to omt-tools v6, Imposm 0.11.1 and migrate SQL (#1246) 2021-10-14 11:38:28 -04:00
boundary Add requires.tables to <layer>.yaml (#1236) 2021-11-05 10:04:54 +01:00
building Suppress rendering of underground buildings (#1241) 2021-10-28 13:09:06 +02:00
housenumber Upgrade to omt-tools v6, Imposm 0.11.1 and migrate SQL (#1246) 2021-10-14 11:38:28 -04:00
landcover Add requires.tables to <layer>.yaml (#1236) 2021-11-05 10:04:54 +01:00
landuse Add requires.tables to <layer>.yaml (#1236) 2021-11-05 10:04:54 +01:00
mountain_peak adding customary_ft for peaks in US (#1298) 2021-11-15 16:55:35 +01:00
park Implement non-blocking refresh (#1308) 2021-11-24 11:17:29 +01:00
place add province, increase scalerank + labelrank (#1306) 2021-11-18 18:05:02 +01:00
poi Update etl diagram for poi layer (#1297) 2021-11-10 19:49:18 +01:00
transportation BUGFIX: Fix name-based way fragmentation in transportation_name (#1295) 2021-11-25 10:45:11 +01:00
transportation_name BUGFIX: Fix name-based way fragmentation in transportation_name (#1295) 2021-11-25 10:45:11 +01:00
water Add requires.tables to <layer>.yaml (#1236) 2021-11-05 10:04:54 +01:00
water_name Add requires.tables to <layer>.yaml (#1236) 2021-11-05 10:04:54 +01:00
waterway Waterway zoomlevel 6 - 8 corresponding with water (#1291) 2021-11-10 20:26:14 +01:00