Revision: 6788
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6788&view=rev
Author: jswhit
Date: 2009-01-16 16:22:16 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
added more informative error message when one of shapefile components can't be
found.
Modified Paths:
--------------
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-01-16
16:12:27 UTC (rev 6787)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-01-16
16:22:16 UTC (rev 6788)
@@ -1608,6 +1608,12 @@
vertices. If ``drawbounds=True`` a
matplotlib.patches.LineCollection object is appended to the tuple.
"""
+ if not os.path.exists('%s.shp'%shapefile):
+ raise IOError('cannot locate %s.shp'%shapefile)
+ if not os.path.exists('%s.shx'%shapefile):
+ raise IOError('cannot locate %s.shx'%shapefile)
+ if not os.path.exists('%s.dbf'%shapefile):
+ raise IOError('cannot locate %s.dbf'%shapefile)
# open shapefile, read vertices for each object, convert
# to map projection coordinates (only works for 2D shape types).
try:
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins