Thread: ERROR: Cannot determine geometry type (empty table).
Hello Everyone,
Iam trying to use the postgis dumper.I get the follwing error.
ERROR: Cannot determine geometry type (empty table).
Iam sending the sql file as an attachment.
Any suggestions from your side would be of great help to me.
Thanks
sunanda
Attachment
On Thu, Feb 23, 2006 at 01:48:54PM -0600, Sunanda Kumaraguru wrote: > Hello Everyone, > > Iam trying to use the postgis dumper.I get the follwing error. > > ERROR: Cannot determine geometry type (empty table). > > > > Iam sending the sql file as an attachment. > > Any suggestions from your side would be of great help to me. I suggest you ask on the PostGIS list... you'll find a lot more knowledgeable folks over there. IIRC this is a pretty common problem you've run into, so searching their list archives might prove useful too. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
On Thu, Feb 23, 2006 at 01:48:54PM -0600, Sunanda Kumaraguru wrote: > Iam trying to use the postgis dumper.I get the follwing error. > > ERROR: Cannot determine geometry type (empty table). What exactly did you do to get this error? Are you trying to use pgsql2shp? After loading your data it worked fine for me: % pgsql2shp postgis feb3 Initializing... Done (postgis major version: 1). Output shape: Polygon Dumping: XX [3 rows]. % ls -l total 10 -rw------- 1 mfuhr mfuhr 223 Feb 23 14:49 feb3.dbf -rw------- 1 mfuhr mfuhr 5612 Feb 23 14:49 feb3.shp -rw------- 1 mfuhr mfuhr 124 Feb 23 14:49 feb3.shx However, if I empty the table then I get the same error you got: % psql -d postgis -c 'delete from feb3' DELETE 3 % pgsql2shp postgis feb3 Initializing... ERROR: Cannot determine geometry type (empty table). I'd guess you're trying to dump an empty table. If that doesn't help then try asking on the postgis-users mailing list. http://postgis.refractions.net/mailman/listinfo/postgis-users -- Michael Fuhr
On Thu, Feb 23, 2006 at 02:54:48PM -0700, Michael Fuhr wrote: > I'd guess you're trying to dump an empty table. Or maybe you're issuing a query that returns no rows. % psql -d postgis -c 'select max(gid) from feb3' max ----- 2 (1 row) % pgsql2shp postgis 'select * from feb3 where gid > 2' Preparing table for user query... Done. Initializing... ERROR: Cannot determine geometry type (empty table). -- Michael Fuhr