AW: [postgis-users] Multipolygon an shape

Stüwe Rolf Rolf.Stuewe at stadt.wuppertal.de
Thu Jan 25 01:42:21 PST 2007


> Hallo,
>
> I have a problem with a polygon:
> I want to create a shape-File from a geometry, which is a multipolygon 
> by definition with the statement:
>
>
> pgsql2shp -f abc verdis_beta wsw_shp
>
>  and  get the following error message:
>
> ERROR: Cannot have multiple geometry types in a shapefile.
> Use option -t(unimplemented currently,sorry...) to specify what type 
> of geometry you want dumped
>

It seems your table contains several geometry types (POLYGON, MULTIPOLYGON, others ?).
A shapefile must store the same object types,

try a query like:
select distinct geometryType(the_geom) from verdis_beta;

to see the table objects types.

You may need to run multi(the_geom) to force multi objects if you have mixed polygons and multipolygones

> And another question:
> I think that I perhaps have overlapping geometrys in my table and they 
> can not build a shapefile.
> When I tryed to take the function "overlaps" to test my table (with 
> 600,000
> polygons) , the duration is very long, even on a small part of my data.
> How can I accelerate  the overlaps-function ?
>

Overlapping geometries can be stored in a shapefile !

Are you using the && operator in your overlaps query ?

Nicolas




Hello Nicolas,

thank you for the 1st answere, you are wright, I have Polygons AND Multipolygons in the data.

But the 2nd answere I don't understand. I don't use the && operator. Will this be better for the performance?


Rolf

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list