[R-sig-Geo] Trouble with universal kriging

2013-06-20 Thread Dominik Schneider
Hi, I am trying to follow the examples in Bivand et al 'Applied Spatial Data Analysis' and the examples at http://casoilresource.lawr.ucdavis.edu/drupal/node/442 but I am frustrated. I finally managed an ordinary kriging example to work but with little understanding of why/when it should work. I

[R-sig-Geo] optimize idw power

2013-08-12 Thread Dominik Schneider
Hi, I'd like to optimize the IDW power, similar to what ArcGIS does. I found this old thread http://www.mail-archive.com/r-sig-geo@stat.math.ethz.ch/msg04011.html but was hoping someone could help adapt the solution. I am using

Re: [R-sig-Geo] optimize idw power

2013-08-13 Thread Dominik Schneider
implemented that are not brute force? Dominik Schneider o 303.735.6296 | c 518.956.3978 On Tue, Aug 13, 2013 at 7:38 AM, Jon Olav Skoien jon.sko...@jrc.ec.europa.eu wrote: Dominik, The brute force approach shown in the link from Tom has in the mean time been implemented in the intamap package

Re: [R-sig-Geo] optimize idw power

2013-08-18 Thread Dominik Schneider
are quite different when plotted (idw surface vs kr surface) but I just haven't seen a big difference compared with ground measurements. I will work on this some more and try idw/kr with a 100km radius and if it speeds up enough I'll give the optimization a try Dominik Schneider o 303.735.6296 | c

[R-sig-Geo] calculate moving window MAE for point and raster data.

2013-08-26 Thread Dominik Schneider
I would like some help with programming moving window comparison of spatial point data vs raster data. To account for georeferencing errors in the remote sensing data r I'd like to calculate error statistics such as MAE in 250 m increments given a 500m product. So in the example below, a 1km x 1km

[R-sig-Geo] coordinate system in ncdf4

2013-08-30 Thread Dominik Schneider
Is it possible to specify the coordinate system when creating a netcdf file with the ncdf4 package? I have not been able to see anything in the documentation. Thanks [[alternative HTML version deleted]] ___ R-sig-Geo mailing list

Re: [R-sig-Geo] coordinate system in ncdf4

2013-09-03 Thread Dominik Schneider
Thanks for the tip about GDAL. I was checking the outfile with gdalinfo 1.9 and couldn't figure out why it wouldn't show the coordinate system. I'll check out raster as an alternative to ncdf4. Dominik Schneider o 303.735.6296 | c 518.956.3978 On Fri, Aug 30, 2013 at 10:54 PM, Michael Sumner

[R-sig-Geo] cressman analysis

2014-06-13 Thread Dominik Schneider
Are there any implementations in R of the Cressman interpolation? https://nsidc.org/data/docs/daac/nsidc0033_arctic_water_vapor/cressman_equations.html I haven't found anything via rseek or google. Thanks Dominik [[alternative HTML version deleted]]

[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] extracting raster data with point and polygons

2014-07-22 Thread Dominik Schneider
,obs) but then zonal() threw an error. Thanks! Dominik Dominik Schneider o 303.735.6296 | c 518.956.3978 On Tue, Jul 22, 2014 at 5:17 AM, Oscar Perpiñan oscar.perpi...@upm.es wrote: Hello, If I understood you right, I think you can solve it using `zonal` and `mask`. This is my proposal

[R-sig-Geo] stack many files without loading into memory

2015-02-04 Thread Dominik Schneider
Hi - I have some data on a server but would like to bring them local in a somewhat compressed format that is still easy to access. /Volumes/hD/2012 - 100 geotiffs ~/project/data/ - store those geotiffs here without needing server access. untested, I think I could do something like: s=stack()

Re: [R-sig-Geo] stack many files without loading into memory

2015-02-04 Thread Dominik Schneider
Wouldn't that keep the link to the server on which they are stored now? Dominik Schneider o 303.735.6296 | c 518.956.3978 On Wed, Feb 4, 2015 at 12:50 PM, Michael Sumner mdsum...@gmail.com wrote: Why not stack(fn) ? On Thu, 5 Feb 2015 06:41 Dominik Schneider dominik.schnei...@colorado.edu

Re: [R-sig-Geo] inconsistent as.data.frame(SpatialPointsDF)

