Dear all, I recently switched to Ubuntu and have also just started to explore R as GIS.I am loading some packages in R to plot a shapefile (rgdal, shapefiles, maptools), and I have stumbled upon rgeos and gpclib. I get the message that I need geos 3.2.2 or newer, with the tip about gpclibPermit(). It turns out I do not have a license for gpclib. My first question is if there is a way around this, or do I have to open R from Windows to get newer versions of geos? The second question: I got four xyp files compiling information from many bln polygons originally made in Surfer, but only one of these xyp files has four variables (I assume the fourth is the sequence number). What kind of object should these xyp files be, and what function should I use to plot them? And the third question: I saved the only xyp file with four columns as csv, imported it into R, added column names so it could pass as a PolySet and plotted it with the package PBSmapping. I get several diagonal lines across the map. Are they due to the fact that the sequence skips a number at the start/end of each polygon? Or is it because the polygons are not properly closed? Thanks for your help! Elena
rgeos, gpclib and polygon plotting
2 messages · Elena, Roger Bivand
On Fri, 24 Feb 2012, Elena wrote:
Dear all, I recently switched to Ubuntu and have also just started to explore R as GIS.I am loading some packages in R to plot a shapefile (rgdal, shapefiles, maptools), and I have stumbled upon rgeos and gpclib. I get the message that I need geos 3.2.2 or newer, with the tip about gpclibPermit(). It turns out I do not have a license for gpclib. My first question is if there is a way around this, or do I have to open R from Windows to get newer versions of geos?
At least GEOS 3.2.2 binaries are available as ubuntugis-unstable. In fact, building from source is simple, just download the source, and follow standard procedures. Treat this as an opportunity to extend your skills, if you've never consciously installed software from source before! Once GEOS is installed, install rgeos from source.
The second question: I got four xyp files compiling information from many bln polygons originally made in Surfer, but only one of these xyp files has four variables (I assume the fourth is the sequence number). What kind of object should these xyp files be, and what function should I use to plot them?
Please ask different questions in separate threads. Roger
And the third question: I saved the only xyp file with four columns as csv, imported it into R, added column names so it could pass as a PolySet and plotted it with the package PBSmapping. I get several diagonal lines across the map. Are they due to the fact that the sequence skips a number at the start/end of each polygon? Or is it because the polygons are not properly closed? Thanks for your help! Elena
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand Department of Economics, NHH Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: Roger.Bivand at nhh.no