Yes, I convert my data using the following command "UPDATE osm_line SET way = ST_Multi(way) where geometrytype(way) = 'LINESTRING'".
> time psql -U pgsql -d osm -c "UPDATE osm_line SET way = ST_Multi(way) where > geometrytype(way) = 'LINESTRING';" > UPDATE 914007 > > real 70m12.384s > user 0m0.009s > sys 0m0.011s > Many thanks for response. I will try them. But actually I wouldn't want to convert my data to MULTI*. It is look like hack to work with the new version of pgsql2shp. I think that adding any option to pgsql2shp for turn of checking of geometry types or downgrading to previous version of pgsql2shp can solve my problem. 2010/9/6 Stephen Woodbridge <[email protected]>: > On 9/5/2010 10:16 PM, Denis Rykov wrote: >> >> I've tried to convert all my geometries to MULTI* with ST_Multi() >> function but it works very slowly. >> >> 2010/9/5 Denis Rykov<[email protected]>: >>> >>> Hi, I have a PostGIS table with Polygonal and Multi Polygonal types >>> of geometry. >>> I used the pgsql2shp last year and had no problems. But some days ago >>> I've update pgsql2shp from svn. >>> And now I can't convert my PostGIS data into shapefile because I get >>> an error : "ERROR: Mixed geometry types in table". >>> I think that it is not necessary to consider this case as erroneous. > > Denis, > > How you converting them? Using and UPDATE? > This would be very slow because every (most?) rows in the table would need > to be updated. > > There are a couple of faster alternatives: > > 1. create table newtable select ..., st_multi(the_geom) form ...; > then dump that table > > 2. pgsql2shp [<options>] <database> "select ..., st_multi(the_geom) as > the_geom from ...." > > -Steve W > _______________________________________________ > postgis-users mailing list > [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users >
_______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
