Questions tagged [r-mapview]

An R package that provides methods for interactive plotting of spatial objects from the sf, sp and raster packages.

85 questions
1
vote
0 answers

Using mapshot() to save mapview(), data layer doesn't show when saving PNG

This has to be an easy fix but this is my first time using mapview and mapshot and I'm stuck. I've investigated other postings and the documentation but I can't see a source. I've created an object with mapview. I can view the map ok and I can…
1
vote
0 answers

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 that both spatial layers are in polar stereographic…
ccc75
  • 11
  • 2
1
vote
1 answer

Display aerial photographs interactively in R

I have taken aerial photographs with a drone and stitched those together into a .geotiff file, using third party software. I would like to add this file as a layer to an interactive leaflet map, e.g. as produced by mapview. I can produce an…
M.Teich
  • 575
  • 5
  • 22
1
vote
1 answer

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, CartoDB.DarkMatter, OpenStreetMap , Esri.WorldImagery…
jjunju
  • 505
  • 1
  • 5
  • 18
1
vote
2 answers

How to always keep a specific layer in the background in Mapview

I came across a problem when I was trying to visualize polygons using Simple Features and Mapview. I've created two rectangles, a and b and put them on Mapview on two layers. My problem is that if I select b before a, the b rectangle will be covered…
Moein
  • 101
  • 5
1
vote
0 answers

How do I give a map using mapview() title in R?

I have the below code that gives me a map using mapview() that draws a map for me but I'd like to know how to give it a title i.e "Map Showing Airports of the World". Must be something very basic I can't really figure…
aqkhan
  • 66
  • 8
1
vote
0 answers

Is there a function to overlay a density map over a street map in R?

I am trying to overlay a density map on a street level map but unsure how to do it. I am using the opendata available on the police.uk website. Each incident has a lat and long associated to it. The code below gets me a density map. ` #selecting…
aqkhan
  • 66
  • 8
1
vote
0 answers

How can I link R packages (e.g. `sf` or `mapview`) to the latest GDAL version?

I am trying to use a recent feature in the mapview package that requires a driver (fgb) available in the latest GDAL version (GDAL >= 3.1.0). On my Windows machine I run gdalinfo --version GDAL 3.1.2, released 2020/07/07 but my rgdal (version…
mapman
  • 46
  • 4
1
vote
0 answers

How I can create map with coordinates (with different colour of dots)

I have the coordinates of certain sites in the village. Each coordinate means that I took a sample there. After conducting the study, I found that one test is positive, the other is negative. I want to show it on the map. The table has a column…
Kuban
  • 11
  • 1
1
vote
2 answers

For R's mapview package, can I explicitly set map.types to NULL?

Can I explicitly set map.types to NULL? This does not work as expected. Basically, I don't want the base maps to render. library(mapview) mapView(breweries, map.types = NULL) I don't want to eliminate the associated CRS. I just want to eliminate…
1
vote
1 answer

Why is st_buffer function not creating an R object that correctly displays in mapview?

Trying to get st_buffer function to display a buffer within mapview. Got it to work, but I had to first perform a transform (I doubt this is necessary). Looking for a more straightforward way to do this. EDIT: To clarify...the buffers (in this…
1
vote
0 answers

Pattern fill in mapview?

Is it possible to fill polygons with patterns (ex. diagonal lines) instead of colour using mapview? My searching hasn't turned up anything. Here's an example that produces colour-filled polygons: library(mapview) mapview(franconia,…
Emily
  • 470
  • 5
  • 16
1
vote
1 answer

How to set an uneven sequence for legends in mapview?

The following code creates a legend with even breaks. How could I change it so that every value from 0-1 is shown as white, and values from 1-max value are shown with breaks of 0.5 displayed with graduated shades? (In other words, the only change to…
Emily
  • 470
  • 5
  • 16
1
vote
2 answers

Mapview in R and problem with projections/crs in Pacific area

I am trying to plot data in R using mapView for the grid in the Pacific that crosses the longitude 180deg. The native crs is "+proj=merc +lon_0=150 +lat_ts=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0". The example of…
1
vote
1 answer

Standardising point size across groups

Using zcol, cex and burst it is possible to adjust the size of all levels within a point layer in mapview. However, the size of each point is relative only to the size of other points WITHIN that same level. For example, in the following code, the…
M.Teich
  • 575
  • 5
  • 22