[postgis-users] shp2pgsql

Antonio Jose SIlva (Toze) ajfsilva at gmail.com
Wed Apr 16 07:53:53 PDT 2014


Hope this helps.

shp2pgsql -I -s 4326 -W "latin1" source_shp.shp schema_xxx.table_xxx 
|psql -U user -W -d database_name -h localhost
<https://bitbucket.org/jgrocha/moradas/commits/c021586584b659afda4f0c2a1e24d4d065b1498f#add-comment>

Regards,
Toze



On 16-04-2014 15:35, Rémi Cura wrote:
> Please note that
>
> _ogr2ogr is faster (5 times?)
> _ogr2ogr is less reliable (bugs!)
>
> Cheers,
> Rémi-C
>
>
> 2014-04-16 15:12 GMT+02:00 J. Gustavo Rocha <jgr at di.uminho.pt 
> <mailto:jgr at di.uminho.pt>>:
>
>     Oi Rogério,
>
>     I use ogr2ogr, which is more generic than shp2pgsql. You can
>     choose the schema (active_schema option) and the name of the table
>     (-nln option).
>
>     Something like:
>
>     ogr2ogr -f "PostgreSQL" PG:"host=xxx.di.uminho.pt
>     <http://xxx.di.uminho.pt> user=xxx dbname=arhnorte password=yyy
>     active_schema=atlas" -a_srs EPSG:3763 -nln captacoes
>     Captacoes_SILiAmb.shp
>
>     Regards,
>
>     J. Gustavo
>
>     Em 16-04-2014 13:23, Rogério escreveu:
>
>         Hi,
>
>         How I convert a shp file to sql pointing to a particular
>         schema and
>         database?
>
>         As the trivial operation of converting shp to sql is ok!
>
>         Is possible?
>
>         Thanks!
>
>         --
>         Rogério A. B. da Silva
>         Geóg. B. Sc.
>
>
>         _______________________________________________
>         postgis-users mailing list
>         postgis-users at lists.osgeo.org
>         <mailto:postgis-users at lists.osgeo.org>
>         http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
>
>
>     J. Gustavo
>     -- 
>     Jorge Gustavo Rocha
>     Departamento de Informática
>     Universidade do Minho
>     4710-057 Braga
>     Tel: +351 253604480 <tel:%2B351%20253604480>
>     Fax: +351 253604471 <tel:%2B351%20253604471>
>     Móvel: +351 910333888 <tel:%2B351%20910333888>
>     skype: nabocudnosor
>
>     "I would love to change the world, but they won't give me the
>     source code" -- Unknown Geek
>
>     _______________________________________________
>     postgis-users mailing list
>     postgis-users at lists.osgeo.org <mailto:postgis-users at lists.osgeo.org>
>     http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


-- 
António José Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140416/d49aba89/attachment.html>


More information about the postgis-users mailing list