Skip to content

Commit

Permalink
updated to v1.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Severin committed Apr 29, 2020
1 parent 8e30a20 commit 094ca78
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
10 changes: 6 additions & 4 deletions Examples/00_basic_workflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@
{
"data": {
"text/plain": [
"<matplotlib.axes._axes.Axes at 0x250a3737940>"
"<matplotlib.axes._axes.Axes at 0x19ae9c85190>"
]
},
"execution_count": 3,
Expand Down Expand Up @@ -524,12 +524,14 @@
"---\n",
"# Draw exclusions with a basemap\n",
"\n",
"Be careful to not use a too-high zoom level!"
"Be careful to not use a too-high zoom level!\n",
"\n",
"Also don't forget about using the right attribution"
]
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand All @@ -544,7 +546,7 @@
}
],
"source": [
"ax = ec.drawWithSmopyBasemap(zoom=11, figsize=(40,20), attribution=\"© OpenStreetMap contributors\")"
"ax = ec.drawWithSmopyBasemap(zoom=11, figsize=(40,20))"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion glaes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""The Geospatial Land Availability for Energy Systems (GLAES) model is intended for land eligbility analysis in any context"""

__version__ = "1.1.5"
__version__ = "1.1.6"

from .core import util
from .core.priors import Priors
Expand Down
5 changes: 1 addition & 4 deletions glaes/core/ExclusionCalculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def draw(s, ax=None, goodColor="#9bbb59", excludedColor="#a6161a", legend=True,
# Done!!
return axh1.ax

def drawWithSmopyBasemap(s, zoom=4, excludedColor=(166 / 255, 22 / 255, 26 / 255, 128 / 255), ax=None, figsize=None, smopy_kwargs={}, attribution="© OpenStreetMap contributors", attribution_size=12, **kwargs):
def drawWithSmopyBasemap(s, zoom=4, excludedColor=(166 / 255, 22 / 255, 26 / 255, 128 / 255), ax=None, figsize=None, smopy_kwargs=dict(attribution="© OpenStreetMap contributors", attribution_size=12), **kwargs):
"""
This wrapper around the original ExclusionCalculator.draw function adds a basemap bethind the drawn eligibility map
Expand Down Expand Up @@ -522,9 +522,6 @@ def drawWithSmopyBasemap(s, zoom=4, excludedColor=(166 / 255, 22 / 255, 26 / 255
ax, srs, bounds = s.region.extent.drawSmopyMap(zoom, ax=ax, **smopy_kwargs)
s.draw(ax=ax, srs=srs, goodColor=[0, 0, 0, 0], excludedColor=(166 / 255, 22 / 255, 26 / 255, 128 / 255), **kwargs)

if attribution is not None:
ax.text(1, 0, attribution, transform=ax.transAxes, ha="right", va="bottom", fontsize=attribution_size)

return ax

@property
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

setup(
name='glaes',
version='1.1.5',
version='1.1.6',
author='Severin Ryberg',
url='https://github.com/FZJ-IEK3-VSA/glaes',
packages=find_packages(),
include_package_data=True,
install_requires=[
"geokit>=1.2.5",
"geokit>=1.2.6",
"gdal>2.0.0,<3.0.0",
"numpy",
"descartes",
Expand Down

0 comments on commit 094ca78

Please sign in to comment.