[postgis-users] pgsql2shp

Paragon Corporation lr at pcorp.us
Mon Oct 11 18:22:11 PDT 2010


Bob,

You can ignore that notice.  If you are getting no data, then it usually
means your tables are empty or there is some other problem which it should
notify you of.

The "No proj file will be generated" is just a warning that your data will
lack the meta data required to reproject it with common GIS software like
ArcGIS or MapInfo.  If you don't care about people overlaying data in
various projections on top of yours, you can safely ignore that warning.

As Steve mentioned, its generally good to have a spatial reference system
defined for your data, but as we recall you saying in the past, you are
using PostGIS to do process modeling, so the whole spatial reference system
argument is pretty irrelevant for your purposes.

To answer your question -- 1.4 is not the latest on windows -- there is a
PostGIS 1.5.2 pgsql2shp which I think has some bug fixes that the 1.4 is
currently lacking.  If you don't want to install 1.5, you can just download
the binaries and use the packaged pgsql2shp in the bin folder.  It will work
fine with a  PostGIS 1.4 database.

http://www.postgis.org/download/windows/#windbinaries

Leo and Regina
http://www.postgis.us 

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Bob
Pawley
Sent: Monday, October 11, 2010 6:26 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] pgsql2shp

The reason I asked is that I had tyo upgrade pgdump in order to get it to
work.

I'm using this (and variations of it)

pgsql2shp -f c:\user\bob\ShapeTest.shp -h localhost -u postgres -P
London2342 PDW
	"Select the_geom from p_id.image where p_id_id = '1534'"

or

pgsql2shp -f myfile.shp -h localhost -u postgres -P London2342 PDW
p_id.image -g the_geom

The message just tells me that "No prj file will be generated".

I am using 8.4 if that helps.

Bob

--------------------------------------------------
From: "Mike Toews" <mwtoews at gmail.com>
Sent: Monday, October 11, 2010 1:30 PM
To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
Subject: Re: [postgis-users] pgsql2shp

> As far as I know, all versions of pgsql2shp work just fine on Win7, 
> and they should do exactly what they are documented to do for the 
> situation you describe. What exactly are your problems? If the command 
> had an error and didn't produce any files, what did you type?
>
> -Mike
>
> On 10 October 2010 14:03, Bob Pawley <rjpawley at shaw.ca> wrote:
>> I'm still having problems.
>>
>> My pgsql2shp version is -
>> RCSID: $Id: pgsql2shp.c 4914 2009-11-27 18:12:43Z  pramsey $ RELEASE: 
>> 1.4 Is this the right version to be using on Win 7??
>>
>> Bob
>>
>> --------------------------------------------------
>> From: "Stephen Woodbridge" <woodbri at swoodbridge.com>
>> Sent: Sunday, October 10, 2010 11:14 AM
>> To: <postgis-users at postgis.refractions.net>
>> Subject: Re: [postgis-users] pgsql2shp
>>
>>> On 10/10/2010 1:52 PM, Bob Pawley wrote:
>>>>
>>>> Hi
>>>> I am using the following
>>>> pgsql2shp -f Test.shp -u postgres -P London2342 -k PDW p_id.image 
>>>> -g the_geom to export a shape file from postgis.
>>>> Even tho I specify a single geometry column to be exported I get 
>>>> warnings that column names have been truncated.
>>>
>>> DBF files can only have a maximum of 11 character column names. You 
>>> probably have some that are longer. You can work around this problem 
>>> by using a query at the end of the commandline like:
>>>
>>> 'select col1, col2, col3whichisverylong as col3, ... the_geom from 
>>> p_id.image'
>>>
>>>> Command prompt also informs me that "No prj file will be generated"
>>>> Also a warning 'cannot determine spatial reference". I thought the 
>>>> default was -1?
>>>
>>> -1 is the default and it means that you have not defined a 
>>> projection so it can not create a .prj file. It is generally a good 
>>> idea to always define a projection for your data.
>>>
>>> -Steve W
>>>
>>>> I also get messages-
>>>> "Done (postgis major version: 1)
>>>> Output shape: Polyline
>>>> Dumping: xx [8 rows]"
>>>> What am I doing wrong???
>>>> Bob
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> postgis-users mailing list
>>>> postgis-users at postgis.refractions.net
>>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users





More information about the postgis-users mailing list