From: <js...@us...> - 2007-11-04 15:57:22
|
Revision: 4103 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4103&view=rev Author: jswhit Date: 2007-11-04 07:57:19 -0800 (Sun, 04 Nov 2007) Log Message: ----------- remove debug code Modified Paths: -------------- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py Modified: trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py =================================================================== --- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-04 06:09:22 UTC (rev 4102) +++ trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-04 15:57:19 UTC (rev 4103) @@ -777,10 +777,6 @@ lons.append(lonend) lats.append(-90.) poly = PolygonShape(zip(lons,lats)) - #b = npy.asarray(poly.boundary) - #import pylab - #pylab.fill(b[:,0],b[:,1],'b') - #pylab.show() else: continue if poly.intersects(self._boundarypolyll): @@ -797,8 +793,6 @@ b = npy.asarray(psub.coords) blons = b[:,0]; blats = b[:,1] bx, by = self(blons, blats) - #if (bx > 1.20).any() or (by > 1.e20).any(): - # continue polygons.append(zip(bx,by)) polygon_types.append(type) except: @@ -814,6 +808,8 @@ b = npy.asarray(poly.coords) bx, by = self(b[:,0], b[:,1]) mask = npy.logical_and(bx<1.e20,by<1.e20) + # if less than two points are valid in + # map proj coords, skip this geometry. if sum(mask) <= 1: continue if name == 'gshhs': poly = PolygonShape(zip(bx,by)) @@ -823,23 +819,6 @@ bx = npy.compress(mask, bx) by = npy.compress(mask, by) poly = LineShape(zip(bx,by)) - if 0: - import pylab - print poly - pp = self._boundarypolyxy.intersection(poly) - print name, pp - a = npy.asarray(self._boundarypolyxy.boundary) - pylab.plot(a[:,0],a[:,1],'b') - pylab.plot(bx,by,'r') - if hasattr(pp,'geoms'): - px = pp.geoms - else: - px = [pp] - for p in px: - c = npy.asarray(p.boundary) - pylab.fill(c[:,0],c[:,1],'g') - pylab.show() - raise SystemExit(0) if self._boundarypolyxy.intersects(poly): try: poly = self._boundarypolyxy.intersection(poly) @@ -858,7 +837,6 @@ polygon_types.append(type) return polygons, polygon_types - def _getmapboundary(self): """ define map boundary polygon (in lat/lon coordinates) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |