Re: [R-sig-Geo] rgdal release candidate 1.5-9 rev. 1000 ready for testing

2020-06-05 Thread Thiago V. dos Santos via R-sig-Geo
is an example) - which can take a little bit, depending on your machine configuration. I have some notes on how to set it up - maybe it's useful for you:  https://thiagodossantos.com/post/1-mac-science-software/   Greetings,  -- Thiago V. dos Santos ThiagoDosSantos.com

Re: [R-sig-Geo] rgdal 1.5-8 released on CRAN

2020-05-30 Thread Thiago V. dos Santos via R-sig-Geo
on of package ‘rgdal’ had non-zero exit status Kind of lost here... Do you happen to think of any other thing I could look at? Otherwise, I will just wait until the macOS binaries are released on CRAN (not really need the latest rgdal on this machine right now). Greetings,  -- Thiago V. do

Re: [R-sig-Geo] rgdal 1.5-8 released on CRAN

2020-05-29 Thread Thiago V. dos Santos via R-sig-Geo
sterious, and could not find any previous discussion about it. Are you familiar with it? Is there any other argument that I can pass to install.packages to solve it? Greetings,  -- Thiago V. dos Santos ThiagoDosSantos.com MudancasClimaticasBrasil.com On Thursday, May 28, 2020, 08:53:50 AM GMT-3

[R-sig-Geo] How to find distance between grid cell and point that lies in specified radius?

2020-02-05 Thread Thiago V. dos Santos via R-sig-Geo
in sf or even other packages that could be helpful to solve my problem? Thanks in advance,  -- Thiago V. dos Santos Postdoctoral Research Fellow Department of Climate and Space Science and Engineering University of Michigan ___ R-sig-Geo mai

[R-sig-Geo] GDAL 3.0.0 and rgdal?

2019-05-26 Thread Thiago V. dos Santos via R-sig-Geo
GDAL 3.0.0 in the next few days? I like to be up-to-date with GIS software, but I don't really need to use GDAL 3.0.0 at all. If it is going to be a little while until it is supported by rgdal, I can happily revert back to v2.4.1. Thanks, -- Thiago V. dos Santos Postdoctoral Research

Re: [R-sig-Geo] Mosaic

2019-04-10 Thread Thiago V. dos Santos
Take a look at the "mosaic" function of the raster package. Greetings, -- Thiago V. dos Santos Postdoctoral Research FellowDepartment of Climate and Space Science and EngineeringUniversity of Michigan On Thursday, April 4, 2019, 10:46:05 AM EDT, Fatih Kara wrote: Hi, I

Re: [R-sig-Geo] rgdal installation on Fedora 28

2018-06-15 Thread Thiago V. dos Santos via R-sig-Geo
, -- Thiago V. dos Santos Postdoctoral Research FellowDepartment of Climate and Space Science and EngineeringUniversity of Michigan On Friday, June 15, 2018, 3:27:44 PM EDT, Sarah Goslee wrote: Hi folks, I updated all of my linux computers to Fedora 28, and now can’t install rgdal. I can

Re: [R-sig-Geo] CRAN releases of sp, rgdal and rgeos

2018-06-11 Thread Thiago V. dos Santos via R-sig-Geo
tions. I will keep monitoring it though, and report any other issue. Cheers,  -- Thiago V. dos Santos Postdoctoral Research FellowDepartment of Climate and Space Science and EngineeringUniversity of Michigan On Sunday, June 10, 2018, 4:46:04 AM EDT, Roger Bivand wrote: Thanks for reporting,

Re: [R-sig-Geo] CRAN releases of sp, rgdal and rgeos

2018-06-09 Thread Thiago V. dos Santos via R-sig-Geo
age for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded * DONE (rgdal) The downloaded source packages are in ‘/private/var/folders/_z/01gg71zs19g816v6m2dddt8wgn/T/Rtmp5K6lt8/downloaded_packages’ ​ Is

[R-sig-Geo] Substitute raster stack values based on matrix index

2018-04-10 Thread Thiago V. dos Santos via R-sig-Geo
trix column. And so on for the remaining raster stack layers and matrix columns. Any ideas on how to do that? I know this sounds a bit cumbersome, but that's how a few ISRIC-WISE's soil datasets are organized! Greetings, -- Thiago V. dos Santos Postdoctoral Research FellowDepartment of Climat

Re: [R-sig-Geo] Is the raster package still receiving updates?

