尝试使用以下方法从多多边形更改为多边形(shapefile):
ogrinfo tmpem122.shp -sql "alter table tmpem122 alter column OGR_GEOMETRY type geometry(polygon, 4326) using st_geometryn(geometry,1)"
我收到此错误消息:
错误 1:alter table tmpem122 alter column OGR_GEOMETRY type geometry(polygon, 4326) using st_geometryn(geometry,1) 失败,没有“OGR_GEOMETRY”这样的字段。
但根据ogrinfo -sql "select * from tmpem122" tmpem122.shp
,几何列是OGR_GEOMETRY
(或_ogr_geometry_
):
Layer name: tmpem122
Geometry: Polygon
Feature Count: 17
Extent: ...
...
...
Geometry Column = _ogr_geometry_
gid: String (10.0)
...
会有什么问题?请在此处查找文件示例以进行测试:https ://file.io/U4XnvYSb69lp