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 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
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 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
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 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
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
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"))
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'
2013 Mar 18
4
Why stacking rasters return NAs?
I have several rasters that I want to do some calculations ,basically
calculating the moving average.
dir2 <- list.files("D:\\2010+2011", "*.bin", full.names = TRUE)
saf=stack(dir2)
movi <- overlay(stack(saf),fun=function(x) movingFun(x, fun=mean,
n=3, na.rm=TRUE))
Error in .overlayList(x, fun = fun, filename = filename,
2013 Feb 14
0
How write raster files after manipulation?
I have 12 binary (raster) files
https://echange-fichiers.inra.fr/get?k=k3M2jatJyHy65Cs99G4 .
I would like to calculate the moving average for the 12 values for each
pixel in the 12 files.
For a simple vector we can get a moving average by using this :
x <- c(1,2,3,NA,NA,4,6,5,6,4,2,5)
movingmean <- rollapply(x, 3, FUN = mean, na.rm = T)
now I want
2009 Feb 21
1
Extracting xy from raster based on raster value
I have a raster (which I called glc), which I read
into R as a raster with "raster.create.from.file" from the raster package (R-forge). Values in glc range between 1 and 27 (whole numbers only). I'd like to extract all cells with a value of 1 to create
a new raster with only the cells that have a value of 1, or to extract
the xy values of all raster cells with a value of 1. Could you
2011 Jan 31
1
str() on raster objects fails for certain dimensions
Hi,
str() on raster objects fails for certain dimensions. For example:
> str(as.raster(0, nrow=1, ncol=100))
'raster' chr [1, 1:100] "#000000" "#000000" "#000000" "#000000" ...
> str(as.raster(0, nrow=1, ncol=101))
Error in `[.raster`(object, seq_len(max.len)) : subscript out of bounds
This seems to do with how str() and
2017 Dec 07
2
parallel computing with foreach()
I have used foreach() for parallel computing but in the current problem, it
is not working. Given the volume and type of the data involved in the
analysis, I will try to give below the complete code without reproducible
example.
In short, each R environment will draw a set of separate files, perform the
analysis and dump in separate folders.
splist <- c("juoc", "juos",