2018-02-16 Thread Thiago V. dos Santos via R-sig-Geo
Hi Edzer, Cool, thanks for sharing! You seem to be working on really neat stuff. Greetings, -- Thiago V. dos Santos Postdoctoral Research FellowDepartment of Climate and Space Science and EngineeringUniversity of Michigan On Thursday, February 15, 2018, 10:11:31 AM EST, Edzer Pebesma

Re: [R-sig-Geo] Is the raster package still receiving updates?

2018-02-15 Thread Thiago V. dos Santos via R-sig-Geo
!  -- Thiago V. dos Santos Postdoctoral Research FellowDepartment of Climate and Space Science and EngineeringUniversity of Michigan On Saturday, October 21, 2017, 5:32:59 AM EDT, Edzer Pebesma <edzer.pebe...@uni-muenster.de> wrote: The the NOTEs on CRAN and the issues raised on

[R-sig-Geo] Is the raster package still receiving updates?

2017-10-20 Thread Thiago V. dos Santos via R-sig-Geo
Dear list, I realized that the latest version of the raster package was released on CRAN over a year ago. I also noticed that Robert's participation in this list has become rather scarce. I was just wondering whether the raster package is still receiving updates? Greetings, -- Thiago V

Re: [R-sig-Geo] Multi-file raster stack from netcdf specifying levels

2017-10-19 Thread Thiago V. dos Santos via R-sig-Geo
Yes, it works! Thank you very much for the alternative! Greetings, -- Thiago V. dos Santos Postdoctoral Research FellowDepartment of Climate and Space Science and EngineeringUniversity of Michigan On Thursday, October 19, 2017 7:10 PM, Vijay Lulla <vijaylu...@gmail.com> wrote:

[R-sig-Geo] Multi-file raster stack from netcdf specifying levels

2017-10-19 Thread Thiago V. dos Santos via R-sig-Geo
.dropbox.com/s/0snz58au8ic196p/cam5clm45_ctl.clm2.h0.1980-02.nc?dl=0 https://www.dropbox.com/s/v5ps5bkyrkflki7/cam5clm45_ctl.clm2.h0.1980-03.nc?dl=0 I know netcdf files can be quite tricky to work with, but is there any way to get this file read in the right way using the raster package? Any oth

[R-sig-Geo] Optimized rasterOptions() for a (virtually) infinite RAM machine

2017-09-22 Thread Thiago V. dos Santos via R-sig-Geo
such a large amount of RAM? Thanks, -- Thiago V. dos Santos Postdoctoral Research FellowDepartment of Climate and Space Science and EngineeringUniversity of Michigan [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@r

Re: [R-sig-Geo] How to objectively subset cities by population

2017-07-27 Thread Thiago V. dos Santos via R-sig-Geo
u point me out some example that uses the overlaid grid approach? Thanks, -- Thiago V. dos Santos PhD studentLand and Atmospheric ScienceUniversity of Minnesota On Thursday, July 27, 2017, 3:00:55 AM CDT, Dr. Benedikt Gräler <b.grae...@52north.org> wrote: Dear Thiago, if you want them

Re: [R-sig-Geo] How to objectively subset cities by population

2017-07-27 Thread Thiago V. dos Santos via R-sig-Geo
looking for an objective way to filter out the smallest cities, while at the same time keeping as much information on the map as possible (i.e. not leaving too many "blank" areas).  Best, -- Thiago V. dos Santos PhD studentLand and Atmospheric ScienceUniversity of Minnesota On Thursda

[R-sig-Geo] How to objectively subset cities by population

2017-07-26 Thread Thiago V. dos Santos via R-sig-Geo
at) plot(locs) bubble(locs,"Population") #--- Thanks in advance, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota [[alternative HTML version deleted]] ___ R-s

Re: [R-sig-Geo] Adding text to rasterVis levelplot

2017-07-19 Thread Thiago V. dos Santos via R-sig-Geo
=col.titles,   ylab=row.titles) HTH, Greetings, -- Thiago V. dos Santos PhD studentLand and Atmospheric ScienceUniversity of Minnesota On Wednesday, July 19, 2017, 11:13:31 AM CDT, Mauricio Zambrano Bigiarini <mauricio.zambr...@ufrontera.cl> wrote: Dear all, I would like to add custo

Re: [R-sig-Geo] Specify color for "zero" raster values using levelplot

2017-05-19 Thread Thiago V. dos Santos via R-sig-Geo
raster("Desktop/r.annual.tif")levelplot(r.annual, cuts=14, col.regions=myPal(15), margin=F)################ Greetings, -- Thiago V. dos Santos PhD studentLand and Atmospheric ScienceUniversity of Minnesota On Thursday, May 18, 2017 3:06 AM, Melanie Bacou <m...@mbacou.co

