[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: RE: [postgis-users] pgsql2shp.exe fails with Windows Vista
From: "Paragon Corporation" <lr () pcorp ! us>
Date: 2008-12-20 22:44:16
Message-ID: F7110103C0C94B4899C3F641DB5656D6 () H
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Dan,
Great. Thanks for testing this out for us. As far as the .prj, it won't
create one if your srid is -1. However in all other cases it should if your
spatial_ref_sys table is loaded.
To force it, say your data is in long lat -- try doing something like
pgsql2shp -f C:\test -h t -p 5433 -u postgres mydatabase "SELECT gid,
ST_SetSRID(the_geom, 4326) As the_geom FROM sometable"
And it should create a .prj file with WGS 84 stuff in it.
Similarly if your data does have an SRID - you can force into another
projection by doing something like
pgsql2shp -f C:\test -h t -p 5433 -u postgres mydatabase "SELECT gid,
ST_Transform(the_geom, 4326) As the_geom FROM sometable"
Hope that helps,
Regina
_____
From: postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of Dan
Blomberg
Sent: Saturday, December 20, 2008 4:29 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] pgsql2shp.exe fails with Windows Vista
Thanks Regina,
That worked great on Vista and XP for me. It did not automatically create a
.prj file. Perhaps how I loaded it didn't let it know the projection?
Dan
Paragon Corporation wrote:
Hmm it appears it got stripped. You can download from here.
http://www.bostongis.com/downloads/pgutils/pgsql2shp136patched.zip
Anyrate let me know if it fixes your Vista problem. It also automatically
creates a .prj file. If you can test that out that would be great too.
Thanks,
Regina
_____
From: postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of Paragon
Corporation
Sent: Thursday, December 18, 2008 5:50 PM
To: 'PostGIS Users Discussion'
Subject: RE: [postgis-users] pgsql2shp.exe fails with Windows Vista
Dan,
Can you try this 1.3.6 patched version for me and see if it works. I tried
this on my Windows Xp and Windows Vista boxes and it worked fine on both.
If it works okay for you and verified it doesn't mess any Linux user up,
then I'll commit to 1.3 branch.
Thanks,
Regina
_____
From: postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of Dan
Blomberg
Sent: Tuesday, December 16, 2008 10:13 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] pgsql2shp.exe fails with Windows Vista
I am running it with commands. This is what I'm running:
"c:\Program Files\PostgreSQL\8.3\bin>
pgsql2shp.exe -f contours.shp -u postgres postgis contours
Initializing... Done (postgis major version: 1).
Output shape: PolyLine
Dumping: X"
It crashes at the X and does exactly what Regina is saying (those three
files empty). The same command works fine on XP.
Dan
Paragon Corporation wrote:
I mean XP and 2000 boxes all works fine. Vista is broken for pgsql2shp but
works fine for psql and shp2pgsql.
It couldn't be some dumb thing like because I presume psql was compiled with
VC++ and pgsql2shp I presume was compiled with MingW? (all are stack builder
installs at anyrate)
-----Original Message-----
From: Paragon Corporation [mailto:lr@pcorp.us]
Sent: Tuesday, December 16, 2008 9:48 PM
To: 'PostGIS Users Discussion'
Subject: RE: [postgis-users] pgsql2shp.exe fails with Windows Vista
Mark,
I was running it with command line options to output the file.
Without options it works fine.
It gets as far as creating the .shp, .dbf, .shx before it crashes. All 3
files are pretty empty except some weird header gobbly gook so I guess its
when its getting into the loop to start reading the data so you could be
right about the libpq.
Though if libpq were the problem, wouldn't I have the same issue running
psql and psql works fine.
As a side note -- shp2pgsql works fine though that doesn't depend on libpq
anyway.
Not sure it matters, but I don't actually have PostgreSQL installed on my
Vista, so I'm just running from a folder with psql, pg_dump, libpq etc and
all the dependency files in the folder, which works perfectly fine on my XP
and Vista boxes.
Thanks,
Regina
-----Original Message-----
From: postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of Mark
Cave-Ayland
Sent: Tuesday, December 16, 2008 7:08 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] pgsql2shp.exe fails with Windows Vista
Paragon Corporation wrote:
Oops sent too quickly. Gives
Unhandled exception at 0x76f8814c in pgsql2shp.exe: 0xC0000005: Access
violation reading location 0x01ce2882.
Unfortunately I'm not good at debugging c code. Mark does the above
message mean anything to you.
Only that pgsql2shp is trying to do something that Vista doesn't like?
Could it be related to pgsql2shp trying to locate libpq.dll? I guess this is
just running pgsql2shp without any additional command line options?
In VS 2008 - just tells me binary not built with debug info.
That's correct, the installer versions are stripped to remove the debug to
keep the sizes down. I have the original unstripped versions here, but I'm
fairly certain that gdb/MSVC have different debug info formats.
Hence if you want to debug, you'll need these unstripped versions and a copy
of MSYS/gdb on your Vista box to get a backtrace.
ATB,
Mark.
--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts http://www.siriusit.co.uk
T: +44 870 608 0063
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
_____
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
[Attachment #5 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6001.18183" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008>Dan,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008>Great. Thanks for testing this out for us.
As far as the .prj, it won't create one if your srid is -1. However in all
other cases it should if your spatial_ref_sys table is
loaded.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008>To force it, say your data is in long lat -- try doing
something like</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008>pgsql2shp -f C:\test -h t -p 5433 -u
postgres mydatabase "SELECT gid, ST_SetSRID(the_geom, 4326) As the_geom
FROM sometable"</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008>And it should create a .prj file with WGS 84 stuff in
it.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008>Similarly if your data does have an SRID - you can
force into another projection by doing something like</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008><SPAN class=734143722-20122008>pgsql2shp -f C:\test -h
t -p 5433 -u postgres mydatabase "SELECT gid, ST_Transform(the_geom, 4326)
As the_geom FROM sometable"</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008><SPAN
class=734143722-20122008></SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008><SPAN class=734143722-20122008>Hope that
helps,</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=734143722-20122008><SPAN
class=734143722-20122008>Regina</SPAN></SPAN></FONT></DIV><FONT face=Arial
color=#0000ff size=2></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of </B>Dan
Blomberg<BR><B>Sent:</B> Saturday, December 20, 2008 4:29 PM<BR><B>To:</B>
PostGIS Users Discussion<BR><B>Subject:</B> Re: [postgis-users] pgsql2shp.exe
fails with Windows Vista<BR></FONT><BR></DIV>
<DIV></DIV>Thanks Regina,<BR><BR>That worked great on Vista and XP for me.
It did not automatically create a .prj file. Perhaps how I loaded it
didn't let it know the projection?<BR><BR>Dan<BR><BR>Paragon Corporation wrote:
<BLOCKQUOTE cite=mid:42DFC48823E7409A87D1B94000352F50@b type="cite">
<META content="MSHTML 6.00.6000.16762" name=GENERATOR>
<DIV dir=ltr align=left><SPAN class=875292323-18122008><FONT face=Arial
color=#0000ff size=2>Hmm it appears it got stripped. You can download
from here.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875292323-18122008></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=875292323-18122008><FONT face=Arial
color=#0000ff size=2><A
href="http://www.bostongis.com/downloads/pgutils/pgsql2shp136patched.zip"
moz-do-not-send="true">http://www.bostongis.com/downloads/pgutils/pgsql2shp136patched.zip</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875292323-18122008></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=875292323-18122008><FONT face=Arial
color=#0000ff size=2>Anyrate let me know if it fixes your Vista problem.
It also automatically creates a .prj file. If you can test that out that
would be great too.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875292323-18122008></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=875292323-18122008><FONT face=Arial
color=#0000ff size=2>Thanks,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875292323-18122008><FONT face=Arial
color=#0000ff size=2>Regina</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875292323-18122008></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=875292323-18122008></SPAN> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> <A class=moz-txt-link-abbreviated
href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</A> \
[<A class=moz-txt-link-freetext
href="mailto:postgis-users-bounces@postgis.refractions.net">mailto:postgis-users-bounces@postgis.refractions.net</A>] \
<B>On Behalf Of </B>Paragon Corporation<BR><B>Sent:</B> Thursday, December 18,
2008 5:50 PM<BR><B>To:</B> 'PostGIS Users Discussion'<BR><B>Subject:</B> RE:
[postgis-users] pgsql2shp.exe fails with Windows Vista<BR></FONT><BR></DIV>
<DIV dir=ltr align=left><SPAN class=734114422-18122008><FONT face=Arial
color=#0000ff size=2>Dan,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=734114422-18122008></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=734114422-18122008><FONT face=Arial
color=#0000ff size=2>Can you try this 1.3.6 patched version for me and see if
it works. I tried this on my Windows Xp and Windows Vista boxes and it
worked fine on both. If it works okay for you and verified it doesn't
mess any Linux user up, then I'll commit to 1.3 branch.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=734114422-18122008></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=734114422-18122008><FONT face=Arial
color=#0000ff size=2>Thanks,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=734114422-18122008><FONT face=Arial
color=#0000ff size=2>Regina</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=734114422-18122008></SPAN> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> <A class=moz-txt-link-abbreviated
href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</A> \
[<A class=moz-txt-link-freetext
href="mailto:postgis-users-bounces@postgis.refractions.net">mailto:postgis-users-bounces@postgis.refractions.net</A>] \
<B>On Behalf Of </B>Dan Blomberg<BR><B>Sent:</B> Tuesday, December 16, 2008
10:13 PM<BR><B>To:</B> PostGIS Users Discussion<BR><B>Subject:</B> Re:
[postgis-users] pgsql2shp.exe fails with Windows Vista<BR></FONT><BR></DIV>I
am running it with commands. This is what I'm
running:<BR><BR>"c:\Program Files\PostgreSQL\8.3\bin>
<DIV class="ArwC7c ckChnd" id=:8b><WBR>pgsql2shp.exe -f contours.shp -u
postgres postgis contours<BR>Initializing... Done (postgis major version:
1).<BR>Output shape: PolyLine<BR>Dumping: X"<BR><BR>It crashes at the X and
does exactly what Regina is saying (those three files empty). The same
command works fine on XP.<BR><BR>Dan<BR></DIV><BR>Paragon Corporation wrote:
<BLOCKQUOTE cite=mid:0FB76F04CCBF4CDE87C2DB0C14791BE4@H type="cite"><PRE wrap="">I \
mean XP and 2000 boxes all works fine. Vista is broken for pgsql2shp but works fine \
for psql and shp2pgsql.
It couldn't be some dumb thing like because I presume psql was compiled with
VC++ and pgsql2shp I presume was compiled with MingW? (all are stack builder
installs at anyrate)
-----Original Message-----
From: Paragon Corporation [<A class=moz-txt-link-freetext href="mailto:lr@pcorp.us" \
moz-do-not-send="true">mailto:lr@pcorp.us</A>]
Sent: Tuesday, December 16, 2008 9:48 PM
To: 'PostGIS Users Discussion'
Subject: RE: [postgis-users] pgsql2shp.exe fails with Windows Vista
Mark,
I was running it with command line options to output the file.
Without options it works fine.
It gets as far as creating the .shp, .dbf, .shx before it crashes. All 3
files are pretty empty except some weird header gobbly gook so I guess its
when its getting into the loop to start reading the data so you could be
right about the libpq.
Though if libpq were the problem, wouldn't I have the same issue running
psql and psql works fine.
As a side note -- shp2pgsql works fine though that doesn't depend on libpq
anyway.
Not sure it matters, but I don't actually have PostgreSQL installed on my
Vista, so I'm just running from a folder with psql, pg_dump, libpq etc and
all the dependency files in the folder, which works perfectly fine on my XP
and Vista boxes.
Thanks,
Regina
-----Original Message-----
From: <A class=moz-txt-link-abbreviated \
href="mailto:postgis-users-bounces@postgis.refractions.net" \
moz-do-not-send="true">postgis-users-bounces@postgis.refractions.net</A> [<A \
class=moz-txt-link-freetext \
href="mailto:postgis-users-bounces@postgis.refractions.net" \
moz-do-not-send="true">mailto:postgis-users-bounces@postgis.refractions.net</A>] On \
Behalf Of Mark Cave-Ayland
Sent: Tuesday, December 16, 2008 7:08 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] pgsql2shp.exe fails with Windows Vista
Paragon Corporation wrote:
</PRE>
<BLOCKQUOTE type="cite"><PRE wrap="">Oops sent too quickly. Gives
Unhandled exception at 0x76f8814c in pgsql2shp.exe: 0xC0000005: Access
violation reading location 0x01ce2882.
Unfortunately I'm not good at debugging c code. Mark does the above
message mean anything to you.
</PRE></BLOCKQUOTE><PRE wrap=""><!---->
Only that pgsql2shp is trying to do something that Vista doesn't like?
Could it be related to pgsql2shp trying to locate libpq.dll? I guess this is
just running pgsql2shp without any additional command line options?
</PRE>
<BLOCKQUOTE type="cite"><PRE wrap="">In VS 2008 - just tells me binary not built \
with debug info. </PRE></BLOCKQUOTE><PRE wrap=""><!---->
That's correct, the installer versions are stripped to remove the debug to
keep the sizes down. I have the original unstripped versions here, but I'm
fairly certain that gdb/MSVC have different debug info formats.
Hence if you want to debug, you'll need these unstripped versions and a copy
of MSYS/gdb on your Vista box to get a backtrace.
ATB,
Mark.
--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts <A class=moz-txt-link-freetext \
href="http://www.siriusit.co.uk" \
moz-do-not-send="true">http://www.siriusit.co.uk</A>
T: +44 870 608 0063
_______________________________________________
postgis-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:postgis-users@postgis.refractions.net" \
moz-do-not-send="true">postgis-users@postgis.refractions.net</A> <A \
class=moz-txt-link-freetext \
href="http://postgis.refractions.net/mailman/listinfo/postgis-users" \
moz-do-not-send="true">http://postgis.refractions.net/mailman/listinfo/postgis-users</A>
_______________________________________________
postgis-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:postgis-users@postgis.refractions.net" \
moz-do-not-send="true">postgis-users@postgis.refractions.net</A> <A \
class=moz-txt-link-freetext \
href="http://postgis.refractions.net/mailman/listinfo/postgis-users" \
moz-do-not-send="true">http://postgis.refractions.net/mailman/listinfo/postgis-users</A>
</PRE></BLOCKQUOTE><PRE wrap=""><HR width="90%" SIZE=4>
_______________________________________________
postgis-users mailing list
<A class=moz-txt-link-abbreviated \
href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A>
<A class=moz-txt-link-freetext \
href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A>
</PRE></BLOCKQUOTE></BODY></HTML>
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic