Skip to content

Commit

Permalink
fix local variable refernced
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuffat committed Feb 18, 2021
1 parent c554d8d commit 347212e
Showing 1 changed file with 107 additions and 5 deletions.
112 changes: 107 additions & 5 deletions create_wms_template_appmode.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,24 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f075e610d90c4c05b4a43a56eca59069",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HTML(value='\\n <style>\\n .output_scroll {\\n height: unset !important;\\n border…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import xml.etree.ElementTree as ET\n",
"from io import StringIO\n",
Expand Down Expand Up @@ -147,9 +162,82 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"https://opengeodata.goteborg.se/services/hojdmodell/wms/v2\n",
"\n",
"Send request to: https://opengeodata.goteborg.se/services/hojdmodell/wms/v2?service=WMS&request=GetCapabilities&version=1.3.0\n",
"\n",
"WMS Server Metadata:\n",
"Access constraints:\n",
"NONE\n",
"\n",
"Fees:\n",
"NONE\n",
"\n",
"Layers:\n",
"0: hojdgrid (Höjdgrid)\n",
"1: hojdkurvor (Höjdkurvor)\n",
"2: terranglutning (Terränglutning)\n",
"3: terrangskuggning (Terrängskuggning)\n",
" \n",
"Select Layer: 2\n",
" \n",
"Styles:\n",
"0: hojdmodell-v2:terranglutning (Terranglutning)\n",
" \n",
"Select Style: 0\n",
" \n",
"Image formats:\n",
"image/jpeg is typically preferred for photo sources. But might not always be the best choice.\n",
"0: image/png\n",
"1: image/geotiff8\n",
"2: image/jpeg\n",
"3: image/png; mode=8bit\n",
" \n",
"Select Format: 2\n",
" \n",
"\n",
"Copy the following output:\n",
"-------------------------\n",
"{\n",
" \"type\": \"Feature\",\n",
" \"properties\": {\n",
" \"name\": \"Terr\\u00c3\\u00a4nglutning\",\n",
" \"type\": \"wms\",\n",
" \"url\": \"https://opengeodata.goteborg.se/services/hojdmodell/wms/v2?LAYERS=terranglutning&STYLES=hojdmodell-v2:terranglutning&FORMAT=image/jpeg&CRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}&VERSION=1.3.0&SERVICE=WMS&REQUEST=GetMap\",\n",
" \"license_url\": \"\",\n",
" \"privacy_policy_url\": \"\",\n",
" \"id\": \"\",\n",
" \"description\": \"Terr\\u00c3\\u00a4nglutning med lutningsintervall i gr\\u00c3\\u00a5skala fr\\u00c3\\u00a5n vitt till svart. 100% opacitet.\",\n",
" \"country_code\": \"\",\n",
" \"best\": false,\n",
" \"start_date\": \"\",\n",
" \"end_date\": \"\",\n",
" \"category\": \"\",\n",
" \"available_projections\": [\n",
" \"CRS:84\",\n",
" \"EPSG:3006\",\n",
" \"EPSG:3007\"\n",
" ],\n",
" \"attribution\": {\n",
" \"url\": \"\",\n",
" \"text\": \"\",\n",
" \"html\": \"\",\n",
" \"required\": true\n",
" }\n",
" },\n",
" \"geometry\": \"\"\n",
"}\n",
"-------------------------\n"
]
}
],
"source": [
"wms_url = input()\n",
"\n",
Expand Down Expand Up @@ -288,7 +376,7 @@
" reverse=True,\n",
" )\n",
" )\n",
" result[\"available_projections\"] -= set(result_epsg_3857_alias_sorted[1:])\n",
" crs_options -= set(result_epsg_3857_alias_sorted[1:])\n",
"\n",
" # Filter deprecated projections\n",
" crs_options.intersection_update(valid_epsgs)\n",
Expand Down Expand Up @@ -326,6 +414,20 @@
"\n",
"run_wms_wizard(wms_url)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 347212e

Please sign in to comment.