[R-sig-Geo] Specify color for "zero" raster values using levelplot

2017-05-17 Thread Thiago V. dos Santos via R-sig-Geo
ngs = myTheme, margin=FALSE) In the example above, how can I replace the color of "zero values" with grey? Thanks, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota ___ R-sig-Geo maili

Re: [R-sig-Geo] xlsx or rJava issue

2017-03-17 Thread Thiago V. dos Santos via R-sig-Geo
- *from source* - now. It should work. Hope this helps, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Friday, March 17, 2017 4:52 AM, Dr Didier G. Leibovici <didier.leibov...@nottingham.ac.uk> wrote: Hi, I had some issues with java settings when

Re: [R-sig-Geo] Calculate anomalies on time-series rasters

2017-02-13 Thread Thiago V. dos Santos via R-sig-Geo
Thanks for the input, Michael and Loic. It looks like remote's "anomalize" might work, but the overlay approach was more convenient to use based on the shape of my data. Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Sunday

[R-sig-Geo] Calculate anomalies on time-series rasters

2017-02-11 Thread Thiago V. dos Santos via R-sig-Geo
12-31'))) In other words, I need to subtract 'jan' in the raster s.61.90.mon from every 'jan' in the raster s91.2010, and so on for every other month. I was wondering what is the best way to do that using raster (and possibly zoo) functions? Thank you very much in advance, -- Thiago V. dos

Re: [R-sig-Geo] Calculate the area of pixel in square kilometers from a raster in lat/long projection

2016-11-23 Thread Thiago V. dos Santos via R-sig-Geo
raster::area would calculate the area in square kilometers, and from there one can convert to hectare or square meters. I was wondering: how do those calculations differ from raster::area's? Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota

Re: [R-sig-Geo] modis download authentication

2016-09-08 Thread Thiago V. dos Santos via R-sig-Geo
c.nasa.gov/registration/registration-for-data-access Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Thursday, September 8, 2016 6:19 AM, Luca Candeloro <luca.candel...@gmail.com> wrote: I used succesfully the function getBinaryURL f

Re: [R-sig-Geo] How to calculate seasonal means in raster time series?

2016-08-17 Thread Thiago V. dos Santos via R-sig-Geo
Thanks Loïc, I was almost there, but I was definitely missing "as.yearmon". It works now. Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Wednesday, August 17, 2016 10:37 AM, Loïc Dutrieux <loic.dutri...@wur.nl> w

[R-sig-Geo] How to calculate seasonal means in raster time series?

2016-08-16 Thread Thiago V. dos Santos via R-sig-Geo
like this, what would be the best strategy to calculate "meteorological" seasonal means? Thanks in advance, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] Incorrect month order in zApply function

2016-08-04 Thread Thiago V. dos Santos via R-sig-Geo
Thanks for the information, Oscar. Perhaps it would be a good idea to include it in the zApply description within the raster manual?  Best, Thiago.  Sent from Yahoo Mail on Android On Thu, Aug 4, 2016 at 3:19 AM, Oscar Perpiñán Lamigueiro wrote: Hello, With the

Re: [R-sig-Geo] Incorrect month order in zApply function

2016-07-29 Thread Thiago V. dos Santos via R-sig-Geo
a solution soon. Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Friday, July 29, 2016 2:09 PM, Kay Kilpatrick <kkilpatr...@rsmas.miami.edu> wrote: Hi The various Apply functions always return the output in simple alphabetical

Re: [R-sig-Geo] How to calculate climatology in rasterbricks

2016-06-04 Thread Thiago V. dos Santos via R-sig-Geo
Thanks again Loïc and Vijay for helping to identify the issue. Hopefully Robert or any of the contributors will see this question and kindly suggest a workaround. Cheers, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Saturday, June 4, 2016 10

Re: [R-sig-Geo] How to calculate climatology in rasterbricks

2016-06-03 Thread Thiago V. dos Santos via R-sig-Geo
Basically, a portion of the raster extent was filled with 0's after using zApply. It doesn't happen when using calc. Any ideas on what can be causing this? Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Friday, June 3

Re: [R-sig-Geo] How to calculate climatology in rasterbricks

2016-06-03 Thread Thiago V. dos Santos via R-sig-Geo
, sum)) user system elapsed 0.811 0.047 0.866 Cheers, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Friday, June 3, 2016 4:25 AM, Loïc Dutrieux <loic.dutri...@wur.nl> wrote: This can also be done with zApply: library(zoo) sYM <- zApp

