[postgis-users] how to import SHP into postGIS? error message.
Chapman, Martin
MChapman at sanz.com
Mon Feb 19 11:57:13 PST 2007
Maciej,
I think you need to set the environment variable PGCLIENTENCODING to whatever you encoding is. Not sure about this though.
Martin Chapman
SANZ Inc.
Software Developer
http://www.earthwhere.com
W - 303.495.6326
C - 303.898.0397
-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Maciej Skorczewski
Sent: Monday, February 19, 2007 11:52 AM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] how to import SHP into postGIS? error message.
i use this command:
ogr2ogr -f postgres "PG:dbname=postgis user=postgres password=pass
host=localhost port=5432" osienazwy.shp
this command create a table:
CREATE TABLE osienazwy
(
ogc_fid serial NOT NULL,
wkb_geometry geometry,
id double precision,
idulicy double precision,
ulica character(30),
id1 double precision,
id2 double precision,
kier2 character(1),
length numeric(31,15),
idodcinka double precision,
CONSTRAINT osienazwy_pk PRIMARY KEY (ogc_fid),
CONSTRAINT enforce_dims_wkb_geometry CHECK (ndims(wkb_geometry) = 2),
CONSTRAINT enforce_geotype_wkb_geometry CHECK
(geometrytype(wkb_geometry) = 'LINESTRING'::text OR wkb_geometry IS NULL),
CONSTRAINT enforce_srid_wkb_geometry CHECK (srid(wkb_geometry) = -1)
)
WITHOUT OIDS;
ALTER TABLE osienazwy OWNER TO postgres;
!!!BUT!!!
i have problem whit encoding so can't load data form shp - have can i
use another encoding? (i think that table create is ok.)
i have this error
http://img89.imageshack.us/img89/3579/errorae0.jpg
(encoding problem)
when i use shp2pgsql i get another table (whit this same shp file)
CREATE TABLE osienazwy
(
gid serial NOT NULL,
id bigint,
idulicy bigint,
ulica character varying(30),
"pełna" character varying(100),
id1 bigint,
id2 bigint,
kier2 boolean,
length numeric,
idodcinka bigint,
the_geom geometry,
CONSTRAINT osienazwy_pkey PRIMARY KEY (gid),
CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2),
CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) =
'MULTILINESTRING'::text OR the_geom IS NULL),
CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = -1)
)
WITHOUT OIDS;
ALTER TABLE osienazwy OWNER TO postgres;
_______________________________________________
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