[postgis-devel] shp2pgsql and shapefiles without vertices

Markus Schaber schabi at logix-tt.com
Tue Nov 1 03:47:13 PST 2005

Hi, Strk,

strk at refractions.net schrieb:

> Note that intended behaviour has always been _a_bort if shapefile
> contains ONLY null geometries. The check has always been there, but
> it contained a bug: return code from SHPReadObject() was checked
> for NULL (error condition) rather then for nVertices()==0
> (see revision

Oh, then this is a longtime-unnoticed bug that turned into a feature for
the users :-)

> Rather then drop the check (which require double scan of the
> shapefile, and also leaked memory) I just plugged the memory
> leak and fixed the bug. 
> I've implemented the 3-option switch you suggest in HEAD.
> 	-N insert, -Ni
> 	-N skip, -Ns
> 	-N abort, -Na


> As for 1.0 I'd just drop the first scan as a whole, to fix
> the back-compatibility issue. Comments ?

Sounds good.


More information about the postgis-devel mailing list