Re: [R-sig-Geo] problems drawing a world map on a levelplot

2012-12-19 Thread Oscar Perpiñan
Hello, Perhaps the problem could be related with the CRS setting you are using. Instead of: global.map.proj - CRS('+proj=latlon +ellps=WGS84') you should try: global.map.proj - CRS('+proj=longlat +ellps=WGS84') Besides, following your code I think you are not setting the CRS of your

[R-sig-Geo] Upcoming training courses: ISRIC's Spring School 2013 and GEOSTAT Quebec City 2013

2012-12-19 Thread Tomislav Hengl
Dear R-sig-geo, Registrations for the two upcoming 5-day training courses are now open: --- Hands-on Global Soil Information Facilities, 22-26 April 2013, Wageningen University The purpose of the Spring School is to introduce

[R-sig-Geo] reading PostGIS table into sp data frame

2012-12-19 Thread Edward Vanden Berghe
I wanted to create a global map with squares in lat-lon. I have PostGIS tables to define these squares – but I haven’t been able to figure out an efficient way of reading those tables into R. The code I am using now is: crs - CRS(+proj=longlat +ellps=WGS84) s - paste(select id,

Re: [R-sig-Geo] reading PostGIS table into sp data frame

2012-12-19 Thread Raffaele Morelli
2012/12/19 Edward Vanden Berghe evber...@gmail.com I wanted to create a global map with squares in lat-lon. I have PostGIS tables to define these squares – but I haven’t been able to figure out an efficient way of reading those tables into R. The code I am using now is: crs -

Re: [R-sig-Geo] problems drawing a world map on a levelplot

2012-12-19 Thread Tom Roche
https://stat.ethz.ch/pipermail/r-sig-geo/2012-December/017014.html (rearranged) following your code I think you are not setting the CRS of your RasterBrick. True, but since it was also global data, brick(...) did the right thing. I have now set its CRS just to be sure. Instead of:

[R-sig-Geo] help for spdep

2012-12-19 Thread Saman Monfared
Dear all. I try to fit conditional auto regressive models (CAR and SAR) in package spdep. Also, I have fitted some other models like GLM, Empirical Bayes and ... My program to CAR and SAR is: esar1f1 - spautolm(IMR.m~ 0+PCFP+Sup+B.F,data =data1, listw=nb2listw(nb6, style=W), family=SAR,

[R-sig-Geo] Runtime error when opening netCDF

2012-12-19 Thread Panday, Prajjwal
Dear all, I have a similar error reported by Robert Buitenwerf here: http://grokbase.com/t/r/r-sig-geo/11a3b5ms2c/netcdf-to-raster-error I am trying to read/open a netCDF file using the ncdf package, but it keeps giving me the Microsoft Visual C++ Runtime Library error: This application has

Re: [R-sig-Geo] Runtime error when opening netCDF

2012-12-19 Thread Tom Roche
2 suggestions: Panday, Prajjwal Wed Dec 19 19:19:30 CET 2012 I am trying to read/open a netCDF file using the ncdf package, Use package=ncdf4, not package=ncdf: the latter is no longer supported, per the developer (of both packages). but it keeps giving me the Microsoft Visual C++ Runtime

Re: [R-sig-Geo] problems drawing a world map on a levelplot

2012-12-19 Thread Tom Roche
summary: How to best/easiest range-shift lon-lat data? details: https://stat.ethz.ch/pipermail/r-sig-geo/2012-December/017011.html I happened to write [the following code, omitted] yesterday, which switches the parts of wrld_simpl from 0 longitude to the east (Pacific view).

Re: [R-sig-Geo] Runtime error when opening netCDF

2012-12-19 Thread Robert J. Hijmans
Prajjwal, You can also read these files using ncdf with the the 32-bit version of R (on windows 64). Robert On Wed, Dec 19, 2012 at 10:39 AM, Tom Roche tom_ro...@pobox.com wrote: 2 suggestions: Panday, Prajjwal Wed Dec 19 19:19:30 CET 2012 I am trying to read/open a netCDF file using the

Re: [R-sig-Geo] problems drawing a world map on a levelplot

2012-12-19 Thread Matt Landis
library(raster) ?shift On Wed, Dec 19, 2012 at 1:52 PM, Tom Roche tom_ro...@pobox.com wrote: summary: How to best/easiest range-shift lon-lat data? details: https://stat.ethz.ch/pipermail/r-sig-geo/2012-December/017011.html I happened to write [the following code, omitted] yesterday,

Re: [R-sig-Geo] rasterize func: polygon values to raster cells - error msg

2012-12-19 Thread Robert J. Hijmans
Gustaf, Thanks, I think I found the bug. It happens when there is no overlap at all between polygons and raster. I think it is fixed in raster 2.0-39 (you can install from here https://r-forge.r-project.org/R/?group_id=294). Robert On Tue, Dec 18, 2012 at 10:35 AM, Gustaf Granath

Re: [R-sig-Geo] Runtime error when opening netCDF

2012-12-19 Thread ppanday
Robert Yes I was able to read the file using ncdf. However, I am not able to load the entire variable in R-32bit using get.var.ncdf command. I get the error cannot allocate vector of size 2.5 Gb. Also, would this be a problem down the road if I am working with large datasets in R-32bit? Thanks,

Re: [R-sig-Geo] Runtime error when opening netCDF

2012-12-19 Thread Robert J. Hijmans
Prajjwal, You could use 32bit R and the raster package to write the data to new files; and then continue with 64bit R. Robert On Wed, Dec 19, 2012 at 11:16 AM, ppanday ppan...@clarku.edu wrote: Robert Yes I was able to read the file using ncdf. However, I am not able to load the entire

[R-sig-Geo] Make raster from oddly organized ASCII

2012-12-19 Thread Thiago V. dos Santos
Dear all, Today I received some ASCII files that need to be converted to raster. They are organized in a rather odd way, and I cannot think of a method to read and organize the data to make a raster. Please take a look at a sample file:

Re: [R-sig-Geo] problems drawing a world map on a levelplot

2012-12-19 Thread Tom Roche
Tom Roche Wed, 19 Dec 2012 13:52:38 -0500 How to best/easiest range-shift lon-lat data? Matt Landis Wed, 19 Dec 2012 14:09:57 -0500 [raster::shift] will work, but [raster::rotate] is even easier Thanks! Now this code- global.proj -

Re: [R-sig-Geo] Runtime error when opening netCDF

2012-12-19 Thread ppanday
Robert, from what I understand, use raster package in 32-bit to open and write as a new netCDF file (using writeRaster) and then open in 64-bit using ncdf. This way I should be able to bypass size limit issue if I come across large datasets. So far, I have read the netCDF file as raster using

[R-sig-Geo] Raster crosstab output: -1 values?

2012-12-19 Thread Megan Evans
Hi everyone, I'm computing a very large crosstab analysis (using the raster package) for around 700 tiles of 25m resolution vegetation raster data. Essentially, I want to figure out how much forest is contained within each land use, land tenure and jurisdictional boundary (eight Australian

Re: [R-sig-Geo] R 3.0.0 and spatial classes

2012-12-19 Thread Francis Markham
Is there interest in something like this code for generating SpatialLines? I use a variation of this fairly regularly: SimpleSpatialLines - function(coords.1, coords.2, proj4string = CRS(as.character(NA))){ coords.1 - coordinates(coords.1) coords.2 - coordinates(coords.2) if