Skip to content
Commits on Source (4)
## Version 1.2.3 (2019/06/06)
### Issues Closed
* [Issue 27](https://github.com/pytroll/pycoast/issues/27) - Not compatible with pyproj>=2.2.0 ([PR 28](https://github.com/pytroll/pycoast/pull/28))
In this release 1 issue was closed.
### Pull Requests Merged
#### Bugs fixed
* [PR 28](https://github.com/pytroll/pycoast/pull/28) - Fix pyproj 2.2+ is_latlong compatibility ([27](https://github.com/pytroll/pycoast/issues/27))
In this release 1 pull request was closed.
## Version 1.2.2 (2019/01/16)
### Pull Requests Merged
......
pycoast (1.2.2+dfsg-2) UNRELEASED; urgency=medium
* Team upload.
pycoast (1.2.3+dfsg-1) unstable; urgency=medium
[ Bas Couwenberg ]
* Move image symlinks to -doc package too.
(closes: #924212)
* Move image symlinks to -doc package too
(closes: #924212).
* Update gbp.conf to use --source-only-changes by default.
[ Antonio Valentino ]
* Suggest python-pycoast-doc
* New upstream release.
* Suggest python-pycoast-doc.
-- Bas Couwenberg <sebastic@debian.org> Sun, 10 Mar 2019 12:18:04 +0100
-- Antonio Valentino <antonio.valentino@tiscali.it> Sun, 07 Jul 2019 16:56:47 +0000
pycoast (1.2.2+dfsg-1) unstable; urgency=medium
......
......@@ -32,6 +32,16 @@ except ImportError:
logger = logging.getLogger(__name__)
class Proj(pyproj.Proj):
"""Wrapper around pyproj to add in 'is_latlong'."""
def is_latlong(self):
if hasattr(self, 'crs'):
return self.crs.is_geographic
# pyproj<2.0
return super(Proj, self).is_latlong()
class ContourWriterBase(object):
"""Base class for contourwriters. Do not instantiate.
......@@ -182,7 +192,7 @@ class ContourWriterBase(object):
# Area and projection info
x_size, y_size = image.size
prj = pyproj.Proj(proj4_string)
prj = Proj(proj4_string)
x_offset = 0
y_offset = 0
......@@ -512,7 +522,7 @@ class ContourWriterBase(object):
# Area and projection info
x_size, y_size = image.size
prj = pyproj.Proj(proj4_string)
prj = Proj(proj4_string)
# Calculate min and max lons and lats of interest
lon_min, lon_max, lat_min, lat_max = _get_lon_lat_bounding_box(area_extent, x_size, y_size, prj)
......@@ -690,7 +700,7 @@ class ContourWriterBase(object):
foreground = Image.new('RGBA', (x_size, y_size), (0, 0, 0, 0))
# Lines (coasts, rivers, borders) management
prj = pyproj.Proj(area_def.proj4_string)
prj = Proj(area_def.proj4_string)
if prj.is_latlong():
x_ll, y_ll = prj(area_def.area_extent[0], area_def.area_extent[1])
x_ur, y_ur = prj(area_def.area_extent[2], area_def.area_extent[3])
......@@ -814,7 +824,7 @@ class ContourWriterBase(object):
# Area and projection info
x_size, y_size = image.size
prj = pyproj.Proj(proj4_string)
prj = Proj(proj4_string)
# read shape file with points
# Sc-Kh shapefilename = os.path.join(self.db_root_path,
......
......@@ -23,9 +23,9 @@ def get_keywords():
# setup.py/versioneer.py will grep for the variable names, so they must
# each be defined on a line of their own. _version.py will just call
# get_keywords().
git_refnames = " (HEAD -> master, tag: v1.2.2)"
git_full = "5ca4031ada1fadfb61c8dd73259d33c4f69498b4"
git_date = "2019-01-16 10:44:14 -0600"
git_refnames = " (HEAD -> master, tag: v1.2.3)"
git_full = "eaddef8f6c84867137c6e32d5a89e629fa012fc2"
git_date = "2019-06-06 10:16:30 -0500"
keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
return keywords
......