2024年6月12日星期三

ogr2ogr 使用sql 从 gpkg 中导出属性表

 ogr2ogr   -f   CSV  aa.csv    mdf.gpkg  -sql "select x, y, '1' as code from table002"

ogr2ogr -f CSV out.csv  -sql "select st_x(pt.geom), st_y(pt.geom), '1' as code from Vertices as pt" in.gpkg

ogr2ogr -f CSV out.csv  -sql "select st_x(pt.geom), st_y(pt.geom), pt.marker as code from Vertices as pt" in.gpkg

输出的csv文件中,最后一列,总是被双引号包起来,怎么去掉呢?

添加选项   -lco STRING_QUOTING=IF_NEEDED

https://gis.stackexchange.com/questions/470855

没有评论: