File tree Expand file tree Collapse file tree 2 files changed +10229
-24
lines changed Expand file tree Collapse file tree 2 files changed +10229
-24
lines changed Original file line number Diff line number Diff line change 149
149
}
150
150
151
151
# create dictionary that maps epsg codes to Basemap kwargs.
152
- if hasattr (pyproj , 'datadir' ): # pyproj version 2+
153
- epsgf = os .path .join (pyproj .datadir .get_data_dir (), 'epsg' )
154
- if not os .path .isfile (epsgf ):
155
- raise_exception = (
156
- FileNotFoundError if sys .version_info [0 ] == 3 else RuntimeError
157
- )
158
- if os .name == 'posix' :
159
- epsgf = os .environ .get ('PROJ_LIB' , '/usr/share/proj' )
160
- elif 'PROJ_LIB' in os .environ :
161
- epsgf = os .environ ['PROJ_LIB' ]
162
- else :
163
- raise raise_exception (
164
- ("Cannot find '%s'," % epsgf )
165
- + " and PROJ_LIB environment variable is not set."
166
- )
167
- epsgf = os .path .join (epsgf , 'epsg' )
168
- if not os .path .isfile (epsgf ):
169
- raise raise_exception (
170
- ("Cannot find '%s'," % epsgf )
171
- + " nor epsg file under pyproj's internal datadir."
172
- )
173
- else : # older versions of pyproj
174
- epsgf = os .path .join (pyproj .pyproj_datadir , 'epsg' )
175
- epsgf = open (epsgf )
152
+ epsgf = open (os .path .join (basemap_datadir , 'epsg' ))
176
153
epsg_dict = {}
177
154
for line in epsgf :
178
155
if line .startswith ("#" ):
You can’t perform that action at this time.
0 commit comments