[R-sig-Geo] mapview 1.0.0

Tim Appelhans tim.appelhans at gmail.com
Wed Dec 16 11:29:13 CET 2015


Dear all,

we are happy to announce that mapview 1.0.0 has been released on CRAN.
Together with Florian Detsch (R, Rcpp), Christoph Reudenbach (js) and 
Stefan Woellauer (js) we have put together a powerful tool for 
on-the-fly mapping of spatial data during the workflow.

In addition to the existing functionality described in my earlier mail, 
we have:

1) made the whole code a lot faster, so rendering should be much quicker 
now.

2) added "big data" support for vector data.
It is now possible to view even very large vector objects without any 
hassle.
This is possible due to the inclusion of special .js functionality. This 
means that when working with large Spatial* objects mapview does not use 
leaflet for R, but its own functions. This also means that leaflet 
integration is not possible for big data. In a nutshell, big data 
support is achieved by separating drawing of the geometries and parsing 
of the underlying data. This means that in order to query the attributes 
of your objects you will need to zoom in a bit. For polygons and lines 
the features will turn magenta once they are queryable, for points the 
query-radius around the points is restricted quite a bit.
As an example, on my machine (ubuntu 14.04 64-bit, 7.5 GB RAM, Intel® 
Core™ i5-4300U CPU @ 1.90GHz × 4, 500GB SSD) 2.1 Mio. points take about 
30 sec. to render and the interactive behaviour of zooming and panning 
is smooth and feels just like dealing with only a handful of points.

For those who are interested in trying yourself, here's a bit of code to 
create an artificial SpatialPointsDataFrame with a bit more than 2.1 
Mio. points (to change the size simply change the number of repeats in 
the first line. BE AWARE THAT FROM ABOUT 5 MIO POINTS THINGS MAY WELL 
BREAK!!



library(ggplot2)
library(rgdal)
library(mapview)

data(diamonds)

### blow diamonds up a bit
big <- diamonds[rep(seq_len(nrow(diamonds)), 40), ]
big$cut <- as.character(big$cut)
big$color <- as.character(big$color)
big$clarity <- as.character(big$clarity)

### provide some random positions
big$x <- rnorm(nrow(big), 0, 10)
big$y <- rnorm(nrow(big), 0, 10)
coordinates(big) <- ~x+y
proj4string(big) <- CRS("+init=epsg:4326")

### view it
mapview(big)




3) added a spplot() method to produce a static version of the 
interactive map. Note, this feature is in its infancy so only has very 
limited flexibility at the moment.

4) added mapviewOptions(), similar to rasterOptions() to set and 
retrieve options session-wide. This means you can now easily set your 
favorite background maps or color schemes (among other things) permanently.

5) added a couple of convenient functions:
    slideview() - to compare two images in a before-after fashion 
(similar to wxGUI Map Swipe in GRASS)
    plainview() - an image viewer to view Raster* objects without the 
map background. This means that you can view rather large rasters with 
arbitrary CRS without too much hassle as no re-projection is necessary.

6) added an alias function "mapview()" with a small "v" as typing was 
quite confusing before. Now it's mapview with a small v all the way from 
loading the package to viewing the data.

Unfortunately we have also BROKEN BACKWARD-COMPATIBILITY.
Due to the inclusion of lattice (levelplot) logic when dealing with 
col.regions, we decided to make argument naming more similar to existing 
spatial graphics standards. Therefore, some argument names have changed:
    - "layer.opacity" is now "alpha.regions"
    - "weight" is now "cex" for points and "lwd" for lines
We hope this does not cause too many inconveniences.

These are the major enhancement/changes of mapview in this release.

We have also updated the demo at

http://environmentalinformatics-marburg.github.io/web-presentations/20150723_mapView.html


As always, don't hesitate to contact us for questions, feedback and/or 
suggestions.

Formal bug reports and feature requests should be filed at
https://github.com/environmentalinformatics-marburg/mapview/issues

Best,
Tim, Flo, Chris and Stefan


-- 
#####################################
Tim Appelhans
Department of Geography
Environmental Informatics
Philipps Universität Marburg
Deutschhausstraße 12
Raum 00A08
35032 Marburg (Paketpost: 35037 Marburg)
Germany

Tel +49 (0) 6421 28-25957

http://environmentalinformatics-marburg.de/



More information about the R-sig-Geo mailing list