Displaying 20 results from an estimated 3000 matches similar to: "Edges and Rasters"
2012 Oct 29
3
How can I map numbers to colours with raster?
This code will read binary file and display it as a map. may problem is that
this code is using a continuous colour scheme, even though I have discrete
data (which is a classification scheme). How can I map numbers to colours
with raster? Please
require(raster)
conne <- file("C:\\lai.bin", "rb")
sd<- readBin(conne, integer(), size=1, n=360*720, signed=F)
2020 Feb 20
3
Pregunta sobre rLandsat
Hola Ángel:
Yo creo que tendrías que establecer el sistema de coordenadas de
referencia de tu objeto raster antes de salvarlo como GTiff. Algo así:
crs(r1) <-"+proj=utm +zone=14 +datum=WGS84"
Saludos,
Marcelino.
El 20/02/2020 a las 1:42, Angel Cervantes escribió:
> Hola a todos, quisiera pedirles su ayuda. Estoy tratando de crear un raster a partir de una tabla de datos
2012 Feb 28
1
colour by z value, persp in raster package
Hi all!
My question is how to colour pixels by z value in persp plot in raster package. Here is an example:
x <- seq(-1.95, 1.95, length = 30)
y <- seq(-1.95, 1.95, length = 35)
z <- outer(x, y, function(a,b) a*b^2)
r1 <- raster(nrows=35, ncols=30, xmn=0, xmx=30, ymn = 0, ymx = 35)
r1[] <- c(z)
persp(r1)
There already exist some function to produce persp plot for anothe
2012 Aug 08
1
Adjusting coordinates in raster plots
Dear R-Help,
When plotting a raster object the origin (0,0) is placed in the center.
E.g. using:
library(raster)
mat = matrix(runif(100),10,10)
r <- raster(ncol=10, nrow=10)
values(r) <- mat
plot(r, main='Raster example',xlab="x",ylab="y")
Does anyone know how to adjust the coordinate system?
E.g. I would like to have 0,0 at the top left.
My naive approach
2013 Jan 29
2
Netcdf and Raster Package Questions, Need .asc File for GIS
Hello R-Group,
I am new working with netcdf files and the raster package in R.I am
trying to read in a netcdf file using the package "ncdf".I am able to
get the lat, lon and parameter I need and can plot using
fill.contour.Ultimately, I am trying to create a .asc file to reafd into
GIS.I am using the package "raster" to read the parameter.When I read in
with
2013 Oct 08
0
PostGIS 2.1 rasters available to Rails code: breadcrumbs
Just wanted to post this in case someone else was faced with the same
problem. It''s database-specific code, worse, it''s specific to a particular *
version* of a particular *extension* to a particular database, wires in
SQL, and uses eval on a string of data from the database!
So, you know, I''m getting coal in my stocking from DHH this year. I can
deal. (After the
2012 Mar 19
1
plot method for rasters and layout
Hi list,
I thought I was used to layouts, but today I am facing a problem I cannot
overcome :
On my R installation (Windows 7 Pro, SP1, R version 2.13.0, daily update of
packages), I am not able to put raster plots in user defined layouts :
> layout.matrix<-matrix(c(1,2,3,4,5,5),2,3)
> layout(mat=layout.matrix)
> layout.show(5)
works fine, I get the correct frames in
2020 Feb 19
2
Pregunta sobre rLandsat
Hola grupo, estoy siguiendo una gu?a de la librer?a rLandsat que me la he descargado de:
devtools::install_github("socialcopsdev/rLandsat")
Y tras hacer los siguiente (obviamente tengo me he registrado previamente en la api correspondiente):
product_id = c("LC08_L1TP_145049_20180301_20180308_01_T1",
"LC08_L1TP_145049_20170330_20170414_01_T1",
2013 Mar 19
1
How to get the rolling standard deviation in rasters?
I am using this code to calculate the moving average mean.It worked fine but
when I wanted to also calculate based on sd(stander deviation) I got the
error shown below.
I read this documentation of R movingFun and found that sd was mentioned at
http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/raster/html/movingFun.html
I wonder if needs any other things to conseder or sd is not at all supplied
2013 Dec 02
3
legend position
Hi all.
I'm ploting a raster and I can't find the proper way to move the legend. For example,
r = raster(system.file("external/test.grd", package="raster"))plot(r)
How can I put the legend at the desired position?
Thank in advance,Phil
[[alternative HTML version deleted]]
2011 Jun 10
2
merge large number of raster objects
Hello,
I have a large number of raster objects in memory, with names RH100,
RH101, RH102, etc. (myobjects <- ls(pattern='^RH')).
These rasters are sections of a continuous map, and I would like to
combine them using the RasterObject merge tool in package 'raster.'
Merge expects an input list of raster objects (outmap<-merge(x, y, ...),
where x, y, and ... are raster
2024 Aug 24
1
paired raster boxplots
Dear Ivan
Dear community
Quite nice book recommendation.
Yes indeed my raster "s" (the shape file for the boxplot classes) has several layers. That's way I tried to select a layer by " s<-sf$Unterregio".
> sf <- read_sf("C:/Users/....._BiogeoRegion.shp")
> names(sf)
> names(sf)
[1] "RegionNumm" "RegionName"
2010 Feb 22
1
Raster table: how separate lines with the same value (count > 1)
Dear all,
I intend to do some statistics with my raster table, like correlations or
regression analysis. For that, I need that each pixel be in one line, that
is, there is no count > 1. So, all columns should have the same number of
lines, when I compare (combine) rasters.
I'd like to know if there is a way to create lines and copy the values of
the lines, when count is > 1. So, even
2024 Aug 23
1
paired raster boxplots
? Fri, 23 Aug 2024 10:15:55 +0200
<sibylle.stoeckli at gmx.ch> ?????:
> > s<-sf$Unterregio
> > r<-allrasters_pres[[1]]
> >
> >
> > rs <- stack(r, s)
> > names(rs) <- c('r', 's')
> Error in `names<-`(`*tmp*`, value = c("r", "s")) :
> incorrect number of layer names
It looks like at least one
2006 Dec 01
1
memory problem
hi to all,
frustated for this error, to day i buy a 1 GB memory
slot for my laptop
now it have 1,28GB instead the old 512, but i've the
same error :-(
damn!damn!....how can i do?
repeat for a little area (about 20X20 km and res=20m)
it work fine!
have you any suggestion?
is ther a method for look if this error depend from my
ram or other....?
thanks foe any suggestion!
i need your help.
2006 Dec 01
1
memeory problem?!
hi,
i'm trying to perform a clustering on a big dataframe the code is this:
print("load required R packages")
require(spgrass6)
require(cluster)
gmeta6 <- gmeta6()
print("read in our 7 raster files from GRASS")
x <- readFLOAT6sp(c
("er","crosc","longc","slope","profc","minic","maxic"))
2024 Aug 22
1
paired raster boxplots
Dear community
I have two raster files (here r and r2: y-axis) and an equal x-axis (here s,
4 classes).
Instead of plotting two boxplots I would like to plot paired boxplots: for
each class the boxplots from r and r2 paired).
I tried to adapt the code, but I am struggling around with the error:
> names(rs) <- c('r', 's', 'r2')
Error in `names<-`(`*tmp*`,
2024 Aug 15
1
allequal diff
Digging into the code for raster::compareRaster():
library(raster)
r <- raster(ncol=3, nrow=3)
values(r) <- 1:ncell(r)
r2 <- r
values(r2) <- c(1:8,10)
all.equal(getValues(r), getValues(r2), tolerance = 0)
[1] "Mean relative difference: 0.1111111"
compareRaster has fancier machinery internally for doing the
comparison for large rasters a block at a time if everything
2013 Sep 16
1
Patch: fix segfault from empty raster
Hi,
A colleague recently came across an R crash, which I can boil down to
the following, running under Rgui on Windows 7:
library(ggplot2)
ggplot(data.frame(x=1, y=1, z=4.7), aes(x, y, z=z)) + stat_summary2d()
This reliably causes a segmentation fault. sessionInfo() below.
What's happening is that (for reasons which I'll discuss with the
ggplot2 developers) the 'colorbar'
2024 Aug 18
1
allequal diff
?? The OP's original problem is that the all.equal method for raster
objects (raster:::all.equal.raster), which is a wrapper around the
compareRaster() function, compares a bunch of different properties of
rasters (extent, resolution, values, etc.) and only returns a single
overall logical (TRUE/FALSE) value. OP wanted to see the magnitude of
the difference (as you could get for more