[postgis-users] shp2pgsql inner/outer ring detection bug

strk strk at freek.keybit.net
Fri Dec 20 08:22:53 PST 2002


Hi jeff,

I'm using shp2pgsql from postgis version 0.7.3.
The inner/outer ring detection code fails for this shape:

	ftp://ftp.refractions.net/pub/refractions/dirty.tgz

In particular the resulting record with gid=2 will be a MULTIPOLYGON
with 26 polygons inside. The last one (geometryN 25) have just one ring
with vertex defined in counterclockwise order.

It is supposed to be a hole ( the shapefile is not dirty )
but shp2pgsql created a new polygon for it instead of defining
it as an inner ring.

Apart from this peculiar shapefile i think this is a general issue.
If I'm not wrong shp2pgsql should *never* create a polygon with
first/outer ring defined in counterclockwise order or a inner/hole
ring defined in clockwise order ...

Can you please check this out ?

--strk;



More information about the postgis-users mailing list