Postgresql将查询结果导出Shapefile文件


通过pgsql2shp 工具实现

这里写图片描述

语法

pgsql2shp -f <path to output shapefile> -h <hostname> -u <username> -P <password> databasename "<query>"

用例

pgsql2shp -f qds_cnt -h localhost -u postgres -P password gisdb "SELECT sp_count, geom FROM grid50_rsa WHERE province = 'Gauteng'"

转载自:https://blog.csdn.net/gdp12315_gu/article/details/52191319

You may also like...