Re: [R-sig-Geo] [raster] conserving dimensions when regridding a 4D Brick or Stack

2013-04-09 Thread Tom Roche
https://stat.ethz.ch/pipermail/r-sig-geo/2013-April/017947.html Can one + create a 4D RasterBrick or RasterStack + instruct projectRaster so as to get 4D regridded output? Or must one - create 3D RasterLayer's (i.e., one per LAY) from the 4D Brick - regrid each 3D Layer - reassemble the

[R-sig-Geo] [raster] conserving dimensions when regridding a 4D Brick or Stack

2013-04-04 Thread Tom Roche
hour3ly.in.raster - raster::brick( hour3ly_in_fp, varname=hour3ly_in_datavar_name, level=2, lvar=3) hour3ly.in.raster - raster::brick( hour3ly_in_fp, varname=hour3ly_in_datavar_name, level=3, lvar=2) and got the same results. What am I doing wrong? TIA, Tom Roche tom_ro...@pobox.com roche@epa.gov

[R-sig-Geo] interoperating SpatialLinesDataFrame, SpatialPolygonsDataFrame

2013-02-25 Thread Tom Roche
Different? Apologies if this is a FAQ, but I'm not seeing the answer in doc (sp.pdf or intro_sp.pdf) or via googling. TIA, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

[R-sig-Geo] [raster newbie] split along dimension into RasterBrick layers

2013-02-21 Thread Tom Roche
(1) ... r.14 - raster(nrow=lat.size, ncol=lon.size, crs=my.crs) values(r.14) - foo.timestep(14) brick( r.1, r.2, r.3, r.4, r.5, r.6, r.7, r.8, r.9, r.10, r.11, r.12, r.13, r.14) Or is there another/better way to do this? TIA, Tom Roche tom_ro...@pobox.com

Re: [R-sig-Geo] how to display a projected map on an rasterVis::layerplot?

2013-02-15 Thread Tom Roche
by latticeExtra::layer(...) TIA, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] how to display a projected map on an rasterVis::layerplot?

2013-02-15 Thread Tom Roche
https://stat.ethz.ch/pipermail/r-sig-geo/2013-February/017531.html How to convert from a simple (x,y) matrix (as produced by M3::get.map.lines.M3.proj) to a SpatialLines, or to coordinates consumable by latticeExtra::layer? One way to do this, though ugly, is the current answer @

[R-sig-Geo] how to display a projected map on an rasterVis::layerplot?

2013-02-14 Thread Tom Roche
. But I'd much prefer to make this work like the other example, which resembles other code I have that is using `rasterVis::layerplot`. Unfortunately that other code is using unprojected/lon-lat data, and I must also handle projected (probably all LCC) data. TIA, Tom Roche tom_ro...@pobox.com

[R-sig-Geo] raster:::.rasterObjectFromCDF, was: [raster] problem with large netCDF file

2013-02-12 Thread Tom Roche
raster.pdf, and the source for raster:::.rasterObjectFromCDF seems quite inscrutable (YMMV :-) TIA, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] [raster] problem with large netCDF file

2013-02-11 Thread Tom Roche
Tom Roche Sun, 10 Feb 2013 14:40:05 -0500 $ ls -alh ./METCRO3D_080101 -r--r--r-- 1 me mygroup 5.3G Jan 8 11:32 ./METCRO3D_080101 # extension used below $ ln -s ./METCRO3D_080101 ./METCRO3D_080101.nc ... raster('./METCRO3D_080101.nc', varname='ZF') ... Error in .local(.Object

[R-sig-Geo] requesting 3D spTransform()

2013-01-02 Thread Tom Roche
=4032group_id=1014func=browse but I'm not seeing equivalent UI for package=rgdal. TIA, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

[R-sig-Geo] multiple data variables in one {Raster*, netCDF file}

2013-01-02 Thread Tom Roche
the datavars in one netCDF file. Can one write from multiple Raster* to multiple datavars in a single netCDF file? An optimistic reading of raster.pdf suggests this is supported via the sequence [writeStart, writeValues, writeStop], but I'd appreciate confirmation. TIA, Tom Roche

Re: [R-sig-Geo] function to convert 3D geographical coordinates to Cartesian?

2013-01-01 Thread Tom Roche
-term, It Would Be Nice if someone provided a proper (i.e., taking a user-provided CRS argument) 3D geographical-to-Cartesian conversion. Your assistance is appreciated (even if only useful in future), Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing

