[mapguide-users] PostGIS selection bug?
Maciej Skorczewski
maciej.skorczewski at procad.pl
Mon Feb 19 13:19:08 EST 2007
hi Mark!
Can you write your ogr2ogr command (or shp2pgsql if you use it) of
import shp to postgis?
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
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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: error.JPG
Type: image/jpeg
Size: 30072 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070219/db370595/error-0001.jpe
More information about the mapguide-users
mailing list