[postgis-users] loading only geometries of shp files into PostGIS
Paul Ramsey
pramsey at opengeo.org
Thu Jun 7 09:39:41 PDT 2012
There's no reason technically you can't do it. You will need to hack the
loader to ignore the fact that the other files are missing, but shp file
alone does contain all the information you need.
P.
On Wed, Jun 6, 2012 at 10:23 PM, karsten <karsten at terragis.net> wrote:
> **
> 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
> 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<http://www.pctools.com/?cclick=EmailFooterClean_51>
> =======
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120607/4766b757/attachment.html>
More information about the postgis-users
mailing list