Re: [R-sig-Geo] How to calculate climatology in rasterbricks

2016-06-02 Thread Thiago V. dos Santos via R-sig-Geo
advantage of not breaking my workflow in R. Cheers, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Thursday, June 2, 2016 7:02 PM, Vijay Lulla <vijaylu...@gmail.com> wrote: I think the following StackOverflow question has the answer

[R-sig-Geo] How to calculate climatology in rasterbricks

2016-06-02 Thread Thiago V. dos Santos via R-sig-Geo
erature doesn't make sense. Hence, instead of integrating daily values, I need to take monthly means (e.g. mean value of all days in every month), and then calculate the climatology. What would be the best approach to achieve that using the raster package? Greetings, -- Thiago V. dos Santos PhD stude

Re: [R-sig-Geo] Run focal function on a multi-layer raster

2016-05-21 Thread Thiago V. dos Santos via R-sig-Geo
Hi Loïc, Thanks for the hint - it worked like a charm! Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Saturday, May 21, 2016 3:54 PM, Loïc Dutrieux <loic.dutri...@wur.nl> wrote: Hi Thiago, calc is not aware of neighbouring

[R-sig-Geo] Run focal function on a multi-layer raster

2016-05-21 Thread Thiago V. dos Santos via R-sig-Geo
g here? Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] Warning when stacking, masking or cropping raster objects

2016-05-16 Thread Thiago V. dos Santos via R-sig-Geo
geos)) { p <- shapefile(system.file("external/lux.shp", package="raster")) } # Crop and mask rc <- crop(r, extent(p)) rc <- mask(rc, p) I wonder if there are new instructions to crop/mask rasters that are not yet documented... Greetings, -- Thiago V. dos Santos PhD student

Re: [R-sig-Geo] Mask a map using statistical significance

2016-05-10 Thread Thiago V. dos Santos via R-sig-Geo
patial=TRUE) # Plot levelplot(r1, margin=F) + layer(sp.points(r.mask, pch=20, cex=0.3, alpha=0.8)) It looks a little better now. To control the parameters of the points (such as color, size, type etc), documentation is available in ?sp.points . Greetings, -- Thiago V. dos Santos PhD student

Re: [R-sig-Geo] Mask a map using statistical significance

2016-05-04 Thread Thiago V. dos Santos via R-sig-Geo
| | | |   | Greetings,  -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Wednesday, May 4, 2016 11:02 AM, Barry Rowlingson <b.rowling...@lancaster.ac.uk> wrote: Your example looks a bit rubbish because you have mostly isolated pixels. Let'

Re: [R-sig-Geo] Faster way to extract raster values using multiple polygons?

2016-04-08 Thread Thiago V. dos Santos via R-sig-Geo
"extract" using a mean value of all cells covering a polygon. It is a one-time processing anyway, so I should not worry too much about the waiting time. Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Wednesday, April 6, 2016 10:

[R-sig-Geo] Faster way to extract raster values using multiple polygons?

2016-04-06 Thread Thiago V. dos Santos via R-sig-Geo
to extract the data for. I have the feeling that my code is not very optimized. Has anybody ever dealt with this amount of data in this kind of raster operation? Is there any fastest way to achieve my expected result? Thanks in advance, -- Thiago V. dos Santos PhD student Land and Atmospheric Scienc

Re: [R-sig-Geo] Error running Mann-Kendall trend test on a raster stack

2016-02-29 Thread Thiago V. dos Santos
tsfun <- function(x) { if(all(is.na(x))){ c(NA, NA) } else { r.kenn <- rkt(year, x) a <- r.kenn$B b <- r.kenn$sl return(cbind(a, b)) } # I then apply the function - takes a while to run! raster.kenn <- calc(s, fun=tsfun) raster.kenn ---- Greetings, -- Thiago V. do

[R-sig-Geo] Error running Mann-Kendall trend test on a raster stack

2016-02-26 Thread Thiago V. dos Santos
, 1, 4)) r.kenn <- rkt(year, x) return(r.kenn) } # I apply the function raster.kenn <- calc(s, fun=tsfun) And the error message I get is: Error in .calcTest(x[1:5], fun, na.rm, forcefun, forceapply) : cannot use this function What am I doing wrong he

Re: [R-sig-Geo] Count frequency in raster stacks

2016-02-18 Thread Thiago V. dos Santos
Nice, Robert! Thanks for showing up and contributing to this question!  Greetings, -- Thiago V. dos Santos PhD studentLand and Atmospheric ScienceUniversity of Minnesota On Wednesday, February 17, 2016 11:02 PM, Robert J. Hijmans <r.hijm...@gmail.com> wrote: Here is a more

