Skip to content

Commit 4617ad5

Browse files
author
Jeff Whitaker
committed
Merge pull request #109 from jswhit/master
fix issue #108
2 parents aa12d7d + 3b423ec commit 4617ad5

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Changelog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ since version 1.0.6
22
-------------------
33
* support for rotated pole transormation (projection = 'rotpole').
44
* fix warpimage with projection = 'hammer' (issue 100).
5+
* fix tolerances for detecting jumps in meridians and parallels for
6+
cyl and rotpole projections (issue 108).
57

68
version 1.0.6 (git tag v1.0.6rel)
79
--------------------------------

lib/mpl_toolkits/basemap/__init__.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,9 +2318,10 @@ def drawparallels(self,circles,color='k',linewidth=1.,zorder=None, \
23182318
xd = (x[1:]-x[0:-1])**2
23192319
yd = (y[1:]-y[0:-1])**2
23202320
dist = np.sqrt(xd+yd)
2321-
#split = dist > 500000.
2322-
# normalize by radius of sphere
2323-
split = dist > 5000000./6370997.0*self.rmajor
2321+
if self.projection not in ['cyl','rotpole']:
2322+
split = dist > self.rmajor/10.
2323+
else:
2324+
split = dist > 1.
23242325
if np.sum(split) and self.projection not in _cylproj:
23252326
ind = (np.compress(split,np.squeeze(split*np.indices(xd.shape)))+1).tolist()
23262327
xl = []
@@ -2601,9 +2602,10 @@ def addlon(meridians,madd):
26012602
xd = (x[1:]-x[0:-1])**2
26022603
yd = (y[1:]-y[0:-1])**2
26032604
dist = np.sqrt(xd+yd)
2604-
#split = dist > 500000.
2605-
# normalize by radius of sphere
2606-
split = dist > 5000000./6370997.0*self.rmajor
2605+
if self.projection not in ['cyl','rotpole']:
2606+
split = dist > self.rmajor/10.
2607+
else:
2608+
split = dist > 1.
26072609
if np.sum(split) and self.projection not in _cylproj:
26082610
ind = (np.compress(split,np.squeeze(split*np.indices(xd.shape)))+1).tolist()
26092611
xl = []

0 commit comments

Comments
 (0)