Where can I find shp2pgsql in PostGIS?

Where can I find shp2pgsql in PostGIS?

It is a conversion utility that is part of the PostGIS code base and ships with PostGIS packages. If you installed PostgreSQL locally on your computer, you may find that shp2pgsql has been installed along with it, and it is available in the executable directory of your installation.

How to load shape data in PostGIS database?

The shp2pgsql utility makes shape data usable in PostGIS by converting it from binary data into a series of SQL commands that are then run in the database to load the data. 5.4. Loading with shp2pgsql ¶

How does shp2pgsql convert shape files to SQL?

The shp2pgsql converts Shape files into SQL. It is a conversion utility that is part of the PostGIS code base and ships with PostGIS packages. If you installed PostgreSQL locally on your computer, you may find that shp2pgsql has been installed along with it, and it is available in the executable directory of your installation.

Where to find shp2pgsql Windows binaries?

Shp2pgsql.exe is available in binary download from http://download.osgeo.org/postgis/windows. It comes with a lot of unnecessary files. Only libiconv-2.dll in needed. To be able to load shapes to PostGIS also the psql.exe is needed.

shp2pgsql is indeed a command line tool. It comes with your PostgreSQL/PostGIS installation (usually) and, if not accessible via PATH-variable, can (usually) be run from within the /bin-folder in your PostgreSQL-Installation. You can also always ‘make’ the programm from source in any location yourself, if needed.

How to use shp2pgsql in GIS / DB Environnement?

On this page is a cheatsheet concerning a function to be used in GIS/DB environnement : http://www.bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg I would like to create a script allowing users to just have to click on it to launch the process, given the proper datas. But I don’t understand how to use this.

How to use shp2pgsql in a python script?

One way to set up a script (independent of whether you use it within qgis own python environment or not) would be to use Pythons subprocess (or os.system) module (check related question here) to write to shell and execute shp2pgsql.

Where can I download PostgreSQL 9.6.13 binaries?

Binaries for versions of PostgreSQL 9.6-13 (64-bit) available in Unreleased PostGIS Versions and OSGeo downloads ), installers for 9.6-13 (64-bit) are available on stackbuilder and OSGeo downloads. NOTE: Very important fix – Speed up for ST_Transform in PostGIS 3.1.2.