I am writing a program that takes in a .osm file and then calculates some new attributes for that feature.
I am using the python libraries gdal and ogr to help deal with the data. So far OGR has proven to be a very useful library for parsing and accessing the OSM file.
I was wondering if it possible to add an additional field to the OSM file using OGR.
There is a .SetField() function, but it only seems to work on fields that already exist. Is there a way I can design my own field and add it as an extra field to the OSM file?
Bonus points if I can keep the original OSM file intact for testing purposes!
Alternatively, it doesn't have to use OGR, any Python library will do.