Thiago, you could of course do
mx <- max( cellStats(r, stat='max', na.rm=TRUE) )
but this is faster:
mx <- maxValue(max(r))
for writing to ncdf you can use writeRaster (or a filename argument in
cut, as long as the extension is ".nc".
Robert
On Mon, May 27, 2013 at 9:09 PM, Thiago V. dos San
Dear all,
I'm working on land use transition data that comes as netcdf. I would like to
reclassify each one of these files in 15 classes, based on the min and max
values of the entire series.
Although I know this specific dataset ranges from 0 to 0.0680, I'd rather
obtain it dinamically, via R
Manos,
I think this happens because s1pol is invalid (self-intersecting).
s2pol also has that problem but it works anyway. I have cleaned your
shapefile and will send it to you via a separate email. With the
cleaned shp file the problem does not occur. The script below shows
the test for validity
Chuck,
raster can read both TOPTOBOTTOM=FALSE and TOPTOBOTTOM=TRUE SAGA
files. However, it only writes TOPTOBOTTOM=TRUE.
GDAL can read and write TOPTOBOTTOM=TRUE only. Apparently QGIS has a
native driver for SAGA that can only do TOPTOBOTTOM=FALSE, which is
odd (as it not the common approach).
Mohgli,
This should fix it:
library(raster)
r <- raster(FileNm)
r <- rotate(r)
Robert
On Thu, May 23, 2013 at 3:55 PM, wrote:
> Dear all
>
> I am plotting a raster dataset derived through a netCDF file and want to
> overlay with a shapfile. Although I specify the extent of the raster
> xmin=-1
For a simple approach I would just do on the raw coordinates in the
SPDF. You could operate on the NetCDF file itself by reading from it
directly as a matrix with vectors, but since you mention the SPDF why
not just do this:
x <- as.data.frame(spdf)
## figure out what "longitude" and "latitude" ar
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/in
Dear list,
I am converting NetCDF data, placed on a global grid with irregular
latitude values, to a regular WGS84 grid using IDW. It works, but I have
one remaining issue for which I can use advice.
The original data is oriented -280, +80 longitude, and it needs to be
interpolated to -180,
On 05/27/2013 03:06 PM, Thiago V. dos Santos wrote:
> Dear R-siggers,
>
> I'm trying to produce a bubble plot using the sp package. The plot is ok, but
> there are two issues I would like to improve. To see them, please reproduce
> the code below:
>
>
Dear R-siggers,
I'm trying to produce a bubble plot using the sp package. The plot is ok, but
there are two issues I would like to improve. To see them, please reproduce the
code below:
require(sp)
require(rgdal)
# Read PR shapefile
download.file('htt
10 matches
Mail list logo