aspectumapp / osm2geojson

Convert OSM and Overpass XML/JSON to GeoJSON
MIT License
100 stars 14 forks source link

"Failed to mark ref as used" #5

Closed clement-igonet closed 4 years ago

clement-igonet commented 4 years ago

Calling xml2geojson function, I get a lot have messages (flooded) like this:

Failed to mark ref as used {'id': -50147, 'type': 'way', 'tags': {'building:levels': '1', 'building:part': 'yes', 'floor': '4', 'level': '4'}, 'nodes': [-49661, -49663, -49665, -49667, -49669, -49671, -49673, -49675, -49677, -49679, -49681, -49683, -49661]} for way {'ref': -50147, 'role': 'inner', 'type': 'way'}

Here are my data from as osm file made with JOSM:

(...)
  <way id='-50147' visible='true'>
    <nd ref='-49661' />
(...)
    <nd ref='-49661' />
    <tag k='building:levels' v='1' />
    <tag k='building:part' v='yes' />
    <tag k='floor' v='4' />
    <tag k='level' v='4' />
  </way>
(...)
  <relation id='-50217' visible='true'>
    <member type='way' ref='-50147' role='inner' />
(...)
    <member type='way' ref='-50075' role='part' />
    <tag k='name' v='XXX' />
    <tag k='type' v='building' />
  </relation>

Does it mean something is wrong in my data ?

rapkin commented 4 years ago

Can you try now (with version 0.1.16)?

clement-igonet commented 4 years ago
Traceback (most recent call last):
  File "./zzz.py", line 5, in <module>
    import osm2geojson
  File "/usr/local/lib/python3.7/dist-packages/osm2geojson/__init__.py", line 3, in <module>
    from .main import xml2geojson, json2geojson, xml2shapes, json2shapes, shape_to_feature
  File "/usr/local/lib/python3.7/dist-packages/osm2geojson/main.py", line 14, in <module>
    with open(polygon_features_file) as data:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.7/dist-packages/osm2geojson/polygon-features.json'
rapkin commented 4 years ago

Ok, problem with polygon-features.json fixed. Update and try to reproduce problem with "Failed to mark ref as used"

polamayster commented 2 years ago

osm2geojson version 0.2.0

For overpass-turbo query

[out:json][timeout:60];
rel(1710944);
out body;
>;
out skel qt;

got a json response and running python3 -m osm2geojson infile.json outfile.geojson prints out a lot of Failed to mark ref as used {'id':...