注意:OSGeo4W的命令行 ogr2ogr特别浪费C盘的缓存,请检查C盘是否有足够的空间
GeoParquet 查询过滤后导出为 shp
使用QGIS的命令行工具,输入以下命令,实现从africa_geodata中检索 k_complexity大于8和area_type为Urban的数据导出到result.shp中
M:\DATA\G20>ogr2ogr result.shp africa_geodata.parquet -sql "SELECT* FROM africa_geodata WHERE area_type='Urban' and k_complexity>8"

pbf 导出为 shp
osm非洲的数据导出points SHP超过2G,我们尝试导出gpkg
osm导出points数据
ogr2ogr pois.gpkg africa-260121.osm.pbf points
osm导出河流线数据数据
ogr2ogr osm_waterways.shp africa-260121.osm.pbf lines -where "waterway IS NOT NULL" -select osm_id,name,waterway -lco ENCODING=UTF-8 --config SHAPE_ENCODING UTF-8
osm导出河流湖泊面数据数据
ogr2ogr osm_water.shp africa-260121.osm.pbf multipolygons -where "natural='water' OR landuse='reservoir'" -select osm_id,name,natural,landuse -lco ENCODING=UTF-8 --config SHAPE_ENCODING UTF-8