Closed wuzyzy closed 4 years ago
Now all used refs are filtered by this block of code https://github.com/aspectumapp/osm2geojson/blob/master/osm2geojson/main.py#L76. I can make option to extract all geometries, something like this
osm2geojson(some_xml, filter_used_refs=False)
Will be helpfull if you will provide small example for this problem
Cool! For the example, you can produce a overpass quried osm json in the overpass turbo
[out:json][bbox:50.745,7.17,50.75,7.18];
(relation[landuse];way[landuse];);
(._;>;);
out;
Then use osm2geojson.json2geojson(resopnse.json())
to produce the geojson result.
After all you will find only 8 features are generated.
Because some way elements are a part of a relation with "role: inner".
I made this option, but you will receive every node as Point. So result looks like this
Is it good for you?
Cool, then I can filter the point or line to get polygon geometry.
I find that the result made by this tool is different from the output in osmtogeojson. I believe the reason is the 'used strategy' in your code. Maybe you output all geometry?