Changeset 27530
- Timestamp:
- 01/19/23 05:47:30 (2 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/sealevelmodel.py
r27458 r27530 241 241 self.eltransitions.append(meshintersect3d(xe, ye, ze, xei, yei, zei, 'force', force)) 242 242 243 self.earth.solidearth.transfercount[self.transitions[i]] = self.earth.solidearth /transfercount[self.transitions[i]] + 1243 self.earth.solidearth.transfercount[self.transitions[i]] = self.earth.solidearth.transfercount[self.transitions[i]] + 1 244 244 245 245 for i in range(len(self.icecaps)): -
issm/trunk-jpl/src/m/coordsystems/epsg2proj.py
r27523 r27530 20 20 21 21 #First, get GDAL version 22 subproc_args = "gdalsrsinfo --version | awk '{print $2}' | cut -d '.' -f1" 23 subproc = subprocess.Popen(subproc_args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) 24 outs, errs = subproc.communicate() 25 outs = outs.decode() 26 errs = errs.decode() 27 print(errs != '', errs == '', errs) 28 if errs != '': 29 raise RuntimeError("epsg2proj: call to gdalsrsinfo failed: {}".format(errs)) 30 31 version_major = int(outs) 32 33 subproc_args = "gdalsrsinfo epsg:{} | command grep PROJ.4 | tr -d '\n' | sed 's/PROJ.4 : //'".format(epsg) 22 #subproc_args = "gdalsrsinfo --version | awk '{print $2}' | cut -d '.' -f1" 23 subproc_args = "projinfo -o PROJ -q epsg:{}".format(epsg) 34 24 subproc = subprocess.Popen(subproc_args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) 35 25 outs, errs = subproc.communicate() 36 26 if errs != '': 37 raise RuntimeError("epsg2proj: call to gdalsrsinfo failed: {}".format(errs)) 38 39 if version_major == 1: 40 outs = outs[1:-1] 27 raise RuntimeError("epsg2proj: call to projinfo failed: {}".format(errs)) 41 28 42 29 return outs
Note:
See TracChangeset
for help on using the changeset viewer.