[geofence] add comments for equal area projection

main-solar-only
Richard Meadows 2016-02-03 19:18:14 +00:00
rodzic 19bd6dcf61
commit 038b16367a
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -78,13 +78,13 @@
"import mpl_toolkits.basemap.pyproj as pyproj # Import the pyproj module\n", "import mpl_toolkits.basemap.pyproj as pyproj # Import the pyproj module\n",
" \n", " \n",
"wgs84 = pyproj.Proj(proj='merc', ellps='WGS84') # LatLon with WGS84 datum\n", "wgs84 = pyproj.Proj(proj='merc', ellps='WGS84') # LatLon with WGS84 datum\n",
"ease_grid_global = pyproj.Proj(init='EPSG:3410')\n", "ease_grid_global = pyproj.Proj(init='EPSG:3410') # Equal area projection\n",
"\n", "\n",
"# lon/lat to x/y grid\n", "# lon/lat to x/y grid\n",
"def lonlat_to_ea_grid(outlines):\n", "def lonlat_to_ea_grid(outlines):\n",
" return [[ease_grid_global(point[0], point[1]) for point in outline] for outline in outlines]\n", " return [[ease_grid_global(point[0], point[1]) for point in outline] for outline in outlines]\n",
" \n", " \n",
" \n", "# define limits of EASE grid, at +-180E, and +-86N\n",
"def ease_limit_x(x):\n", "def ease_limit_x(x):\n",
" if x > 17334193.9437:\n", " if x > 17334193.9437:\n",
" return 17334193.9437\n", " return 17334193.9437\n",
@ -107,7 +107,7 @@
"language": "python", "language": "python",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"prompt_number": 13 "prompt_number": 18
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",