[R-sig-Geo] too many raster files open?

2014-07-01 Thread Dominik Schneider
Hi - I'm trying to process a large number of raster files and it is causing an error after 243 files. Below is a simplified code snippet and the error message. I tried doing closeAllConnections() but it didn't help so I'm not sure what else needs to be done. There should really only ever be 1

Re: [R-sig-Geo] Conversion geographical coodinate in UTM

2014-07-01 Thread Gilles Benjamin Leduc
Dear R FAQ Team :p So I have been able to use the readOGR function, could anyone transfer to its maintainer a request to add writeOGR in the see also section of help? Anyway, after having done that for my shapefile, I tried to deal with the points I had to plot on, here is what I tried:

[R-sig-Geo] maps showing post-Soviet states?

2014-07-01 Thread Spencer Graves
What would you suggest I do to create a world map highlighting Taiwan and post-Soviet states like Azerbaijan, Uzbekistan, Tajikistan, Turkmenistan, and Croatia? The region argument in maps::map won't recognize any of these, and my literature search identified hundreds of packages

Re: [R-sig-Geo] maps showing post-Soviet states?

2014-07-01 Thread Greg Snow
The combination of the sp and maptools packages will read in shapefiles and plot them, you just need to find a shapefile that has the countries that you are interested in (google for shape files, there are a lot of free ones available, I have not checked for the countries you specified, but I

Re: [R-sig-Geo] maps showing post-Soviet states?

2014-07-01 Thread Thomas Adams
Spencer, Maybe I'm not sure what you're asking but here http://www.gadm.org/version1 are current shapefiles by country. The highlighting (selection) canals be done in GRASS GIS, QGIS, GMT Tom On Tue, Jul 1, 2014 at 2:29 PM, Spencer Graves spencer.gra...@prodsyse.com wrote: What would

Re: [R-sig-Geo] maps showing post-Soviet states?

2014-07-01 Thread Michael Sumner
On Wed, Jul 2, 2014 at 7:56 AM, Thomas Adams tea...@gmail.com wrote: Spencer, Maybe I'm not sure what you're asking but here http://www.gadm.org/version1 are current shapefiles by country. The highlighting (selection) canals be done in GRASS GIS, QGIS, GMT raster::getData can read

Re: [R-sig-Geo] maps showing post-Soviet states?

2014-07-01 Thread Michael Sumner
An example: library(raster) ct - getData(countries) plot(subset(ct, NAME %in% c(Azerbaijan, Uzbekistan, Tajikistan, Turkmenistan, Croatia)) On Wed, Jul 2, 2014 at 9:09 AM, Michael Sumner mdsum...@gmail.com wrote: On Wed, Jul 2, 2014 at 7:56 AM, Thomas Adams tea...@gmail.com wrote:

Re: [R-sig-Geo] maps showing post-Soviet states?

2014-07-01 Thread Spencer Graves
Thanks to Gilles Leduc, Greg Snow, Thomas Adams, Barry Rowlingson, and Michael Sumner for their replies. For the archives, in case someone else might find this in the archives, I will record here two solutions to my problem. 1. Michael's reply was the simplest, especially since

[R-sig-Geo] line color in plot(SpatialPolygonsDataFrame) [was: maps showing post-Soviet states?]

2014-07-01 Thread Spencer Graves
How can one control the color of lines with plot(SpatialPolygonsDataFrame)? Adding lwd=9 to the arguments for plot produces black borders so wide most of the red disappears: map(xlim=c(10, 90), ylim=c(30, 60)) library(raster) ct - getData(countries) plot(subset(ct, NAME %in%

Re: [R-sig-Geo] line color in plot(SpatialPolygonsDataFrame) [was: maps showing post-Soviet states?]

2014-07-01 Thread Michael Sumner
Here's one way, cast to Spatial*Lines and control the object colours directly: ct1 - subset(ct, NAME %in% c(Azerbaijan, Uzbekistan, Tajikistan, Turkmenistan, Croatia)) plot(as(ct1, SpatialLinesDataFrame), col=seq_len(nrow(ct1)), lwd=3) You can get the