GPSFileDepot Forums

General Category => Map Making Support => Topic started by: Tsnake on December 13, 2008, 06:26:43 PM

Title: Export Shapefile from PostGIS
Post by: Tsnake 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
Title: Re: Export Shapefile from PostGIS
Post by: -Oz- 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.
Title: Re: Export Shapefile from PostGIS
Post by: -Oz- 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.
Title: Re: Export Shapefile from PostGIS
Post by: -Oz- 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.
Title: Re: Export Shapefile from PostGIS
Post by: aussieskier 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.
Title: Re: Export Shapefile from PostGIS
Post by: -Oz- on January 03, 2009, 05:58:57 PM
Good to know; hopefully they'll officially release it soon.
Title: Re: Export Shapefile from PostGIS
Post by: hntr 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'
Title: Re: Export Shapefile from PostGIS
Post by: -Oz- on March 04, 2009, 09:15:15 PM
did you run as an administrator; the install?
Title: Re: Export Shapefile from PostGIS
Post by: -Oz- on March 05, 2009, 06:26:29 AM
the discussion group says just hit ignore on the error and it should all work fine.
Title: Re: Export Shapefile from PostGIS
Post by: hntr 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
Title: Re: Export Shapefile from PostGIS
Post by: hntr on March 05, 2009, 10:08:26 AM
Quote from: -Oz- on March 04, 2009, 09:15:15 PM
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!

Title: Re: Export Shapefile from PostGIS
Post by: dhisum_dhisum 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.
Title: Re: Export Shapefile from PostGIS
Post by: hntr 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
Title: Re: Export Shapefile from PostGIS
Post by: hntr 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?
Title: Re: Export Shapefile from PostGIS
Post by: hntr on March 06, 2009, 09:44:34 AM
Quote from: -Oz- on March 05, 2009, 06:26:29 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?
Title: Re: Export Shapefile from PostGIS
Post by: -Oz- on March 06, 2009, 11:22:58 PM
What do you mean you can't install the patch?  You just have to replace the file in the postgresql bin directory (postgresql is normally in Program Files) with the one in the zip file.  Then it'll work great.
Title: Re: Export Shapefile from PostGIS
Post by: hntr on March 07, 2009, 09:25:17 AM
 :-\
Title: Re: Export Shapefile from PostGIS
Post by: -Oz- on March 07, 2009, 10:41:31 AM
so it worked?
Title: Re: Export Shapefile from PostGIS
Post by: hntr on March 07, 2009, 11:21:58 AM
yes, i just ran a partial transportation set

Thanks!