Welcome, Guest. Please login or register.

Login with username, password and session length
Forums Search:  


Author Topic: Export Shapefile from PostGIS  (Read 21217 times)

Tsnake

  • Jr. Member
  • **
  • Posts: 21
  • Karma: 0
    • View Profile
Export Shapefile from PostGIS
« on: December 13, 2008, 06:26:43 PM »
I have compiled all the NHD info into PostgreSQL.  When I try to export the data to a shapefile, it starts fine, but when it starts dumping, an error message comes up that says pgsql2shp.exe has stopped working. 

I am running Windows Vista Home Premium 32 bit.  Any ideas?

Tsnake

-Oz-

  • Map Maker!
  • Administrator
  • Expert Advisor
  • *****
  • Posts: 1577
  • Karma: 27
    • View Profile
    • GPSFileDepot
Re: Export Shapefile from PostGIS
« Reply #1 on: December 13, 2008, 06:56:56 PM »
Yes!  Another user with the same issue.  I am on Vista Business and get the same error.  Now that I know someone else has that error I'll send a message to the postGIS people and see what they have to say.

Regrettably I have no solution at this time.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

-Oz-

  • Map Maker!
  • Administrator
  • Expert Advisor
  • *****
  • Posts: 1577
  • Karma: 27
    • View Profile
    • GPSFileDepot
Re: Export Shapefile from PostGIS
« Reply #2 on: December 16, 2008, 09:24:33 PM »
Been in contact with the developer; they're working on it.  Its failing on a lot of people (everyone)'s vista.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

-Oz-

  • Map Maker!
  • Administrator
  • Expert Advisor
  • *****
  • Posts: 1577
  • Karma: 27
    • View Profile
    • GPSFileDepot
Re: Export Shapefile from PostGIS
« Reply #3 on: December 20, 2008, 04:10:45 PM »
I've been in contact with the developer. 

Attached is a replacement file called version 1.3.6.  it works for me on vista and Xp so i'm having my new computer crank out the dem files now.

Hopefully it works for you too.
« Last Edit: December 20, 2008, 04:20:59 PM by -Oz- »
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

aussieskier

  • Jr. Member
  • **
  • Posts: 6
  • Karma: 0
    • View Profile
Re: Export Shapefile from PostGIS
« Reply #4 on: January 03, 2009, 05:57:15 PM »
Just an FYI I was getting errors on XP SP2, but this patched version seems to have fixed the problem.

-Oz-

  • Map Maker!
  • Administrator
  • Expert Advisor
  • *****
  • Posts: 1577
  • Karma: 27
    • View Profile
    • GPSFileDepot
Re: Export Shapefile from PostGIS
« Reply #5 on: January 03, 2009, 05:58:57 PM »
Good to know; hopefully they'll officially release it soon.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

hntr

  • Mapper
  • ***
  • Posts: 68
  • Karma: 0
    • View Profile
Re: Export Shapefile from PostGIS
« Reply #6 on: March 04, 2009, 07:13:20 AM »
Any news on getting PostGIS working with Vista?  I get an error when I try the patch 'libpq.dll was not found'
« Last Edit: March 04, 2009, 07:38:35 AM by hntr »

-Oz-

  • Map Maker!
  • Administrator
  • Expert Advisor
  • *****
  • Posts: 1577
  • Karma: 27
    • View Profile
    • GPSFileDepot
Re: Export Shapefile from PostGIS
« Reply #7 on: March 04, 2009, 09:15:15 PM »
did you run as an administrator; the install?
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

-Oz-

  • Map Maker!
  • Administrator
  • Expert Advisor
  • *****
  • Posts: 1577
  • Karma: 27
    • View Profile
    • GPSFileDepot
Re: Export Shapefile from PostGIS
« Reply #8 on: March 05, 2009, 06:26:29 AM »
the discussion group says just hit ignore on the error and it should all work fine.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

hntr

  • Mapper
  • ***
  • Posts: 68
  • Karma: 0
    • View Profile
Re: Export Shapefile from PostGIS
« Reply #9 on: March 05, 2009, 08:58:13 AM »
I am using the admin account on this computer, so yes, I did install as the administrator.  however, I didn't select the 'run as administrator' option like I did with the Topo Process Program install (because this option wasn't available when I right click)

As far as the patch, the error is 'this application has failed to start because libpq.dll was not found.  Re-installing the application may fix the problem'
The only option is to hit OK and the program is forced to stop.  However, it may work without the patch, I was able to execute a few commands as described in your tutorial without the patch, but ran into errors down the line.  i will try it again

hntr

  • Mapper
  • ***
  • Posts: 68
  • Karma: 0
    • View Profile
Re: Export Shapefile from PostGIS
« Reply #10 on: March 05, 2009, 10:08:26 AM »
did you run as an administrator; the install?

I uninstalled Postgresql to make sure I install as admin, but now to reinstall i need to manually delete the user postgres (or find the random password that was created).  How do i manually delete usernames from the server?

-Eric

P.S.  I installed it with a new username, but then PostGIS had errors on install.  This stuff might be over my head, especially because I have Vista!


dhisum_dhisum

  • Mapper
  • ***
  • Posts: 71
  • Karma: 0
    • View Profile
Re: Export Shapefile from PostGIS
« Reply #11 on: March 05, 2009, 11:28:49 AM »
On Vista:

Click on Start
In the little search box in the start menu, type "compmgmt.msc"

A window by the name "Computer Management" comes up.
There is a pane on the left, where the top node is called "Computer management', expand it, go to "Local users and groups", expand that and then click on "users", this will bring the list of "users" in the right pane. You should see the "postgres" user in this list. Right click on the postgres user and it will show option for "setting a password". Additionally, from this menu, you can delete the user as well.

hntr

  • Mapper
  • ***
  • Posts: 68
  • Karma: 0
    • View Profile
Re: Export Shapefile from PostGIS
« Reply #12 on: March 05, 2009, 12:17:06 PM »
OK thanks.

i was unable to find the 'Local users and groups'  listing (system tools, storage, and services and apps were the only options), but i was able to delete the user through the Control Panel

hntr

  • Mapper
  • ***
  • Posts: 68
  • Karma: 0
    • View Profile
Re: Export Shapefile from PostGIS
« Reply #13 on: March 05, 2009, 01:01:12 PM »
I still get an error when installing during the service configuration: 'Invalid username specified:  Logon Failure: unknown username or bad password'

Anything else i should try?

hntr

  • Mapper
  • ***
  • Posts: 68
  • Karma: 0
    • View Profile
Re: Export Shapefile from PostGIS
« Reply #14 on: March 06, 2009, 09:44:34 AM »
the discussion group says just hit ignore on the error and it should all work fine.

OK postGIS and Postgresql seem to be working again.  I have connected to the server and can see the postgis database.  I went through the water data tutorial fine with PostgreSQL working fine until the last part 'Export Shapefiles from PostGIS'.  I get the error mentioned in the beginning of this post by Tsnake and I can't install the patch as described earlier. 

Anything else I can try?