Opened 16 years ago

Last modified 16 years ago

#198 closed defect

shp2pgsql gives bad output on bad input — at Initial Version

Reported by: pramsey Owned by: pramsey
Priority: medium Milestone: PostGIS 1.4.0
Component: postgis Version: master
Keywords: Cc:

Description

Using the building_oops data from #167, you get I get the following output:

Heron-2:buildings_oops pramsey$ shp2pgsql buildings_oops.shp b
Shapefile type: PolygonZ
Postgis type: MULTIPOLYGON[4]
SET STANDARD_CONFORMING_STRINGS TO ON;
BEGIN;
CREATE TABLE "b" (gid serial PRIMARY KEY,
"layer" varchar(254),
"elevation" numeric,
"shape_leng" numeric,
"shape_area" numeric);
SELECT AddGeometryColumn('','b','the_geom','-1','MULTIPOLYGON',4);
ERROR: geometry requires more points
INSERT INTO "b" ("layer","elevation","shape_leng","shape_area",the_geom) VALUES ('S-BUILDING','1384.22300000','0.00000000000','0.00000000000',Heron-2:buildings_oops pramsey$ 

Again, I re-iterate, that we should not be doing validity checking in the loader.

Change History (0)

Note: See TracTickets for help on using tickets.