[postgis-users] loading only geometries of shp files into PostGIS

karsten karsten at terragis.net
Wed Jun 6 22:23:22 PDT 2012


Hi All,
 
I am working on a data upload function where for a web map a user can upload
a shape file onto the server, the file will then be loaded via a utility
into PostGIS e.g. using ogr2ogr or shp2pgsql.
Now we all know that 
usually a shape files has at least 3 files shp, shx and dbf to be
complete... but unusually 	
	- well I was wondering if it would be possible to only use a shp
file alone to load the geometry to PostGIS (if it is ok to lose index and
attributes) 

 
The reason is this would have several advantages for the work I am tying to
do
1. the shape file is user provided (if will be always 'simple' polygon
shapes, but due to that will always have non consistent attributes (i.e not
the same tabel schema) which are not needed anyway for the purposes of the
app
2. the geometry alone will be used to show areas of Interest for the user on
the map (attributes are not needed, only location and extent matters)
3. inconsistencies of differing  attributes will not be a problem if I could
in fact only import the geometry to PostGIS and simply add a unique gid and
user id as only default attributes to the PostGIS table
 
Any ideas on that weird idea , if that could be accomplished with existing
tools without too much trouble ?
 
Cheers
Karsten
 

Karsten Vennemann
Principal

Terra GIS LTD
2119 Boyer Ave E 
Seattle, WA  98112
USA 
 <http://www.terragis.net/> www.terragis.net

Phone ++1 206 905 1711
Fax      ++1 925 905 1711

 




=======
Email scanned by PC Tools - No viruses or spyware found.
(Email Guard: 9.0.0.888, Virus/Spyware Database: 6.19830)
http://www.pctools.com/
=======
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120606/a556a92f/attachment.html>


More information about the postgis-users mailing list