Re: [R-sig-Geo] Count frequency in raster stacks

2016-02-17 Thread Thiago V. dos Santos
Hi Lyndon, You were right - it worked like a charm. Thank you so much. Greetings, -- Thiago V. dos Santos PhD studentLand and Atmospheric ScienceUniversity of Minnesota On Wednesday, February 17, 2016 5:04 AM, Lyndon Estes <lyndon.es...@gmail.com> wrote: Hi Thiago,  Somethin

[R-sig-Geo] Count frequency in raster stacks

2016-02-17 Thread Thiago V. dos Santos
layer in a column of the resulting data frame? Thanks in advance, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] Calculate percent cover in a raster

2016-02-16 Thread Thiago V. dos Santos
r? Cheers, Ben > On Feb 16, 2016, at 8:51 PM, Thiago V. dos Santos <thi_vel...@yahoo.com.br> > wrote: > > Hi all, > > I have a raster at 0.5 degree resolution with monthly totals of rainfall, > which range from 50 mm to 600 mm: > > require(raster) >

[R-sig-Geo] Calculate percent cover in a raster

2016-02-16 Thread Thiago V. dos Santos
ax=600), digits=0) How can I calculate the percentage area of the raster covered with some rainfall ranges? Let's say for example 0 to 100, 101 to 200, 201 to 300, 301 to 400, 401 to 500 and finally 501 to 600 mm? Thanks in advance, -- Thiago V. dos Santos PhD student Land and Atmospheric S

[R-sig-Geo] Time index is lost after masking raster stack

2016-02-10 Thread Thiago V. dos Santos
rse it would be easy to manually assign the time index on the masked object - something like m <- setZ(m, getZ(c)) - but it would be great to have a "native" way of preserving it. Am I doing something wrong with the mask function or is this something that could be addressed in the next r

Re: [R-sig-Geo] Take mean of list of raster stacks

2015-12-05 Thread Thiago V. dos Santos
222, 601.7283, 617.0612, 603.3071, 645.2594 Each element of this list is collected at the end of a loop where I perform several operations on the raster stack. By the way, thanks also to everyone else who provided very insightful follow-ups to Loïc's answer. Greetings, -- Thiago V. dos San

[R-sig-Geo] Take mean of list of raster stacks

2015-12-02 Thread Thiago V. dos Santos
ment, 8th layer of 3rd element, 8th layer of 4th element, 8th layer of 5th element) 9th layer of result stack <- mean (9th layer of 1st element, 9th layer of 2nd element, 9th layer of 3rd element, 9th layer of 4th element, 9th layer of 5th element) Any hints on how I can accomplish that? Gree

Re: [R-sig-Geo] How to calculate decadal average and percent change in raster stacks?

2015-12-01 Thread Thiago V. dos Santos
Thanks you all for the responses. Each of them provided very good tips on how to address my problem. Loïc, answering your question: the percent change would be within the 9-year period of each decade. Thanks for your response, it was really concise. Greetings, -- Thiago V. dos Santos PhD

Re: [R-sig-Geo] How to calculate decadal average and percent change in raster stacks?

2015-12-01 Thread Thiago V. dos Santos
Oh, I should have said "10-year period", and not "9-year period". This is because the first year of the decade should be accounted for, i.e. 2010 (including) to 2019. Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On

[R-sig-Geo] How to calculate decadal average and percent change in raster stacks?

2015-12-01 Thread Thiago V. dos Santos
, 2030-2039 and so on until 2090-2099. I guess the real issue here is how to "split" a raster stack in decades. Any ideas? Thanks, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota ___ R-sig-Geo maili

Re: [R-sig-Geo] How to perform cross-year date operations on rasters?

2015-11-05 Thread Thiago V. dos Santos
tiguous period: oct-nov-dec-jan, and not when at least one month is missing (for example in the first and last years of the series). Still possible to achieve this? Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Thursday, November 5, 201

Re: [R-sig-Geo] Monthly loop in raster stack with daily data

2015-10-29 Thread Thiago V. dos Santos
Thanks a lot Loïc. I could not imagine that it would be that easy! Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Thursday, October 29, 2015 3:44 AM, Loïc Dutrieux <loic.dutri...@wur.nl> wrote: Hi Thiago, I think zApply should g

[R-sig-Geo] Programmatically convert raster stack in data frame based on polygon extraction

2015-10-29 Thread Thiago V. dos Santos
t;cut" refers to the temperature thresholds defined in the functions above. Each cut should come from the equivalent raster stack: days.above.10, days.above.15 and so on. I much appreciate any input. Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of

