I want to export a GPX file from my postgis database. Luckily I have a name field in postgis, so the 'name' field automatically maps directly over. But I want to export another field into the GPX comment field. How do I do that?
I tried using a -sql statement with 'select name, change as cmt', but when I did that, ogr2ogr lost the geometry field: ERROR 6: Geometry type of `None' not supported in GPX.
I tried adding the geometry field to the sql statement and got ERROR 6: Cannot create GPX layer sql_statement with unknown geometry type. Adding an explicit -geomfield command didn't help - I got the same error.