Re: [postgis-users] Using shp2pgsql

2012-04-25 Thread Paul Maddock
Nothing, the sql file looks beautiful.  No errors.  The interesting thing to me 
is that it repeats the error when I pipe it and the error repeats for as many 
time as there are rows of data.

What could this mean?  Might there be something wrong with my schema?


Shp2psql is supposed to create the table which it does:
SET CLIENT_ENCODING TO UTF8;
SET STANDARD_CONFORMING_STRINGS TO ON;
BEGIN;
CREATE TABLE columbus.pole_region (gid serial PRIMARY KEY,
location_n varchar(15),
height float8,
class varchar(11),
ownership varchar(7),
owner varchar(80),
plant_acct varchar(31),
vintage_ye float8,
inservice_ varchar(12),
pole_kind varchar(31),
pole_type varchar(24),
original_t varchar(25),
design_sta varchar(18),
facility_s varchar(10),
ciac_statu varchar(8),
ciac_date varchar(12),
west_pole_ varchar(6));
SELECT 
AddGeometryColumn('columbus','pole_region','geom_3754','3754','MULTIPOLYGON',4);

From: Denis Rouzaud [mailto:denis.rouz...@gmail.com]
Sent: Wednesday, April 25, 2012 10:52 AM
To: PostGIS Users Discussion
Cc: Paul Maddock
Subject: Re: [postgis-users] Using shp2pgsql

You could output shp2pgsql to a SQL file, then use it in psql to see at which 
line the error occurs.



On 04/25/2012 04:46 PM, Paul Maddock wrote:
Dear all,

I'm using the following code to transform a shapefile I have into a table and 
import it into my database:
shp2pgsql -s 3754 ~/JOE/columbus/pole_region.shp columbus.pole_region | psql -h 
localhost -U postgres -p 5432 -d paul

When it runs I have to put my password in for postgres (expected), and I get 
the following output:

ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block

The database paul is created and the schema columbus is created and is owned by 
postgres.

What am I doing wrong?  Do I have to set datatypes?

Thanks for the help,
Paul


Paul A. Maddock
Mapping Technician
IJUS LLC
560 Officenter Place
Gahanna, OH 43230
Cell: (513) 404-6476
[cid:image001.gif@01CD22D2.3CCDA8C0]http://www.ijus.net/index.html





___

postgis-users mailing list

postgis-users@postgis.refractions.netmailto:postgis-users@postgis.refractions.net

http://postgis.refractions.net/mailman/listinfo/postgis-users
inline: image001.gif___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Using shp2pgsql

2012-04-25 Thread White, Richard
There is posibly something wrong with the schema.

 

I have just had the same problem. Removed the schema definition from the
shp2pgsql command and then ran psql again and it loaded fine. However,
it loaded into the public schema.

 

So it must be to do with the schema.

 

From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Paul
Maddock
Sent: 25 April 2012 16:02
To: postgis-users@postgis.refractions.net
Subject: Re: [postgis-users] Using shp2pgsql

 

Nothing, the sql file looks beautiful.  No errors.  The interesting
thing to me is that it repeats the error when I pipe it and the error
repeats for as many time as there are rows of data.

 

What could this mean?  Might there be something wrong with my schema?  

 

 

Shp2psql is supposed to create the table which it does:

SET CLIENT_ENCODING TO UTF8;

SET STANDARD_CONFORMING_STRINGS TO ON;

BEGIN;

CREATE TABLE columbus.pole_region (gid serial PRIMARY KEY,

location_n varchar(15),

height float8,

class varchar(11),

ownership varchar(7),

owner varchar(80),

plant_acct varchar(31),

vintage_ye float8,

inservice_ varchar(12),

pole_kind varchar(31),

pole_type varchar(24),

original_t varchar(25),

design_sta varchar(18),

facility_s varchar(10),

ciac_statu varchar(8),

ciac_date varchar(12),

west_pole_ varchar(6));