2015-03-20 Thread Dominik Schneider
CHALENDER 35.26247 -112.0623 Elevation_ft Elevation_m 1 73002225 2 77002347 3 91252781 4 79902435 5 92002804 6 71002164 Dominik Schneider o 303.735.6296 | c 518.956.3978

[R-sig-Geo] imprecise location extraction

2015-06-25 Thread Dominik Schneider
Hi, I'm working on interpolating spatial point data to a grid and as I was troubleshooting I found that the gridded locations I am predicting to are not what I expected. In particularly, when I extracted the locations from the raster grid to get the cell coordinates in which the locations lay, the

Re: [R-sig-Geo] Plotting box plots boxplots

2015-06-10 Thread Dominik Schneider
Josh - ggplot doesn't work with the spatial classes of data. try doing orf.df=as.data.frame(orf) first and then plotting orf.df. Also, you have at least one typo - it should be geom_poin*t* I always get confused with the qplot syntax so not sure if the rest if right. I think ggplot()+ is much

Re: [R-sig-Geo] georeferencing image from scratch

2015-08-17 Thread Dominik Schneider
Marcelo, did you try alignExtent() in the raster package? Dominik Schneider o 303.735.6296 | c 518.956.3978 On Mon, Aug 17, 2015 at 8:34 AM, Loïc Dutrieux loic.dutri...@wur.nl wrote: Hi Marcelo, I don't see anything in raster or rgdal that would do that directly. However, this can be done

Re: [R-sig-Geo] Help needed with extraction of raster statistics by polygons

2015-08-25 Thread Dominik Schneider
regular indexing to find the mean for the raster cells covered by each polygon. This should be much faster. Dominik Dominik Schneider o 303.735.6296 | c 518.956.3978 On Tue, Aug 25, 2015 at 9:26 AM, Denys Dukhovnov via R-sig-Geo r-sig-geo@r-project.org wrote: Hello all! I need to spatially

Re: [R-sig-Geo] Raster multi-band time series analysis

2015-10-26 Thread Dominik Schneider
Check out the spatial.tools package for parallel processing with the raster package. On Mon, Oct 26, 2015 at 7:22 AM, Loïc Dutrieux wrote: > Hi Victor, > > I don't have much experience with beginCluster; however, I have written a > parallel version of raster::calc a

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

2015-11-05 Thread Dominik Schneider
Could you use water years for your dates? so Oct-Sep is the same year and then subset based on month and water year. On Thu, Nov 5, 2015 at 11:17 AM, Thiago V. dos Santos < thi_vel...@yahoo.com.br> wrote: > Thanks for your input Michael. With slight modifications on your > suggestion, I almost

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

2015-10-16 Thread Dominik Schneider
I don't think I completely understand but can you use tidyr::gather to get what you want? if you have multiple datasets you could join them all together at the end. library(raster) library(tidyr) #Create a rasterStack similar to my data - same dimensions and layer names r <- raster(ncol=60,

Re: [R-sig-Geo] how to read in R a big raster of about 6 Gb

2015-10-15 Thread Dominik Schneider
You can use the raster package, which will leave the values on disk if they are too big for memory. Use the function raster() to read the DEM, then use readOGR() to read the polygon shape file. You can then use extract() to get statistics on your DEM. I'm guessing it'll take a while to extract

Re: [R-sig-Geo] how to read in R a big raster of about 6 Gb

2015-10-16 Thread Dominik Schneider
s and I assume also for polygons, scans the > file line by line but this needs to be done tile by tile to avoid > repetitive and wasteful I/O. > > Cheers, Mike > > > On Friday, October 16, 2015, Dominik Schneider < > dominik.schnei...@colorado.edu> wrote: > >&

Re: [R-sig-Geo] how to read in R a big raster of about 6 Gb

2015-10-15 Thread Dominik Schneider
ields; > I need finally to associate the DEM values with the levels represented by > one of these fields: > do you think is a good idea eliminating the not necessary fields? > > max > > > > Il giorno Thu, 15/10/2015 alle 09.26 -0600, Dominik Schneider ha > scritto: > > Y

Re: [R-sig-Geo] adapting spatial points and wrld_smpl to a reference system implicit in a .nc file

