Cleanup webmapping notebook

pull/2/head
anitagraser 2021-05-26 18:40:54 +02:00
rodzic 938b1611db
commit d28768b0a3
7 zmienionych plików z 20 dodań i 204 usunięć

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 33 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 67 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 132 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 192 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 794 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 614 KiB

Wyświetl plik

@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Welcome to the Mobile & Web Mapping Lab - Session 2!\n",
"# Accessing Different Types of Webservices\n",
"\n",
"[![Binder](http://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/anitagraser/ogd-at-lab/main?urlpath=lab/tree/notebooks/webmapping.ipynb)"
]
@ -13,89 +13,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Recap of session 1\n",
"## 1. Basemap tiles (XYZ tiles)\n",
"\n",
"### Data collection & presentation as essential parts of geographic data science\n",
"\n",
"![](./img/datascience.png)\n",
"\n",
"*Figure: Data science workflow (Graser & Dragaschnig 2020).*\n",
"\n",
"### Intro to webmapping \n",
"\n",
"\n",
"![](./img/architecture.jpg)\n",
"\n",
"*Figure: Typical web mapping architecture (Brovelli et al. 2013).*\n",
"\n",
"<br/>\n",
"<br/>\n",
"<br/>\n",
"\n",
"<hr>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Session 2: Webmapping services - more than just maps in a browser\n",
"\n",
"**Today's goals**\n",
"\n",
"* Understanding different types of web map service standards\n",
"* Exploring other useful non-standard service examples\n",
"\n",
"<br/>\n",
"<br/>\n",
"<br/>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
" \n",
"### 1. Tiles / basemaps\n",
"\n",
"**Use case:** Map background / geographic context\n",
"\n",
"**Standard:** Web Map Tile Services (WMTS) / XYZ Tiles\n",
"\n",
"\n",
"<br/>\n",
"<br/>\n",
"<br/>\n",
"\n",
"Basemap tiles are everywhere ...\n",
"\n",
"#### In desktop GIS, e.g. QGIS\n",
"\n",
"![](./img/osm-qgis.PNG)\n",
"\n",
"*Figure: OSM Tiles in QGIS*\n",
"\n",
"<br/>\n",
"<br/>\n",
"<br/>\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"#### In web maps, e.g. Leaflet\n",
"\n",
"![](./img/leaflet.PNG)\n",
"\n",
"*Figure: OSM Tiles in Leaflet*\n",
"\n",
"<br/>\n",
"<br/>\n",
"<br/>\n",
"\n",
"#### In notebooks, e.g. Geoviews & Bokeh"
"Documentation: http://geoviews.org/user_guide/Working_with_Bokeh.html\n"
]
},
{
@ -116,38 +36,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Documentation: http://geoviews.org/user_guide/Working_with_Bokeh.html\n",
"\n",
"<br/>\n",
"<br/>\n",
"<br/>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 2. Raster maps\n",
"\n",
"**Use case:** Cartographic products (e.g. hillshades, topographic maps), map overlays ...\n",
"\n",
"**Standard:** Web Map Services (WMS) \n",
"\n",
"<br/>\n",
"<br/>\n",
"<br/>\n",
"\n",
"#### In desktop GIS, e.g. QGIS\n",
"\n",
"![](./img/wms-qgis.PNG)\n",
"\n",
"*Figure: WMS layers in QGIS*\n",
"\n",
"<br/>\n",
"<br/>\n",
"<br/>\n",
"\n",
"#### In notebooks, e.g. Geoviews & Bokeh"
"## 2. Web Map Services (WMS) \n",
"Source: https://github.com/holoviz/geoviews/issues/481"
]
},
{
@ -156,23 +46,19 @@
"metadata": {},
"outputs": [],
"source": [
"url = \"\"\"\n",
"http://data.wien.gv.at/daten/geo?\n",
"&service=WMS\n",
"&request=GetMap\n",
"&layers=ogdwien:DONAUINSPKTOGD\n",
"&styles=\n",
"&format=image/png\n",
"&transparent=true\n",
"&version=1.3.0\n",
"&width=256\n",
"&height=256\n",
"&crs=EPSG:3857\n",
"&bbox={XMIN},{YMIN},{XMAX},{YMAX}\n",
"\"\"\"\n",
"\n",
"basemap = hv.element.tiles.OSM().opts(width=450, height=450)\n",
"map_with_overlay = basemap * hv.Tiles(url, extents=(1825290,6144246,1827693,6146435))\n",
"def load_wms(server=\"http://data.wien.gv.at/daten/geo\", layer=\"ogdwien:DONAUINSPKTOGD\", extents=(1825290,6144246,1827693,6146435)):\n",
" url = f\"{server}?&service=WMS&request=GetMap&layers={layer}&styles=&format=image/png&transparent=true&version=1.3.0&width=256&height=256&crs=EPSG:3857\"\n",
" url = url + \"&bbox={XMIN},{YMIN},{XMAX},{YMAX}\"\n",
" return hv.Tiles(url, extents=extents)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"map_with_overlay = basemap * load_wms()\n",
"map_with_overlay"
]
},
@ -182,60 +68,14 @@
"metadata": {},
"outputs": [],
"source": [
"url2 = \"\"\"\n",
"http://data.wien.gv.at/daten/geo?\n",
"&service=WMS\n",
"&request=GetMap\n",
"&layers=ogdwien:DONAUKILOMETEROGD\n",
"&styles=\n",
"&format=image/png\n",
"&transparent=true\n",
"&version=1.3.0\n",
"&width=256\n",
"&height=256\n",
"&crs=EPSG:3857\n",
"&bbox={XMIN},{YMIN},{XMAX},{YMAX}\n",
"\"\"\"\n",
"\n",
"map_with_overlay * hv.Tiles(url2, extents=(1825290,6144246,1827693,6146435))"
"map_with_overlay * load_wms(layer=\"ogdwien:DONAUKILOMETEROGD\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Source: https://github.com/holoviz/geoviews/issues/481\n",
"\n",
"<br/>\n",
"<br/>\n",
"<br/>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 3. Vector data\n",
"\n",
"**Use case:** Access to geometry and attribute data\n",
"\n",
"**Standard:** Web Feature Services (WFS) \n",
"\n",
"<br/>\n",
"<br/>\n",
"<br/>\n",
"\n",
"#### In desktop GIS, e.g. QGIS\n",
"\n",
"![](./img/wfs-qgis.PNG)\n",
"\n",
"*Figure: WFS layer in QGIS*\n",
"\n",
"<br/>\n",
"<br/>\n",
"<br/>\n",
"\n",
"#### In notebooks, e.g. Geoviews & Bokeh"
"### 3. Web Feature Services (WFS) \n"
]
},
{
@ -264,30 +104,6 @@
"source": [
"gdf.hvplot(geo=True, tiles='OSM', hover_cols=['STATION']).opts(active_tools=['wheel_zoom'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 4. Other non-standard service examples\n",
"\n",
"1. [Geocoding addresses with Nominatim](geocoding.ipynb)\n",
"1. [Getting elevation information](elevation.ipynb)\n",
"\n",
"<br/>\n",
"<br/>\n",
"<br/>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## References\n",
"\n",
"* Brovelli, M., Minghini, M., & Zamboni, G. (2013). Web–based Participatory GIS with data collection on the field–A prototype architecture. In Free and Open Source Software for Geospatial (FOSS4G) Conference Proceedings (Vol. 13, No. 1, p. 5).\n",
"* Graser, A. & Dragaschnig, M. (2020). Open Geospatial Tools for Movement Data Exploration. KN Journal of Cartography and Geographic Information, 70(1), 3-10. doi:10.1007/s42489-020-00039-y."
]
}
],
"metadata": {