Skip to content

Commit

Permalink
fix is_latlng bug (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickhand authored and philippjfr committed Nov 4, 2019
1 parent 9088e98 commit 6689045
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions geoviews/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def check_crs(crs):
--------
>>> p = check_crs('+units=m +init=epsg:26915')
>>> p.srs
'+units=m +init=epsg:26915 '
'+proj=utm +zone=15 +datum=NAD83 +units=m +no_defs'
>>> p = check_crs('wrong')
>>> p is None
True
Expand Down Expand Up @@ -452,7 +452,10 @@ def proj_to_cartopy(proj):

proj = check_crs(proj)

if proj.is_latlong():
if hasattr(proj, 'crs'):
if proj.crs.is_geographic:
return ccrs.PlateCarree()
elif proj.is_latlong(): # pyproj < 2.0
return ccrs.PlateCarree()

srs = proj.srs
Expand Down

0 comments on commit 6689045

Please sign in to comment.