Re: [R-sig-Geo] Programmatically convert raster stack in data frame based on polygon extraction

2015-10-29 Thread Thiago V. dos Santos
Thanks a lot again, Loïc. It worked exactly as I was planned. Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Thursday, October 29, 2015 4:15 PM, Loïc Dutrieux <loic.dutri...@wur.nl> wrote: Hi Thiago, extract() and some dat

[R-sig-Geo] Monthly loop in raster stack with daily data

2015-10-29 Thread Thiago V. dos Santos
ld have 24 layers (12 months x 2 years) with the count of days. Is this analysis possible to be done on a raster or should I convert the data to a different format? Thanks a lot, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota __

Re: [R-sig-Geo] Convert rasters to data frame with time stamp

2015-10-17 Thread Thiago V. dos Santos
gument 'x' in selecting a method for function 't': Error in doQmapQUANT.matrix(x, fobj, ...) : 'ncol(x)' and 'nrow(fobj$par$modq)' should be eaqual Any way to circumvent this? Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Sat

[R-sig-Geo] Convert rasters to data frame with time stamp

2015-10-16 Thread Thiago V. dos Santos
, cell2, cell3, ..., cell3600... date408, cell1, cell2, cell3, ..., cell3600 then apply the fit function and finally convert the data back to a raster. Any ideas on how to efficiently convert rasters to data frames containing their time stamp and then back to a raster again?? Any hint is much appr

Re: [R-sig-Geo] Conditional operations and rasters

2015-09-22 Thread Thiago V. dos Santos
Thank you all for the suggestions, Robert, Andrew and Vijay. I am still examining all of them to see which one works best for me. Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota On Saturday, September 19, 2015 8:15 PM, Robert J. Hijmans

[R-sig-Geo] Conditional operations and rasters

2015-09-15 Thread Thiago V. dos Santos
< 1000) { emiss_0 <- 0.95 + (0.01 * lai) emiss_nb <- 0.97 + (0.0033 * lai) } else if (lai >= 1000) { emiss_0 <- 0.95 emiss_nb <- 0.98 } Error in if (lai < 3) { : argument is not interpretable as logical What would be the right way to do that? G

Re: [R-sig-Geo] rgdal 1.0-7

2015-09-08 Thread Thiago V. dos Santos
Hi Roger, Thanks for the updated rgdal and for all the information. After upgrading rgdal earlier today I got the warning message for nearly all raster/sp/rgdal operations in R. On a Mac running Yosemite, this is the path I had to copy the proj_def.dat file to (or where I had to create a new

[R-sig-Geo] Detect and summarize changes in categorical raster

2015-07-09 Thread Thiago V. dos Santos
that by myself? Thanks in advance, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm Phone: (612) 323 9898 ___ R-sig-Geo mailing list R-sig-Geo@r

Re: [R-sig-Geo] How to “smooth” a raster map

2015-06-29 Thread Thiago V. dos Santos
, Vol.22 Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm Phone: (612) 323 9898 On Monday, June 29, 2015 12:49 AM, Roger Bivand roger.biv...@nhh.no wrote: Julian

[R-sig-Geo] How to “smooth” a raster map

2015-06-28 Thread Thiago V. dos Santos
levelplot(b[[2]], margin = FALSE, main = Rice yield in tons/ha, par.settings = mycols) + layer(sp.lines(mapaSHP, lwd=0.8, col='darkgray')) # return to your old dir setwd(old) -- Thanks in advance for any input, -- Thiago V

Re: [R-sig-Geo] writeRaster does not preserve names when writing to NetCDF

2015-06-03 Thread Thiago V. dos Santos
(as Mark Payne suggested) which would use ncdf4's ncatt_put as a wrapper (as per from Dominik's suggestion ). Would this be feasible to incorporate in the writeRaster function? I am quite sure it can be done with ncdf4 but it would involve perhaps a dozen lines of code.   Greetings, -- Thiago V

Re: [R-sig-Geo] Faster way to get raster average?

2015-05-09 Thread Thiago V. dos Santos
saved in the operation will probably make a huge difference in the final script looping through thousands of files. Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm

Re: [R-sig-Geo] Faster way to get raster average?

2015-05-05 Thread Thiago V. dos Santos
Oh, I forgot to mention that I work on a quad-core Mac with 12GB. So, if multi-core can potentially accelerate cellStats, or whatever function is faster to get a raster average, I would be glad to see some examples on how to implement it. Greetings, -- Thiago V. dos Santos PhD student Land

Re: [R-sig-Geo] How to apply this function on each raster stack layer?

2015-02-06 Thread Thiago V. dos Santos
Frede and Loic, Thanks a lot for your feedback. I just realized that a simple multiplication  s1 - (s * mult) + add not only works but is much faster than the function I wrote. Raster is a really well-implemented package. Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science

[R-sig-Geo] Applying a simple math on a big stack takes a long time. How to improve it?

2015-02-06 Thread Thiago V. dos Santos
is not a multiple of replacement length I wonder if there is a way to optimise that script? And why calculation is so slow in my case? What is causing the warning message and how to fix it? Many thanks, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http

Re: [R-sig-Geo] Applying a simple math on a big stack takes a long time. How to improve it?

2015-02-06 Thread Thiago V. dos Santos
the calculation since it is still VERY slow. Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm Phone: (612) 323 9898 On Friday, February 6, 2015 4:55 PM, Baldwin, Jim -FS

[R-sig-Geo] How to apply this function on each raster stack layer?

2015-02-05 Thread Thiago V. dos Santos
] This is my poor attempt, which obviously does not work: cal.fun - function(x) { x - (x * mult) + add } s.cal - calc(s, cal.fun, progress='text') Any ideas on how to do that? Many thanks, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http

