Questions tagged [raster]

A rectangular array of pixels. A Raster defines values for pixels occupying a particular rectangular area of the plane, not necessarily including (0, 0).

A rectangular array of pixels. A Raster defines values for pixels occupying a particular rectangular area of the plane, not necessarily including (0, 0).

3658 questions
1
vote
0 answers

How are my popups not showing in my Leaflet map?

How can I make popups show up in leaflet that I plot using this code? leaflet(df) %>% addTiles() %>% setView(-119.09, 43.70, zoom = 5) %>% addCircles(~long, ~lat, popup=df$hrus, color="#ffa500") %>% addLegend("bottomright", colors=…
maximusdooku
  • 5,242
  • 10
  • 54
  • 94
1
vote
0 answers

Accessing cell value of a wms raster served as ol.layer.Image from OpenLayers

Hi I would like to access the value of the raster cell on clicked location (sort of an indentify tool) of a raster displayed in a webapp as ol.layer.Image via mapserver. I have set the .map file of the mapserver to include TEMPLATE link and…
Alešinar
  • 123
  • 1
  • 11
1
vote
1 answer

Rotate raster annotation ggplot2

Is there a way I can plot a raster annotation in a ggplot, rotated at a specified angle (which is not necessarily a multiple of 90 degrees)? In particular, I need the scale of the image to appear unchanged. What I've tried so far: based on the…
Empiromancer
  • 3,778
  • 1
  • 22
  • 53
1
vote
1 answer

R: How to combine rasters in a loop with all possible combinations?

I have three raster in a list. rasterlist <- (r1, r2, r3) I have one operation to combine each raster with another - let's say add them. How do I write a loop which combines all the rasters iteratively? Like this: result1 <- r1+r2 result2 <-…
Ezra
  • 159
  • 1
  • 10
1
vote
0 answers

Clipping multiple raster layers in R using a shape file

I'm very new to R and still trying to figure out how it works. I have climate data I converted from netCDF to raster images, and there are a lot of files. The whole data is for Africa but I 'm only interested in data for Johannesburg. I now need to…
Annah N
  • 11
  • 1
1
vote
1 answer

Do functions in R package raster and sp preserve cell number order?

I am working with functions in the R package raster and sp to calculate summary statistics for all the pixels in circles of various sizes. To save time when working with many rasters, I have precalculated the distance of every point in the raster…
qdread
  • 3,389
  • 19
  • 36
1
vote
1 answer

Improve speed of color conversion from sRGB to Lab

I need to convert high-resolution ortho-mosaic photos from sRGB to Lab color space. I've tried using base R function convertColor() but I've never accomplished at least one conversion (images over 10 hectares with 5cm pixel resolution, ~50.0000.0000…
aldo_tapia
  • 1,153
  • 16
  • 27
1
vote
0 answers

R: How to extract values from contiguous raster cells that are not touched by SpatialLines?

I've been trying to extract values from a single attribute raster (area, in m2) that overlaps with lines (that is, a .shp SpatialLines). The problem is that, along these lines, my raster sometimes goes from one to several contiguous cells in all…
1
vote
2 answers

Retreiving output raster comparing two rater layer in R

I have two raster layer of dimension (7801, 7651). I want to compare each pixel of one raster layer with the other and create a new raster which has the minimum pixel value among the initial two raster. That is, if any i,j pixel of raster 1 has…
vineet
  • 13
  • 2
1
vote
2 answers

Very likely bug in the R raster package intersect function when intersecting 1 polygon with 1 point

Through attempting to get an intersect result from a single point and a single polygon I have found what I believe can only be a bug in the R raster package intersect function. I have 1 polygon and 1 point, and use intersect as…
Single Entity
  • 2,925
  • 3
  • 37
  • 66
1
vote
2 answers

How to extract time from rasterbrick?

This is probably an easy issue, but I'm having trouble extracting the dates from a rasterbrick that looks like this: > ndviStack class : RasterBrick dimensions : 315, 317, 99855, 221 (nrow, ncol, ncell, nlayers) resolution …
Vaughn Smith
  • 23
  • 1
  • 3
1
vote
1 answer

Draw polygon from raster after occurrence modeling

I want to draw polygons for species occurrence using the same methods BIEN uses, so I can use both my polygons and theirs. They use Maxent to model species occurrence when they have more then occurrence points. So, this is, for example, a BIEN…
Thai
  • 493
  • 5
  • 15
1
vote
1 answer

Convert natural year to hydrological year time series Rasterbrick R

Given a rasterbrick with natural years (Jan-Dec), how can one convert it to have hydrological years (starting on the 1st October and ending on the following 30th September)? Something similar (but not exact) to the question here. Sample data: …
code123
  • 2,082
  • 4
  • 30
  • 53
1
vote
1 answer

Expand qualitative color palette for raster plot R

I want to expand a qualitative palette of colors in order to get a raster map with much more information. I've been using the rasterVis package and with a particularly plot I need more colors than the Paired palette. levelplot(..., …
noriega
  • 447
  • 1
  • 9
  • 23
1
vote
1 answer

Interpolate to raster

I have a three column dataset with LAT, LON and Temperature data I would like to produce a raster image that predicts the temperature of the landscape based on 24 data logger data points. The dataset can be accessed here: DATA This is what I have…
I Del Toro
  • 913
  • 4
  • 15
  • 36