Creating SHP from SQL

Is it possible to convert sql to shp file using pgsql2shp without shell? Through some SQL syntax (postgis, postgresql)?

+3
source share
1 answer

This is not possible without invoking the shell. However, two kuldges are available:

1) You can create a function in an unsafe language (e.g. python) in postgresql, which then runs pgsql2shp. This is an ugly hack, but has the advantage of creating a shapefile by SQL query.

2) sql , ST_AsText. csv sql COPY TO, csv , script.

( 2, , ), .

+1

Source: https://habr.com/ru/post/1744292/


All Articles