[postgis-users] Multipolygon an shape

Nicolas Ribot nicky666 at gmail.com
Wed Jan 24 08:24:37 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



More information about the postgis-users mailing list