Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Interactive viewing of spatial data in R

License

NotificationsYou must be signed in to change notification settings

r-spatial/mapview

Repository files navigation

R-CMD-checkcran checksmonthlytotalCRANLicense

Interactive viewing of spatial data in R

mapview provides functions to very quickly and conveniently createinteractive visualisations of spatial data. It’s main goal is to fillthe gap of quick (not presentation grade) interactive plotting toexamine and visually investigate both aspects of spatial data, thegeometries and their attributes. It can also be considered a data-drivenAPI for theleafletpackage as it will automatically render correct map types, depending onthe type of the data (points, lines, polygons, raster). In addition, itmakes use of some advanced rendering functionality that will enableviewing of much larger data than is possible withleaflet.Furthermore, if you’re a fan ofmapdeck (which youshould!), you can choose to use it as the rendering platform instead ofleaflet by settingmapviewOptions(platform = "mapdeck").

The main user relevant functions are:

  • mapview - view (multiple) spatial objects on a set of backgroundmaps
  • viewExtent - view extent / bounding box of spatial objects
  • viewRGB - view RGB true- or false-color images of raster objects
  • mapshot - easily save maps (including leaflet maps) ashtml and/orpng (or other image formats)

Functions that have been deprecated/deleted recently:

  • addHomeButton - deprecated, use packageleafem instead.
  • addLogo - deprecated, use packageleafem instead.
  • addFeatures - deprecated, use packageleafem instead.
  • addMouseCoordinates - deprecated, use packageleafem instead.
  • addExtent - deprecated, use packageleafem instead.
  • addImageQuery - deprecated, use packageleafem instead.
  • latticeView &sync - deprecated, use packageleafsync instead.
  • slideView - deprecated, use packageslideview instead.
  • cubeView - deprecated, use packagecubeview instead.
  • plainview - deprecated, use packageplainview instead.
  • popupTable,popupGraph &popupImage - deprecated, use packageleafpop instead.
  • addLargeFeatures - useleafgl::addGL*functions instead.

Objects of the following spatial classes are supported:

  • sf
  • raster (Layer, Stack,Brick and SpatialPixels* / SpatialGridDataFrame)
  • stars
  • sp (Points, Polygons, Linesand their DataFrame version)
  • satellite

Installation

For CRAN release version ofmapview use

install.packages("mapview")

To install the development version you can install theremotes package.

NOTE: As of version 2.9.1 development will happen on themasterbranch. Please consider thedevelop branch obsolete.

remotes::install_github("r-spatial/mapview")

Usage

The most basic call

mapview(breweries)

will produce a web map visualisation of the breweries data with thefollowing components:

Contact

Please file bug reports and feature requests athttps://github.com/r-spatial/mapview/issues


[8]ページ先頭

©2009-2025 Movatter.jp