Skip to main content

All Questions

Tagged with
1 vote
0 answers
64 views

Add time slider for a stack of rasters

I'm looking for a static HTML solution (no Shiny) to incorporate a timeslider for raster data in a leaflet. leaflet.extras2::addTimeslider() requires the data argument to be "a Simple Feature ...
Rich Pauloo's user avatar
  • 8,172
0 votes
1 answer
34 views

How can you create heatmaps in R with leaflet from multiple csvs? Merging/resampling issue

I have been using this as an inspiration. I have c.400 GPS files with GPS positions in csv's, each csv has a file property that I want to retain to create heatmaps based on that property. https://gis....
andyroberts1234's user avatar
5 votes
1 answer
376 views

raster and polygons in leaflet, without raster interpolation

I'm trying to display several layers in leaflet (or mapview), one of which is a raster in EPSG:27700. The only way I manage to adequately overlay those layers is through the default latlong projection,...
Yollanda Beetroot's user avatar
2 votes
1 answer
255 views

Raster output from rasterized sf points does not align with points

I am trying to rasterize some points and am getting a mismatch between the points and the rasters despite the crs being the same. If I convert the raster to polygons it lines up perfectly with the sf ...
Blaiso's user avatar
  • 189
2 votes
1 answer
309 views

Issue plotting generated polygon grid to leaflet

I am trying to create a polygon grid to plot in leaflet, but am running into an error that I cannot seem to figure out: library(leaflet) library(raster) library(sf) library(rgdal) r <- raster(ext =...
metamorporpoise's user avatar
0 votes
1 answer
277 views

Loop over in leaflet

I have a code below, and I would like to forloop the overlayGroup by each cluster. library(dplyr); library(leaflet); library(raster);library(htmltools) cluster <- c("1st.C", "2nd.C&...
Seyma Kalay's user avatar
  • 2,763
1 vote
0 answers
309 views

Overlay raster RGB and polygon layer in leaflet/mapview with custom CRS in R

I am trying to use R mapview/plainview or leaflet to display a raster RGB with a second layer that is a vector-based (spatial points or polygon) on top that I can toggle on an doff. It is important ...
ccc75's user avatar
  • 11
6 votes
1 answer
1k views

leaflet side-by-side for 2 raster images in R

{leaflet.extras2} implements the leaflet side-by-side plugin and provides this minimal example: library(leaflet) library(leaflet.extras2) leaflet(quakes) %>% addMapPane("left", zIndex =...
Rich Pauloo's user avatar
  • 8,172
1 vote
0 answers
84 views

rasterFromXYZ projection is misaligned but drawing individual points lines up correctly

I have lat/lon data with a value for each coordinate. I am trying to create a raster layer to use in leaflet where the values are mapped to a palette. mydata has 3 cols, x, y, z (where z is value) ...
jzadra's user avatar
  • 4,194
0 votes
1 answer
776 views

Leaflet with Shiny - how to ensure maximum zoom in option for the user

For one of the map use case , need to provide maximum zoom in option for the user in shiny app. Have tried to explore some of the options as per below code. Wanted to understand if this is the maximum ...
string's user avatar
  • 817
3 votes
1 answer
353 views

Problem joining different SpatialPolygonsDataFrame objects in R

I have a shape file of towns in the north of Spain that I have to join into groups (municipalities or comarcas in Spanish). I've used st_union from the sf package to join them successfully (and each ...
Ainhoa's user avatar
  • 425
1 vote
1 answer
964 views

How do i get mapview to plot my raster image with the same colors as plotRGB or plot

I have a raster file that I have exported from ArcGIS as a georeferenced tif file. The raster will be used as a background map in mapview because the mapview background layers CartoDB.Positron, ...
jjunju's user avatar
  • 528
2 votes
0 answers
1k views

How do I add a raster to a leaflet map in r that nicely covers the land, and doesn't have gaps?

I have a dataset of several thousand geographical points, each assigned a cluster (in my reproducible example below I simplify this to 8 points). I want to color an entire global map (only the ...
mspooner's user avatar
5 votes
0 answers
449 views

How to project a raster + polygons in Lambert 93 with leaflet on R?

I'm trying to make a leaflet map in Lambert 93 (st_transform(2154)) composed of: 1. Polygons (France) 2. Raster Layer (Europe) I can't understand why the following code is not working. library(...
antuki's user avatar
  • 236