[postgis-users] clipping and dumping

strk at refractions.net strk at refractions.net
Mon Jan 9 07:59:52 PST 2006


The intersection consists in heterogeneous geometry types
(polygons and points maybe?) thus a geometrycollection
is returned. 

Check summary() output to see what you got.

--strk;

On Tue, Jan 10, 2006 at 02:21:12AM +1100, Shoaib Burq wrote:
> Hi
> 
> I'm fairly new to PostGIS.  Am running the most recent PostGIS release
> with Postgres 8.1 on linux.
> 
> I had a rather large shapefile (500MB) which I loaded into the PostGIS
> db using shp2pgsql. I want to now clip it using a bounding box to
> create a new geometry.
> 
> I used the following query:
> 
> CREATE TABLE cont25_a AS SELECT c.gid, c.version, c.igds_level,
> c.igds_color, c.as2482, c.height, c.sourced, c.sourcea, c.entity
> intersection( geomfromtext(
> 'POLYGON((140.864607446442 -36.1766451540338,
> 150.146522341991  -36.1766451540338,
> 150.146522341991  -33.904044258012,
> 140.864607446442  -33.904044258012,
> 140.864607446442  -36.1766451540338))'), c.the_geom) AS the_geom,
> FROM cont25tbl AS c;
> 
> Firstly is this query correct? It appears to have worked successfully.
> When I try to dump the clipped geometry using pgsql2shp I get the
> following error:
> 
> $ pgsql2shp CFA cont25_a -f cont25_a
> Initializing... type 'GEOMETRYCOLLECTION' is not Supported at this time.
> The DBF file will be created but not the shx or shp files.
> You've found a bug! (pgsql2shp.c:2708)
> 
> Unfortunately I can't connect to the db using a tool like uDig or QGIS
> due to firewall restrictions.
> 
> Also, what's the diff between this geometrycollection and the geometry column?
> - sb
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-- 

 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII. 




More information about the postgis-users mailing list