2016-02-23 Thread Dominik Schneider
This looks like WRF data. I just dealt with this. The data is on a sphere as opposed to WGS84 so you need +ellps=sphere +a=637 +b=637 +units=m +proj=lcc which is usually what wrf is run with. The tricky part is: +lat_1=25.0 +lat_2=45.0 +lat_0=38.0

[R-sig-Geo] different projection transformation R and gdal commandline

2016-02-15 Thread Dominik Schneider
Hi, I'm struggling to use a custom projection. I am seeing differences with someone using python proj4 bindings and when I compared my R results with my commandline results I got even more confused. the coordinate transformation is different for the two different methods. could someone explain to

Re: [R-sig-Geo] different projection transformation R and gdal commandline

2016-02-15 Thread Dominik Schneider
[33] boot_1.3-17 intervals_0.15.1 nnet_7.3-11 nlme_3.1-122 Dominik Schneider c 518.956.3978 On Mon, Feb 15, 2016 at 1:37 PM, Dominik Schneider < dominik.schnei...@colorado.edu> wrote: > Hi, > I'm struggling to use a custom projection. I am seeing differences with > someone

Re: [R-sig-Geo] different projection transformation R and gdal commandline

2016-02-16 Thread Dominik Schneider
gt; LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] gdalUtils_2.0.1.7 raster_2.5-2 sp_1.2-2 > > loaded via a namespace (and not attached): > [1] rgdal_1.1-3

Re: [R-sig-Geo] different projection transformation R and gdal commandline

2016-02-16 Thread Dominik Schneider
' coordinates(spTransform(box,CRS(pstring))) ## x y ##[1,] -1306471.3 -629424.0 ##[2,] -1122174.4 531025.6 ##[3,] -563451.2 -713442.3 ##[4,] -483968.2 458859.3 On Tue, Feb 16, 2016 at 9:27 AM, Dominik Schneider < dominik.schnei...@colorado.edu> wrote: > Hi Chris,

[R-sig-Geo] calculate "regional" slope

2016-02-18 Thread Dominik Schneider
I need to calculate slope at different scales. In the case below, r is a 0.5deg resolution raster and I want the slope for 1.5 deg centered on each of those 0.5 deg pixels. I'm trying to estimate which side of mountain range each pixel is on. So the resulting raster would have the same number of

Re: [R-sig-Geo] calculate "regional" slope

2016-02-19 Thread Dominik Schneider
in(r, opt='slope', unit='degrees', neighbors=8) >> Ah, but it appears you want up sampling to 1.5 degrees rather than 0.5 >> deg. >> so maybe spatial.tools::projectRaster_rigorous then raster:terrain. >> >> I'm inclined to end that last so maybe with a question mark. Sorr

[R-sig-Geo] raster::zonal with more than 1 zonal layer

2016-03-01 Thread Dominik Schneider
I'd like to summarise a raster using elevation and watershed. I was originally using extract() with a shape file and then each elevation band within each polygon but it's very slow. zonal() is much faster and I can rasterize my polygons to use it. But how do I robustly combine multiple

Re: [R-sig-Geo] raster::zonal with more than 1 zonal layer

2016-03-01 Thread Dominik Schneider
00+ws->nd > z1->z3 > z3[]<-nd > sort(unique(nd)) > > # do zonal > zonal(dat,z3, 'mean') > > > Cheers > Herry > > -Original Message- > From: R-sig-Geo [mailto:r-sig-geo-boun...@r-project.org] On Behalf Of > Dominik Schneider > Sent: We

Re: [R-sig-Geo] raster::zonal with more than 1 zonal layer

2016-03-04 Thread Dominik Schneider
Thanks Loïc On Mar 3, 2016 11:15 AM, "Loïc Dutrieux" <loic.dutri...@wur.nl> wrote: > > > On 03/03/2016 05:19 PM, Dominik Schneider wrote: > >> That looks great, thanks! >> to close the question: >> b=as.data.frame(zonal(dat, zoneLayer, 'mean') ) &

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

2016-07-29 Thread Dominik Schneider
Sorry I'm not sure how to fix this, but it looks like the months are in alphanumeric order, indicating they are being treated as a factor. Might be worth a bug report? On Thursday, July 28, 2016, Thiago V. dos Santos via R-sig-Geo < r-sig-geo@r-project.org> wrote: > Dear all, > > I am using