Re: [R-sig-Geo] function to convert 3D geographical coordinates to Cartesian?

2012-12-30 Thread Tom Roche
Tom Roche Sun, 30 Dec 2012 00:40:55 -0500 Is there packaged code to convert geographical coordinates (e.g., longitude, latitude, elevation) to [simple] Cartesian coordinates in 3-space? Edzer Pebesma Sun, 30 Dec 2012 11:11:19 +0100 rgdal::spTransform? I'm aware of that, but don't how

Re: [R-sig-Geo] function to convert 3D geographical coordinates to Cartesian?

2012-12-30 Thread Tom Roche
-intelligence test? TIA, Tom Roche tom_ro...@pobox.comsample code follows to EOP # Convert geographic coordinates (lon, lat, elevation) to # Cartesian coordinates (x, y, z) relative to earth center. geo2cart - function(lon.lat.elev) { library(pracma) # for sph2cart stopifnot(is.numeric

[R-sig-Geo] function to convert 3D geographical coordinates to Cartesian?

2012-12-29 Thread Tom Roche
. TIA, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

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

2012-12-19 Thread Tom Roche
')) ... Date: 2012-08-10 Author: Oscar Perpiñán Lamigueiro Perhaps you could fix that? TIA, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

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

2012-12-19 Thread Tom Roche
Library error: Use linux. HTH, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

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

2012-12-19 Thread Tom Roche
] to longitudes=[-180, +180]? TIA, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

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 - CRS('+proj

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

2012-12-18 Thread Tom Roche
either do something simple to wrld_simpl's longitude values, or Something Completely Different that would Just Work Better, but don't know. Your assistance is appreciated. TIA, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r

[R-sig-Geo] how to overlay maps on lattice panels?

2012-11-20 Thread Tom Roche
on that separately par.strip.text=list(cex=0.5) ) ) # end example TIA, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] [gstat] simple reboxing test fails

2012-11-07 Thread Tom Roche
while keeping one ear on the US elections (at least that worked out better :-) Onward to a more complex test ... thanks, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

[R-sig-Geo] conservative continental reprojection for lon-lat input?

2012-11-07 Thread Tom Roche
of the subglobal grid. ? If so, which CRS to use? TIA, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] R and GIS

2012-11-07 Thread Tom Roche
week. FWIW, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

[R-sig-Geo] [GSIF] what API to call for a simple reboxing test?

2012-11-06 Thread Tom Roche
output box, and furthermore that the output box values should approximate the input box values. Am I missing something? If not: How to call GSIF API to compute the values of the output boxes from the input grid and its values? Your assistance is appreciated, Tom Roche tom_ro...@pobox.com

Re: [R-sig-Geo] regridding netCDF?

2012-11-06 Thread Tom Roche
Tom Roche Thu, Nov 1, 2012 at 2:21 AM See code [for lon-lat to LCC regridding] @ https://github.com/TomRoche/GEIA_to_NetCDF esp https://github.com/TomRoche/GEIA_to_netCDF/blob/master/regrid.global.to.AQMEII.r ping yang Tue, 6 Nov 2012 20:36:12 -0500 (rearranged) Thank you so much for your

[R-sig-Geo] reboxing with package=gstat

2012-11-04 Thread Tom Roche
package=M3. But to get res3D from grid3D, for my usecase, should I use * gstat::krige? If so, what model? (or no model?) * gstat::idw? If so, what formula? * or something else? Your assistance is appreciated! Tom Roche tom_ro...@pobox.com ___ R-sig-Geo

[R-sig-Geo] reboxing with package=GSIF

2012-11-04 Thread Tom Roche
that, or is it (like, IIUC, raster::projectRaster) restricted to 2D? Your assistance is appreciated! Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] how to plot Raster*? problems with raster::plot, fields::image.plot

2012-11-01 Thread Tom Roche
/plotLayersForTimestep.r All code (including drivers providing a test fixture), data, downloads, and README are available @ https://github.com/TomRoche/GEIA_to_netCDF HTH, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https

Re: [R-sig-Geo] regridding netCDF?

2012-11-01 Thread Tom Roche
be quite similar. See code @ https://github.com/TomRoche/GEIA_to_NetCDF esp https://github.com/TomRoche/GEIA_to_netCDF/blob/master/regrid.global.to.AQMEII.r HTH, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https

