osmcode / pyosmium

Python bindings for libosmium
https://osmcode.org/pyosmium
BSD 2-Clause "Simplified" License
318 stars 65 forks source link

Could not convert osm to geoJson #209

Closed aSeniyants closed 2 years ago

aSeniyants commented 2 years ago

Hello. I try: python3 convert.py map.osm data.geoJSON

and get:

RuntimeError: Could not detect file format for filename 'data.geoJSON'.

Please. help me. Thank you

lonvia commented 2 years ago

convert.py is just a simple example that shows how to use the SimpleWriter. It only support OSM data formats as output. geojson is not one of them. Use osmium export from the osmium suite for converting to geojson.

aSeniyants commented 2 years ago

From my python script use: osmium export map.osm -o data.geojson

yes?

joto commented 2 years ago

No, not from Python. It's a command line tool.