Questions tagged [pgsql2shp]

Command line tool to export PostGIS tables to shapefiles.

Filter by
Sorted by
Tagged with
3
votes
0answers
57 views

pgsql2shp issue when using WITH clause

I'm using pgsql2shp.exe from a Windows batch file and I get an error when using a WITH clause: "C:\Program Files\PostgreSQL\9.4\bin\pgsql2shp.exe" [ ... ] "WITH test AS (SELECT gid, the_geom FROM ...
0
votes
0answers
2k views

pgsql2shp - fe_sendauth: no password supplied

I am at a total loss here. I receive the error fe_sendauth: no password supplied when trying to execute the following pgsql2shp cmd. pgsql2shp -f folders/San Bruno/San Bruno.shp -h localhost -u ...
2
votes
2answers
466 views

Importing shapefiles to a postgis on a remote server

I have two servers X and Y. X contains a postgis instance whereas Y doesn't have postgis installed, but connects to the postgis instance on X through a connector in nodejs. I want the node script to ...
2
votes
2answers
891 views

Incomplete export of data from a Postgres table

I'm having a serious data export problem with the PGAdmin widget and pgsql2shp (QGIS too). The problem lies within converting a PostGIS table to shapefile. I put in 3234 feature counts...and I get ...
0
votes
2answers
280 views

Using pgsql2shp in server code with PostGIS installed on Amazon RDS instance

I've created a web application using the Meteor web framework, GeoServer and PostGIS. I've deployed my app on Amazon Web Services with the Meteor app and GeoServer running as 2 separate tasks on 1 EC2 ...
1
vote
1answer
130 views

Hex Grid Functions Turns out Empty

I'm trying to implement this function to create a hex grid over a layer. However, when I implement it and export it via pgsql2shp the results ends up empty. The query I used is below CREATE TABLE ...
4
votes
1answer
306 views

Replace a string with a variable inside a pgsql2shp command in Python

How to replace a string with a variable inside a pgsql2shp command in Python? command = "pgsql2shp -f /test.shp -h localhost -u postgres -P postgres gis_exercise \"SELECT d.latitude, d.longitude, d....
2
votes
1answer
180 views

Generating Shapefiles from PostGIS as a Plugin

I used to generate shapefile from PostgreSQL database that is installed with PostGIS tables as templates (geometry_columns and spatial_ref_sys) Shapefiles generated just fine using the following ...
0
votes
1answer
426 views

pgsql2shp error: table does not exist

I am exporting tables from Postgresql 9.2 to shapefiles using postgis 2.0. I have the same system on other machines and it works correctly. I have tried running the command from a prompt and get an ...
2
votes
1answer
765 views

Couldn't Excute command line PostGIS pgsql2shp

I am using postgres 9.3 with postgis 2.1 on Ubuntu 14. When I tried to dump pgsql table using pgsql2shp, I get the following error. Error: pg_wrapper: pgsql2shp was not found in /usr/lib/postgresql/...
2
votes
1answer
489 views

How can I export a shapefile from PostGIS with a GeoJSON query?

I tried to export a shapefile from my PostGIS installation using pgsql2shp as follow pgsql2shp -f tiles.shp -h <host> -u <user> -P <pass> <database> "SELECT id, the_geom FROM &...
1
vote
0answers
750 views

pgsql2shp: create shapefile from empty table, but with known attributes (dbf)

I was trying to generate shapefile from postgis tables using pgsql2shp. Everything is fine except for table with no rows. When trying to create shapefile from an empty table, an error occurs: Could ...
0
votes
1answer
587 views

Export shapefile From PostGIS

I've a website where I'm giving the functionality of creating and editing line features. I'm using Leaflet-Draw plugin for drawing, PostGIS for storing the data and GeoJSON to display it on map. My ...
2
votes
1answer
905 views

pgsql2shp ERROR: incompatible mixed geometry types in table

I have multi-linestring in .shp files and I split the lines with postgis, but that result is only geom column. It does not works with shape file exporter error: incompatible mixed geometry types ...
7
votes
1answer
344 views

Create a Shapefile from SQL dump file

I am trying to map data by querying a table called xyz. I need to show the the_geom data on the map. I have below query in my MapServer .map file: DATA "the_geom from xyz using unique id using SRID=...
3
votes
2answers
4k views

Where to type pgsql2shp command

How to convert post gis database into shapefile, I found that I need to use pgsql2shp command on postgis database query , But how to use it and where to use it. Do I have to use it in the postgre sql ...
3
votes
1answer
4k views

How to use pgsql2shp when PostGIS extensions installed in a separate schema as geometry

I have the PostGIS extension (postgis functions and spatial_ref_sys table) added to a specific schema called postgis. I'm wanting to run the pgsql2shp utility with a select query on geometries stored ...
1
vote
0answers
415 views

PGSQL2SHP Commnad switch column type

I work with Postgis. I have table CREATE TABLE centerline ( gid serial NOT NULL, l_from integer, l_to integer, r_add_pre character varying(15), r_to integer ... } Export this table with ...
3
votes
1answer
594 views

Postgis and python parameterised queries

I have a python script that i am trying to run in order to dump a postgres table and I noticed there is a pgsql2shp command in bash to perform this easily but I would like to incoperate the same ...
2
votes
1answer
2k views

pgsql2shp error when query is introduced

I'm trying to export a table from PostGIS using pgsql2shp. The basic query to export the entire table works fine using the following format: "C:\Program Files\PostgreSQL\9.1\bin\pgsql2shp.exe" -f "D:\...
7
votes
1answer
1k views

Error when using pgsql2shp

I try to export geographical data from a postgis database to a shapefile with pgsql2shp. Normally this works fine, but now I receive the following error. Preparing table for user query... Done. ...
8
votes
3answers
2k views

How to control encodings in pgsql2shp?

I have a database and exporting with pgsql2shp various shapefiles. But when I open the dbf the characters are displayed wrong. Example: BroeksterwÔld and this should be Broeksterwäld. This probably ...