[R-sig-Geo] [raster] unexpected write behavior with writeRaster, projectRaster

2012-10-26 Thread Tom Roche
incorrect (global) extents, as described @ https://stat.ethz.ch/pipermail/r-sig-geo/2012-October/016504.html FWIW, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] how to plot Raster*? problems with raster::plot, fields::image.plot

2012-10-25 Thread Tom Roche
https://stat.ethz.ch/pipermail/r-sig-geo/2012-October/016503.html - Evidence for a bug in raster::plot : doh! I should have said + Evidence for a bug in raster::projectRaster : rest of previous post https://stat.ethz.ch/pipermail/r-sig-geo/2012-October/016503.html still holds, and follows to

Re: [R-sig-Geo] how to plot Raster*? problems with raster::plot, fields::image.plot

2012-10-24 Thread Tom Roche
/cornbeltN2O/wiki/images/Cmaq_aqmeii_domain.png the boundaries of which are the extents of the output domain. How to fix? Your assistance is appreciated, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https

Re: [R-sig-Geo] how to plot Raster*? problems with raster::plot, fields::image.plot

2012-10-24 Thread Tom Roche
with raster::plot? Or am I missing something? TIA, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] how to plot Raster*? problems with raster::plot, fields::image.plot

2012-10-24 Thread Tom Roche
of extents to display that data with raster::plot? FWIW, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

[R-sig-Geo] how to plot Raster*? problems with raster::plot, fields::image.plot

2012-10-22 Thread Tom Roche
, or just the relation between an added map and the regridded data). Your assistance is appreciated, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] rgeos on Debian

2012-10-18 Thread Tom Roche
: 'debian' is not one thing, it has versions. Are you running squeeze? Try installing the GEOS packages from wheezy/testing: see version availability @ http://packages.debian.org/search?keywords=geossearchon=namessuite=allsection=all HTH, Tom Roche tom_ro...@pobox.com

[R-sig-Geo] [raster newbie] regridding global latlong - CONUS LCC with projectRaster

2012-10-04 Thread Tom Roche
values in the output netCDF, while there were none in either the input netCDF or the input raster? details: Tom Roche Wed, 03 Oct 2012 11:34:58 -0400 I'm getting very wrong output Robert J. Hijmans Wed, 3 Oct 2012 20:27:07 -0700 I do not know why you say the output is wrong. Why you would

Re: [R-sig-Geo] [raster newbie] projectRaster hangs regridding global latlong - CONUS LCC

2012-10-04 Thread Tom Roche
Tom Roche Wed, 03 Oct 2012 11:34:58 -0400 I'm getting very wrong output Robert J. Hijmans Wed, 3 Oct 2012 20:27:07 -0700 I do not know why you say the output is wrong. Why you would expect that input variables would have to be preserved I should have worded that better. Moreover, since

Re: [R-sig-Geo] [raster newbie] projectRaster hangs regridding global latlong - CONUS LCC

2012-10-03 Thread Tom Roche
='to'); how to do that? your assistance is appreciated, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

[R-sig-Geo] [raster newbie] projectRaster hangs regridding global latlong - CONUS LCC

2012-10-02 Thread Tom Roche
is the numerator of the resolution, with the denominator being the counts above), and the domain is not rectangular in lon-lat (see the image just above the previous link). Am I misunderstanding how to define 'res'? And what I should do to debug the hang? Your assistance is appreciated, Tom Roche tom_ro

[R-sig-Geo] [raster newbie] alternate doc for constructors?

2012-09-29 Thread Tom Roche
that does not have these problems? E.g., HTML doc should solve the truncation problem. TIA, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

[R-sig-Geo] [OT?] time-series community?

2012-09-14 Thread Tom Roche
(esp R-based ones) in this domain. Feel free to reply on- or off-list, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] How to open and work with an .hdf map

2012-07-06 Thread Tom Roche
haven't used it, but have heard good things about Panoply http://www.giss.nasa.gov/tools/panoply/ which has a binary for windows. HTH, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo

[R-sig-Geo] regridding netCDF?

2012-07-05 Thread Tom Roche
are appreciated, as would be pointers to helpful resources. Thanks in advance, and feel free to forward, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] problem while creating netcdf files

2012-05-14 Thread Tom Roche
AQMEII domain) that are 1 GB. HTH, Tom Roche tom_ro...@pobox.com ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo