Skip to content

Commit adb9e07

Browse files
author
Jeff Whitaker
committed
Merge pull request #133 from TormodLandet/master
Allow relocation of pyproj data files
2 parents e353bf2 + f8d7ba3 commit adb9e07

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/mpl_toolkits/basemap/pyproj.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,11 @@
235235
"sphere": {'a':6370997.0,'b':6370997.0,'description':"Normal Sphere"},
236236
}
237237

238-
pyproj_datadir = os.sep.join([os.path.dirname(__file__), 'data'])
238+
if 'BASEMAPDATA' in os.environ:
239+
pyproj_datadir = os.environ['BASEMAPDATA']
240+
else:
241+
pyproj_datadir = os.sep.join([os.path.dirname(__file__), 'data'])
242+
239243
if not os.path.isdir(pyproj_datadir):
240244
msg="proj data directory not found. Expecting it at: %s"%pyproj_datadir
241245
raise IOError(msg)

0 commit comments

Comments
 (0)