<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Raffaele<div><br></div><div>Have you considered using gdal to directly bring the data into R :<div><br></div><div>using something like :</div><div><br></div><div><div>library(rgdal)</div><div>mymap <- readOGR("PG:dbname=mydbname user=mydbuser password=mydbpassword", "map")</div><div><br></div><div>cheers</div><div><br></div><div>Ben</div><div><br></div><div><br></div><div><br></div><div><div>On 26/09/2011, at 4:42 PM, Raffaele Morelli wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<br><br>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<br clear="all"><br>Error in res[i, ] <- Map$Shapes[[i]]$verts : replacement has length zero<br>
<br>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.<br><br>I really cant' guess what's wrong with pgsql2shp. Any ideas?<br>
<br>Regards<br>Raffaele<br><br>-- <br><i><span></span><span>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.</span></i><br>
_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>http://postgis.refractions.net/mailman/listinfo/postgis-users<br></blockquote></div><br></div></div></body></html>