Skip to content

Commit

Permalink
030-010, added lat long to bbox corners
Browse files Browse the repository at this point in the history
  • Loading branch information
danielFlemstrom committed Sep 3, 2024
1 parent 1b3d222 commit c900991
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tutorials/030_GEOM_010-Bounding-box.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@
"\n",
"The WKT format represents the bounding box as a `POLYGON`, and the coordinates follow this sequence:\n",
"\n",
"1. **First Corner**: (`west`, `south`)\n",
"2. **Second Corner**: (`west`, `north`)\n",
"3. **Third Corner**: (`east`, `north`)\n",
"4. **Fourth Corner**: (`east`, `south`)\n",
"5. **Closing the Polygon**: Back to the first corner (`west`, `south`)\n",
"1. **First Corner**: (`west` (min Long), `south`(min Lat) )\n",
"2. **Second Corner**: (`west`(min Long), `north` (max Lat) )\n",
"3. **Third Corner**: (`east` (max Long), `north` (max Lat) )\n",
"4. **Fourth Corner**: (`east`(max Long), `south` (min Lat) )\n",
"5. **Closing the Polygon**: Back to the first corner (`west` (min Long), `south`(min Lat) )\n",
"\n",
"So, the WKT `POLYGON` would be constructed as:\n",
"\n",
Expand Down Expand Up @@ -154,10 +154,10 @@
"source": [
"# Convert the OpenEO Bounding Box to WKT\n",
"bbox = {\n",
" 'east': 16.6379,\n",
" 'south': 59.5735,\n",
" 'west': 16.4677,\n",
" 'north': 59.6588,\n",
" 'east': 16.6379, # max long\n",
" 'south': 59.5735, # min lat\n",
" 'west': 16.4677, # min long\n",
" 'north': 59.6588, # max lat\n",
"}\n",
"wkt = f\"POLYGON(({bbox['west']} {bbox['south']}, {bbox['west']} {bbox['north']}, {bbox['east']} {bbox['north']}, {bbox['east']} {bbox['south']}, {bbox['west']} {bbox['south']}))\"\n",
"\n",
Expand Down Expand Up @@ -217,10 +217,10 @@
"\n",
"# Define the bounding box (using the earlier example for Västerås)\n",
"bbox = {\n",
" 'east': 16.6379,\n",
" 'south': 59.5735,\n",
" 'west': 16.4677,\n",
" 'north': 59.6588,\n",
" 'east': 16.6379, # max long\n",
" 'south': 59.5735, # min lat\n",
" 'west': 16.4677, # min long\n",
" 'north': 59.6588, # max lat\n",
"}\n",
"\n",
"# Create a Shapely box object from the bounding box coordinates\n",
Expand Down

0 comments on commit c900991

Please sign in to comment.