Re: [R-sig-Geo] About rgdal package

2014-11-19 Thread Thiago V. dos Santos
='--with-gdal-config=/Library/Frameworks/GDAL.framework/Programs/gdal-config --with-proj-include=/Library/Frameworks/PROJ.framework/unix/include --with-proj-lib=/Library/Frameworks/PROJ.framework/unix/lib In case you need it, the rgeos package can be installed conversely.  Hope it helps, -- Thiago V. dos

[R-sig-Geo] Fill levelplot with pattern instead of color

2014-09-30 Thread Thiago V. dos Santos
for any direction. Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm Phone: (612) 323 9898 [[alternative HTML version deleted

Re: [R-sig-Geo] Count values greater than in rasterbrick layers

2014-07-21 Thread Thiago V. dos Santos
Hi Joseph, Thanks a lot for your tip - it completely solved my problem.   Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm Phone: (612) 323 9898 On Wednesday

[R-sig-Geo] Count values greater than in rasterbrick layers

2014-07-16 Thread Thiago V. dos Santos
) # count wet days wet.days - calc(b, fun=function(x,na.rm) sum(x[x1]))   Many thanks in advance, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm Phone: (612) 323 9898

Re: [R-sig-Geo] gdalUtils 0.2.0 now on CRAN

2014-01-15 Thread Thiago V. dos Santos
to perform some tests with the package, and this is why I ask you: do you think that gdalUtils functions are as fast as the GDAL binaries? Many thanks in advance. Congratulations once again for the very useful package!   Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science

[R-sig-Geo] Plot area avarage across time for several variables

2013-08-08 Thread Thiago V. dos Santos
-01     20 gdd 1 2007-01-01     30 gdd 1 2008-01-01     40 gdd 1 2005-01-01     10 lai 1 2006-01-01     20 lai 1 2007-01-01     30 lai 1 2008-01-01     40 lai Please help me: how, in this script, can I include the vars in the data.frame as repetitions? Thanks in advance, -- Thiago V. dos Santos

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

2013-07-25 Thread Thiago V. dos Santos
An quick update to this issue, in case anyone ever needs.   With help from Robert, the following code can read certain ascii maps (like the ones from the GGHYDRO project  http://people.trentu.ca/~gcogley/glaciology/glglgghy.htm) and convert them to raster. Greetings, -- Thiago V. dos Santos PhD

Re: [R-sig-Geo] Read .dat file as raster

2013-07-22 Thread Thiago V. dos Santos
around.   Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm Phone: (612) 323 9898 From: Robert J. Hijmans r.hijm...@gmail.com Cc

[R-sig-Geo] Issue when producing bubble plot (sp)

2013-05-27 Thread Thiago V. dos Santos
) why does the north arrow insist in not appearing? Thanks in advance for any suggestion. Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm Phone: (612) 323 9898

Re: [R-sig-Geo] Issue when producing bubble plot (sp)

2013-05-27 Thread Thiago V. dos Santos
Thanks Edzer, that worked. Nothing better than receiving directions from the author. As usual, the real issue was the user.   Best, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos

[R-sig-Geo] Classify 106 netcdf's based on their spooled range

2013-05-27 Thread Thiago V. dos Santos
, by = classes) brk = seq(min, max, by = classes) rc - cut(r, breaks=brk) # Then, write each layer as a netcdf using ncdf4 - in progress - Does anyone have another one/a better ideia to do this? Thanks in advance,   Greetings, -- Thiago V. dos Santos PhD

