osm-export-tool-python
osm-export-tool-python copied to clipboard
Add option to truncate fields that are too long
In processing panama.osm.pbf, I get the following error:
$ osm-export-tool -v panama.osm.pbf panama.gpkg
Warning 1: Value of field 'addr:street' has 86 characters, whereas maximum allowed is 80.
Warning 1: Value of field 'addr:housenumber' has 100 characters, whereas maximum allowed is 80.
Traceback (most recent call last):
File "/usr/bin/osm-export-tool", line 6, in <module>
main()
File "/usr/lib/python3.8/site-packages/osm_export_tool/cmd.py", line 58, in main
h.apply_file(parsed.osm_file, locations=True, idx='sparse_file_array')
File "/usr/lib/python3.8/site-packages/osm_export_tool/tabular.py", line 290, in way
wkb = fab.create_linestring(w)
osmium._osmium.InvalidLocationError: invalid location
There should be an option to truncate fields. The verbose option should also display the contents of the field.