[postgis-users] pgsql2shp

Ben Madin lists at remoteinformation.com.au
Mon Sep 26 09:18:28 PDT 2011


Raffaele

Have you considered using gdal to directly bring the data into R :

using something like :

library(rgdal)
mymap <- readOGR("PG:dbname=mydbname user=mydbuser password=mydbpassword", "map")

cheers

Ben



On 26/09/2011, at 4:42 PM, Raffaele Morelli wrote:

> Hi,
> 
> I am working with R and using pgsql2shp to export shape files from pg. The shapes are created by pgsql2shp but when I try to import them in a R enviromnent I get this error
> 
> Error in res[i, ] <- Map$Shapes[[i]]$verts : replacement has length zero
> 
> I can load the shape files in Qgis but not in R. Moreover, if I load one of those files in Qgis and then export it again... this file is correctly loaded by R.
> 
> I really cant' guess what's wrong with pgsql2shp. Any ideas?
> 
> Regards
> Raffaele
> 
> -- 
> L'unica speranza di catarsi, ammesso che ne esista una, resta affidata all'istinto di ribellione, alla rivolta non isterilita in progetti, alla protesta violenta e viscerale.
> _______________________________________________
> 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/20110927/ad6de20b/attachment.html>


More information about the postgis-users mailing list