Closed falkamelung closed 5 years ago
dem_rsmas.py --ssara does not work for Kilauea. The reason is probably that \( .\d+.\d+,\s+(.\d+.\d+) can understand - 89 but not -110
\( .\d+.\d+,\s+(.\d+.\d+)
- 89
-110
(Pdb) tempstr 'Driver: GMT/GMT NetCDF Grid Format\nFiles: dem.grd\n dem.grd.aux.xml\nSize is 12383, 17319\nCoordinate System is:\nGEOGCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",6378137,298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["degree",0.0174532925199433,\n AUTHORITY["EPSG","9122"]],\n AUTHORITY["EPSG","4326"]]\nOrigin = (-157.492638888885921,20.841249999994808)\nPixel Size = (0.000277777777778,-0.000277777777778)\nCorner Coordinates:\nUpper Left (-157.4926389, 20.8412500) (157d29\'33.50"W, 20d50\'28.50"N)\nLower Left (-157.4926389, 16.0304167) (157d29\'33.50"W, 16d 1\'49.50"N)\nUpper Right (-154.0529167, 20.8412500) (154d 3\'10.50"W, 20d50\'28.50"N)\nLower Right (-154.0529167, 16.0304167) (154d 3\'10.50"W, 16d 1\'49.50"N)\nCenter (-155.7727778, 18.4358333) (155d46\'22.00"W, 18d26\' 9.00"N)\nBand 1 Block=12383x1 Type=Int16, ColorInterp=Gray\n NoData Value=-32768' (Pdb) re.findall(r'Upper Right\s+\( .\d+.\d+,\s+(.\d+.\d+)\)', tempstr) []
After removing one blank it works:
(Pdb) re.findall(r'Upper Right\s+\(.\d+.\d+,\s+(.\d+.\d+)\)', tempstr) ['20.8412500']
Unfortunately, if the blank is gone it doe snot work for smaller long values.
This one works fine (with blank) (Galapagos);
(Pdb) tempstr 'Driver: GMT/GMT NetCDF Grid Format\nFiles: dem.grd\n dem.grd.aux.xml\nSize is 10657, 10476\nCoordinate System is:\nGEOGCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",6378137,298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["degree",0.0174532925199433,\n AUTHORITY["EPSG","9122"]],\n AUTHORITY["EPSG","4326"]]\nOrigin = (-93.290416666655176,1.437638888881118)\nPixel Size = (0.000277777777778,-0.000277777777778)\nCorner Coordinates:\nUpper Left ( -93.2904167, 1.4376389) ( 93d17\'25.50"W, 1d26\'15.50"N)\nLower Left ( -93.2904167, -1.4723611) ( 93d17\'25.50"W, 1d28\'20.50"S)\nUpper Right ( -90.3301389, 1.4376389) ( 90d19\'48.50"W, 1d26\'15.50"N)\nLower Right ( -90.3301389, -1.4723611) ( 90d19\'48.50"W, 1d28\'20.50"S)\nCenter ( -91.8102778, -0.0173611) ( 91d48\'37.00"W, 0d 1\' 2.50"S)\nBand 1 Block=10657x1 Type=Int16, ColorInterp=Gray\n NoData Value=-32768' (Pdb) re.findall(r'Upper Right\s+\( .\d+.\d+,\s+(.\d+.\d+)\)', tempstr) [' 1.4376389']
Alex fixed this
dem_rsmas.py --ssara does not work for Kilauea. The reason is probably that
\( .\d+.\d+,\s+(.\d+.\d+)
can understand- 89
but not-110
After removing one blank it works:
Unfortunately, if the blank is gone it doe snot work for smaller long values.
This one works fine (with blank) (Galapagos);