[postgis-users] problem creating and exporting a polygon with hole using pgsql2shp

Ghislain Geniaux geniaux at avignon.inra.fr
Wed Mar 12 03:28:55 PDT 2008


Using a postgis table with Two polygons, in which polygon 1 entirely  
contained in polygon 2, I've create a new polygon with a hole using :

------
create table matable2 as
select  r.gid, area(symdifference(r.the_geom,i.the_geom)) as area, 
(symdifference(r.the_geom,i.the_geom)) as the_geom from matable as r,  
matable as i where i.gid=2 and r.gid=1;

ALTER TABLE matable2 ADD PRIMARY KEY (GID);
\q
pgsql2shp -f ext.shp conversion 'select * from matable2'
-----

Area is correct, display of the polygon in QGIS is also correct, but  
the export by pgsl2shp produce an empty shapefile.

How to deal with this problem?

------------------------------------------
Geniaux Ghislain


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080312/62a7cb08/attachment.html>


More information about the postgis-users mailing list