[postgis-users] import SHP into postGIS - still error - but it is closer

Otto Laurila otto.laurila at gmail.com
Tue Feb 20 02:36:36 PST 2007


Hi,

I guess the problem is that your geometry after row 4599 is MULTILINESTRING
(as can be seen from the error message) and thus fails the check
"geometrytype(wkb_geometry) = 'LINESTRING'::text OR wkb_geometry IS NULL".

I guess you could alter your table and change the check to something like
this:
CONSTRAINT enforce_geotype_wkb_geometry CHECK
(geometrytype(wkb_geometry) = 'LINESTRING'::text OR
geometrytype(wkb_geometry) = 'MULTILINESTRING'::text OR wkb_geometry IS
NULL),


-- 
Otto


On 2/20/07, Maciej Skorczewski <maciej.skorczewski at procad.pl> wrote:
>
>
> hello again!
>
> so i start new database with latin2 encoding.
> ogr2ogr start generate table
>
> CREATE TABLE osienazwy
> (
>    ogc_fid serial NOT NULL,
>    wkb_geometry geometry,
>    id double precision,
>    idulicy double precision,
>    ulica character(30),
>    "pełna" character(100),
>    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 after 4599 added row (shp file have about 15.000 row of street) i
> get error massage (look on url)
> http://img87.imageshack.us/img87/7464/mapabc9.jpg
>
>
> guestion: what can i do whit this?
>
> maciek
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070220/f1305fcb/attachment.html>


More information about the postgis-users mailing list