0

I have multiple ascii files(each of size of 21 MB) of a model output. These files are supposed to contain the water depth along the river channel and floodplain. It should contain either -9999.0 or the water depths such as 0.286350857461523, 0.011189999598471 or 1.61005678663024 and so on. However, files are corrupt and could not be converted into raster in Arcmap since they have an additional very small values such as 9.99984780443711E-06, 9.99965258958573E-06, and 1.00E-05. And these numbers are all across the file. Could anybody tell me how can I identify and replace these values by -9999.0 using Notepad++ or in Excel. Any comments would be highly appreciated. Thanks in advance !

2
  • Ctrl+H
  • Find what: \d+\.\d+E-\d+
  • Replace with: -9999.0
  • UNcheck Match case
  • check Wrap around
  • check Regular expression
  • Replace all

Explanation:

\d+     : 1 or more digits
\.      : a dot
\d+     : 1 or more digits
E-\d+   : E- followed by  1 or more digits

Result for example numbers given:

-9999.0
0.286350857461523
0.011189999598471
1.61005678663024
-9999.0
-9999.0
-9999.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.