Re: [R-sig-Geo] Set up raster data in WRF Mercator projection

2016-08-03 Thread Dominik Schneider
did you see this thread? might help: http://r-sig-geo.2731867.n2.nabble.com/adapting-spatial-points-and-wrld-smpl-to-a-reference-system-implicit-in-a-nc-file-tt7589570.html >From my notes, the mercator WRF projection would look like this: Projection_String = ('PROJCS["Sphere_Mercator",'

Re: [R-sig-Geo] Set up raster data in WRF Mercator projection

2016-08-03 Thread Dominik Schneider
file at > https://www.dropbox.com/s/ffrxqkxr4vai8hf/geo_em.d01.nc?dl=0 if anyone > happens to be able to take a look. > > Thanks, > David > > -- > *From:* Dominik Schneider <dosc3...@colorado.edu> > *Sent:* Wednesday, August 3, 2016 12:52 PM

Re: [R-sig-Geo] putting scalebar and north arrow on google map

2016-07-18 Thread Dominik Schneider
+1 ggsn On Mon, Jul 18, 2016 at 9:16 AM, Bacou, Melanie wrote: > No self promotion, but in case you're looking for code examples using > leaflet plugins (scalebar and minimap) available through `tmap` : > http://tools.harvestchoice.org/ar/ (code is linked at the bottom of the >

Re: [R-sig-Geo] Geographically weighted regression on categorical variable

2016-07-18 Thread Dominik Schneider
Sorry I don't know the answer but you can search here: http://grokbase.com/g/r/r-sig-geo On Mon, Jul 18, 2016 at 12:13 PM, Guy Bayegnak wrote: > > Hi All, > > I am trying to perform geographically weighted regression on categorical > variables. The majority of answers I

Re: [R-sig-Geo] Error reading hdf files with rgdal

2017-01-16 Thread Dominik Schneider
Just to cover all the bases, MODIS hdf files require the hdf4 library. If you changed something with your GDAL install you might not have this anymore. at the commandline prompt, gdalinfo --format HDF4 should give the following Khione:~ $ gdalinfo --format HDF4 Format Details: Short Name: HDF4

Re: [R-sig-Geo] raster: crop error ('nrows > 0 is not TRUE')

2016-10-03 Thread Dominik Schneider
Isn't the southern border of your boundary shapefile outside the extent of your raster? hence there are no rows to extract. On Mon, Oct 3, 2016 at 7:45 AM, Mauricio Zambrano Bigiarini < mauricio.zambr...@ufrontera.cl> wrote: > Dear list, > > I'm applying the 'crop' command of the raster pacakge

Re: [R-sig-Geo] Interpolating snowfall values on a Digital Elevation Model

2018-02-13 Thread Dominik Schneider
You can't use a lat/long coordinate system when kriging because the concept of distance is ambiguous. Convert all your data a UTM grid like you had in your first post and it should work. Another note, It looks like you are working at 0.01 deg which is on the order of 1km resolution so you may

Re: [R-sig-Geo] [DKIM] Re: Interpolating snowfall values on a Digital Elevation Model [SEC=UNCLASSIFIED]

2018-02-20 Thread Dominik Schneider
nal Congress on Modelling and Simulation: Hobart, > Tasmania, Australia, pp. 106-112. > > > -Original Message- > From: R-sig-Geo [mailto:r-sig-geo-boun...@r-project.org] On Behalf Of > Dominik Schneider > Sent: Wednesday, 14 February 2018 3:21 AM > To: Stefano

[R-sig-Geo] install rgdal from source macOS

2019-06-09 Thread Dominik Schneider
I'm trying to install rgdal from source on a fresh r 3.6 installation. i setup a conda environment to install gdal, proj, geos install.packages('rgdal', type = "source", configure.args=c('--with-proj-include=/Users/dosc3612/Applications/miniconda3/envs/rgdal/include',

Re: [R-sig-Geo] install rgdal from source macOS

2019-06-20 Thread Dominik Schneider
: image not found Error: loading failed Execution halted ERROR: loading failed * removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rgdal’ The downloaded source packages are in ‘/private/var/folders/bb/13z2kq0j01jg5q_0ypjc76grgn/T/Rtmpqaf8Yh/downloaded_packages’ Warning