I have some GML data that has some unneeded columns in it. I'd like to remove these columns in order to reduce the file size. (To clarify: I mean that the file has many points in it, and each of these points has some metadata attached, and I don't need all of the metadata.)
I'd also like to do this from the command line, as I have many files.
I can convert the GML files into different formats using ogr2ogr
, so my question is this: what's the easiest way to remove a column from a geographic data file, from the command line?
I'm a Python programmer so my instinct would be to convert the file to GeoJSON, then use Python's JSON-parsing methods to read and rewrite the JSON file.
But perhaps there's a more direct way, using a GDAL tool or similar.