Not reproduced: Diff update ignores some of natural=ridge ways
yubar opened this issue · 2 comments
Context
In the synthetic example below, when I import diff file with natural=ridge ways, the one connected to existing way is imported while the standalone one is ignored.
In real world I experienced exactly the opposite behavior when the connected ways were ignored while standalone were imported successfully - let me know if you need this example as well (obviously both initial import and change file would be bigger).
I tried the same with waterway=river ways and everything seems to be working.
Also, might be related: when a natural=ridge way is changed (added new nodes), it's updated in the DB but affected tiles are not written to the expiretiles dir.
Expected Behavior
The ways are imported, expired tiles are written to the .tiles file.
Steps to Reproduce
- Run import with attached parameters.
ridges.zip
The ridge.osm.pbf contains one way with three nodes and natural=ridge tag.
./imposm import -config imposmconfig.json -read ridge.osm.pbf -diff -overwritecache -write -optimize -deployproduction
mapping:
tables:
relief_line:
type: linestring
mapping:
natural:
- ridge
columns:
- {name: osm_id, type: id}
- {name: geometry, type: geometry}
- {name: feature, type: mapping_value}
- {key: name, name: name, type: string}
- Check that the way is imported:
SELECT * FROM osm_relief_line
id|osm_id |feature|name|geometry |
--|-----------|-------|----|------------------------------------------------------------------------------------------------------------------------------|
1|10000102265|ridge | |LINESTRING (4237496.450655182 11169915.42881563, 4721388.3455989035 11584942.258937486, 5282409.1303218445 11717163.195396243)|
- Update with the diff file. Ridge_diff.osc.gz contains two ways, both tagged with natural=ridge. First (# 10000102275) is connected to the middle of existing way # 10000102265, second (# 100001102284) is standalone:
./imposm diff -config imposmconfig.json ridge_diff.osc.gz
- Check the DB:
SELECT * FROM osm_relief_line
id|osm_id |feature|name|geometry |
--|-----------|-------|----|------------------------------------------------------------------------------------------------------------------------------|
1|10000102265|ridge | |LINESTRING (4237496.450655182 11169915.42881563, 4721388.3455989035 11584942.258937486, 5282409.1303218445 11717163.195396243)|
2|10000102275|ridge | |LINESTRING (4473474.092794489 11775009.855189221, 4721388.3455989035 11584942.258937486) |
The way 10000102275 (connected one) is imported, standalone way 100001102284 is missing.
Environment
- Imposm 0.11.0
- PostgreSQL 10.15 with PostGIS 2.5
- VirtualBox VM with Ubuntu 18.04.2 LTS
Found an issue with the test set, will try to produce another one
It seems I had corrupted cache so the updates were only artially correct. By coincidence, the smaller data set I used to reproduce rhe issue had another problem leading to the same incorrect behaviour.