SELECT
AddGeometryColumn('columbus','pole_region','geom_3754','3754','MULTIPOLY
GON',4);

 

From: Denis Rouzaud [mailto:denis.rouz...@gmail.com] 
Sent: Wednesday, April 25, 2012 10:52 AM
To: PostGIS Users Discussion
Cc: Paul Maddock
Subject: Re: [postgis-users] Using shp2pgsql

 

You could output shp2pgsql to a SQL file, then use it in psql to see at
which line the error occurs.



On 04/25/2012 04:46 PM, Paul Maddock wrote: 

Dear all,

 

I'm using the following code to transform a shapefile I have into a
table and import it into my database:

shp2pgsql -s 3754 ~/JOE/columbus/pole_region.shp columbus.pole_region |
psql -h localhost -U postgres -p 5432 -d paul

 

When it runs I have to put my password in for postgres (expected), and I
get the following output:

 

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

 

The database paul is created and the schema columbus is created and is
owned by postgres. 

 

What am I doing wrong?  Do I have to set datatypes?

 

Thanks for the help,

Paul

 

 

Paul A. Maddock

Mapping Technician

IJUS LLC

560 Officenter Place

Gahanna, OH 43230

Cell: (513) 404-6476

  http://www.ijus.net/index.html 

 





___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Infoterra Ltd. Is part of the Astrium GEO-Information Services Division and a 
wholly owned subsidiary of Astrium, Europe's leading space systems and services 
specialist.

Disclaimer. The information contained in this e-mail and its attachments are 
confidential and intended only for the use of the named addressee(s). If you 
are not the intended addressee, please do not read, copy, use or disclose this 
message or its attachments. If you have received this message in error, please 
notify the sender immediately and delete or destroy all copies of this message 
and attachments in all media. Any views or opinions expressed are solely those 
of the author and do not necessarily represent those of Infoterra Ltd and shall 
not form part of any binding agreement.

Infoterra Limited a company registered in England under number 2359955 and 
having its registered office at Atlas House, 41 Wembley Road, Leicester, LE3 
1UT. VAT number GB 476 0468 27. 

P Before printing, think about the environment 

image001.gif___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo

Re: [postgis-users] Using shp2pgsql

2012-04-25 Thread Stephen V. Mather
I think he means run it in psql so that you can observe what line the error
occurs.  You are unlikely to see the error before loading it in psql.

 

Best,

Steve

 

http://www.clemetparks.com/images/esig/cmp-ms-90x122.pngStephen Mather
Geographic Information Systems (GIS) Manager
(216) 635-3243

s...@clevelandmetroparks.com
 http://www.clemetparks.com/ clevelandmetroparks.com

 

 

 

 

From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Paul
Maddock
Sent: Wednesday, April 25, 2012 11:02 AM
To: postgis-users@postgis.refractions.net
Subject: Re: [postgis-users] Using shp2pgsql

 

Nothing, the sql file looks beautiful.  No errors.  The interesting thing to
me is that it repeats the error when I pipe it and the error repeats for as
many time as there are rows of data.

 

What could this mean?  Might there be something wrong with my schema?  

 

 

Shp2psql is supposed to create the table which it does:

SET CLIENT_ENCODING TO UTF8;

SET STANDARD_CONFORMING_STRINGS TO ON;

BEGIN;

CREATE TABLE columbus.pole_region (gid serial PRIMARY KEY,

location_n varchar(15),

height float8,

class varchar(11),

ownership varchar(7),

owner varchar(80),

plant_acct varchar(31),

vintage_ye float8,

inservice_ varchar(12),

pole_kind varchar(31),

pole_type varchar(24),

original_t varchar(25),

design_sta varchar(18),

facility_s varchar(10),

ciac_statu varchar(8),

ciac_date varchar(12),

west_pole_ varchar(6));

SELECT
AddGeometryColumn('columbus','pole_region','geom_3754','3754','MULTIPOLYGON'
,4);

 

From: Denis Rouzaud [mailto:denis.rouz...@gmail.com] 
Sent: Wednesday, April 25, 2012 10:52 AM
To: PostGIS Users Discussion
Cc: Paul Maddock
Subject: Re: [postgis-users] Using shp2pgsql

 

You could output shp2pgsql to a SQL file, then use it in psql to see at
which line the error occurs.



On 04/25/2012 04:46 PM, Paul Maddock wrote: 

Dear all,

 

I'm using the following code to transform a shapefile I have into a table
and import it into my database:

shp2pgsql -s 3754 ~/JOE/columbus/pole_region.shp columbus.pole_region | psql
-h localhost -U postgres -p 5432 -d paul

 

When it runs I have to put my password in for postgres (expected), and I get
the following output:

 

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

 

The database paul is created and the schema columbus is created and is owned
by postgres. 

 

What am I doing wrong?  Do I have to set datatypes?

 

Thanks for the help,

Paul

 

 

Paul A. Maddock

Mapping Technician

IJUS LLC

560 Officenter Place

Gahanna, OH 43230

Cell: (513) 404-6476

 http://www.ijus.net/index.html Description: Description: Home

 





___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
image002.pngimage003.gif___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Using shp2pgsql

2012-04-25 Thread Paul Maddock
Yeah.  I figured my problem out.  It ended up being an issue with the schema.

Thanks all!

From: postgis-users-boun...@postgis.refractions.net 
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Stephen V. 
Mather
Sent: Wednesday, April 25, 2012 12:07 PM
To: 'PostGIS Users Discussion'
Subject: Re: [postgis-users] Using shp2pgsql

I think he means run it in psql so that you can observe what line the error 
occurs.  You are unlikely to see the error before loading it in psql.

Best,
Steve

[cid:image001.png@01CD22DC.35ACA9B0]Stephen Mather
Geographic Information Systems (GIS) Manager
(216) 635-3243
s...@clevelandmetroparks.commailto:s...@clevelandmetroparks.com
clevelandmetroparks.comhttp://www.clemetparks.com/




From: 
postgis-users-boun...@postgis.refractions.netmailto:postgis-users-boun...@postgis.refractions.net
 
[mailto:postgis-users-boun...@postgis.refractions.net]mailto:[mailto:postgis-users-boun...@postgis.refractions.net]
 On Behalf Of Paul Maddock
Sent: Wednesday, April 25, 2012 11:02 AM
To: 
postgis-users@postgis.refractions.netmailto:postgis-users@postgis.refractions.net
Subject: Re: [postgis-users] Using shp2pgsql

Nothing, the sql file looks beautiful.  No errors.  The interesting thing to me 
is that it repeats the error when I pipe it and the error repeats for as many 
time as there are rows of data.

What could this mean?  Might there be something wrong with my schema?


Shp2psql is supposed to create the table which it does:
SET CLIENT_ENCODING TO UTF8;
SET STANDARD_CONFORMING_STRINGS TO ON;
BEGIN;
CREATE TABLE columbus.pole_region (gid serial PRIMARY KEY,
location_n varchar(15),
height float8,
class varchar(11),
ownership varchar(7),
owner varchar(80),
plant_acct varchar(31),
vintage_ye float8,
inservice_ varchar(12),
pole_kind varchar(31),
pole_type varchar(24),
original_t varchar(25),
design_sta varchar(18),
facility_s varchar(10),
ciac_statu varchar(8),
ciac_date varchar(12),
west_pole_ varchar(6));
SELECT 
AddGeometryColumn('columbus','pole_region','geom_3754','3754','MULTIPOLYGON',4);

From: Denis Rouzaud 
[mailto:denis.rouz...@gmail.com]mailto:[mailto:denis.rouz...@gmail.com]
Sent: Wednesday, April 25, 2012 10:52 AM
To: PostGIS Users Discussion
Cc: Paul Maddock
Subject: Re: [postgis-users] Using shp2pgsql

You could output shp2pgsql to a SQL file, then use it in psql to see at which 
line the error occurs.



On 04/25/2012 04:46 PM, Paul Maddock wrote:
Dear all,

I'm using the following code to transform a shapefile I have into a table and 
import it into my database:
shp2pgsql -s 3754 ~/JOE/columbus/pole_region.shp columbus.pole_region | psql -h 
localhost -U postgres -p 5432 -d paul

When it runs I have to put my password in for postgres (expected), and I get 
the following output:

ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block

The database paul is created and the schema columbus is created and is owned by 
postgres.

What am I doing wrong?  Do I have to set datatypes?

Thanks for the help,
Paul


Paul A. Maddock
Mapping Technician
IJUS LLC
560 Officenter Place
Gahanna, OH 43230
Cell: (513) 404-6476
[cid:image003.gif@01CD22DC.35ACA9B0]http://www.ijus.net/index.html



___

postgis-users mailing list

postgis-users@postgis.refractions.netmailto:postgis-users@postgis.refractions.net

http://postgis.refractions.net/mailman/listinfo/postgis-users
inline: image001.pnginline: image003.gif___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Using shp2pgsql

2012-04-25 Thread Mike Toews
For future reference, when loading an SQL script with psql, to stop
and exit on the first error, add the option:

-v ON_ERROR_STOP=1

This is off by default, which is why you saw the repeated (and
useless) error messages. With this option enabled, you will only see
the first error, so you will know the real error.

-Mike
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users