Re: [R-sig-Geo] Raster comparrison

2013-05-14 Thread Thiago V. dos Santos
/data_processing/grads/grads_statsig.php. Although intented to a different software, the rationale is pretty straightforward and can be easily implemented on R. Hope this helps, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http://www.laas.umn.edu

Re: [R-sig-Geo] rasterVis - Plot subset of data

2013-05-11 Thread Thiago V. dos Santos
Oscar, That worked!   Thanks, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm Phone: (612) 323 9898 From: Oscar Perpiñan oscar.perpi

Re: [R-sig-Geo] problem with writeRaster and GeoTIFF format

2013-05-10 Thread Thiago V. dos Santos
Hi, I had the same issue in the past and I managed to solve it by: a) removing rgdal b) reinstalling gdal and libtiff libraries c) reinstalling rgdal Hope it helps.   Greetings, -- Thiago V. dos Santos PhD student Land and Atmospheric Science University of Minnesota http://www.laas.umn.edu

[R-sig-Geo] rasterVis - Plot subset of data

2013-05-04 Thread Thiago V. dos Santos
) rat - levels(r)[[1]] rat$landcover - c('Pine', 'Oak', 'Meadow') levels(r) - rat levelplot(r, col.regions=c('palegreen', 'midnightblue', 'indianred1')) How could I plot only, say, latitude -50 to 50 and longitude -100 to 100? Thanks in advance, -- Thiago V. dos Santos PhD student Land

Re: [R-sig-Geo] Increasing font size in a levelplot graphic

2013-03-26 Thread Thiago V. dos Santos
Oscar and Pascal, Thank you for the suggestions. Both of them solved my problem. Best, Thiago. - Original Message - From: Oscar Perpiñán Lamigueiro oscar.perpi...@gmail.com To: Pascal Oettli kri...@ymail.com Cc: Thiago V. dos Santos thi_vel...@yahoo.com.br; R-SIG list r-sig-geo@r

Re: [R-sig-Geo] R Package for Climatology particular for netCDF file

2013-03-26 Thread Thiago V. dos Santos
Yang, The closer of what you are asking for that I know is the RNCEP package, which deals with reanalysis data. Package clim.pact used to provide some useful methods (like EOF and PCA), but for some reason it was descontinued. However, all the packages you mentioned provide a way to take

[R-sig-Geo] Increasing font size in a levelplot graphic

2013-03-25 Thread Thiago V. dos Santos
Dear R-SIGgers, This question is related to the rasterVis package. Please reproduce the following plot: library(raster) library(rasterVis) r1=r2=r3=raster(nr=100, nc=100) r1[]-r2[]-r3[]-1:ncell(r1) s-stack(r1,r2,r3) levelplot(s) On my Mac, I think the text size is too small. Increasing

Re: [R-sig-Geo] Rasterbrick to netCDF

2013-01-24 Thread Thiago V. dos Santos
Hi Prajjwal, I think the best approach in your case is to create a new, updated netcd file instead of adding a dimension to an existing file. By using the ncdf4 package to create the file, you have lots of options to customize names and descriptions of variables and dimensions. At the end of

Re: [R-sig-Geo] See coordinates vector in raster

2013-01-23 Thread Thiago V. dos Santos
Michael and Barry, Thank you for the tips. Both worked like a charm! Regards, Thiago. - Original Message - From: Barry Rowlingson b.rowling...@lancaster.ac.uk To: Michael Sumner mdsum...@gmail.com Cc: Thiago V. dos Santos thi_vel...@yahoo.com.br; R-SIG list r-sig-geo@r-project.org

[R-sig-Geo] See coordinates vector in raster

2013-01-22 Thread Thiago V. dos Santos
Dear all, Is there any way to access the vector containing the longitude and latitude coordinates of a raster object? For example: library(raster) r1 - raster(nrows=800, ncols=820, xmn=0, xmx=10) # I am looking for something like this: r1$lon r2$lat Thanks in advance, Thiago.

[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] Problem with RNetCDF and ubuntu

2012-12-04 Thread Thiago V. dos Santos
  Sara,   Why don't you try packages ncdf, ncdf4, or even the famous raster? From: sara martino saramart...@yahoo.com To: r-sig-geo@r-project.org r-sig-geo@r-project.org Sent: Tuesday, December 4, 2012 5:12 PM Subject: Re: [R-sig-Geo] Problem with RNetCDF and