Skip to content

Commit 846e7ff

Browse files
committed
added folium use case
1 parent fd23129 commit 846e7ff

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

docs/python-usage.ipynb

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"import cartopy.crs as ccrs\n",
6666
"import cartopy\n",
6767
"from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER\n",
68+
"import folium\n",
6869
"import urllib.request\n",
6970
"import urllib.parse\n",
7071
"import mapbox_vector_tile\n",
@@ -868,6 +869,49 @@
868869
"print('')"
869870
]
870871
},
872+
{
873+
"cell_type": "markdown",
874+
"id": "b7a0e761",
875+
"metadata": {},
876+
"source": [
877+
"<a id=\"visualize_wms_global_raster_data\"></a>\n",
878+
"\n",
879+
"### Visualize WMS Global Raster Data with Folium \n",
880+
"\n",
881+
"<DIV align=\"left\" style=\"line-height:1.5em;\">\n",
882+
"<p>\n",
883+
" \n",
884+
"This example shows how to display a WMS global image on an OpenStreetMap using Folium.\n",
885+
" \n",
886+
"</p>\n",
887+
"</DIV>"
888+
]
889+
},
890+
{
891+
"cell_type": "code",
892+
"execution_count": null,
893+
"id": "14fcbee2",
894+
"metadata": {},
895+
"outputs": [],
896+
"source": [
897+
"# Other tile options are \"CartoDB Positron\" and \"CartoDB Voyager\"\n",
898+
"m = folium.Map(location=[41, -70], zoom_start=4, tiles=\"OpenStreetMap\")\n",
899+
"\n",
900+
"folium.WmsTileLayer(\n",
901+
" url=\"https://gibs.earthdata.nasa.gov/wms/epsg4326/best/wms.cgi\",\n",
902+
" name=\"WMS Landsat Reflectance\",\n",
903+
" fmt=\"image/png\",\n",
904+
" layers=\"Landsat_WELD_CorrectedReflectance_Bands157_Global_Annual\",\n",
905+
" transparent=True,\n",
906+
" overlay=True,\n",
907+
" control=True,\n",
908+
").add_to(m)\n",
909+
"\n",
910+
"folium.LayerControl().add_to(m)\n",
911+
"\n",
912+
"m"
913+
]
914+
},
871915
{
872916
"attachments": {},
873917
"cell_type": "markdown",

0 commit comments

Comments
 (0)