0

I received raster data from a grid of 1100 by 1000 meters with a resolution of 1 meter. It is the output of EFC-400 software showing the field strength around power lines. The data is currently in Excel format and I want to use the raster in ArcGIS 10.2. In Excel the raster looks as follows:

x\y[m]                          
B[uT]   0   1   2   3   4   5   6  
0   0.01    0.01    0.01    0.01    0.01    0.01    0.01  
1   0.01    0.01    0.01    0.01    0.01    0.01    0.01  
2   0.01    0.01    0.01    0.01    0.01    0.01    0.01  

etc...

The second row indicates the y-direction (0-1000 meters) and the first column indicates the x-direction (0-1100 meters). I assumed that removing the first 2 rows and the first column and subsequently adding the header that ArcGIS expects would make the import in ArcGIS possible. I added the following header to the Excel sheet:

ncols 1001
nrows 1101
xllcorner 0
yllcorner 0
cellsize 1
nodata -9999

and saved the data in .txt format. In Notepad I made sure that all datavalues were separated by a space. In ArcGIS I used 'ASCII to raster'. This gave no error message, but the shape of the resulting raster does not resemble the original raster: ascii to raster error

The raster should show two powerlines approaching each other. Anyone any suggestions?

3
  • 1
    Have you tried to convert from points to raster? Perhaps creating a TIN surface from the points then converting to a DEM... Still not entirely sure what the situation is
    – LMHall
    Oct 25, 2013 at 15:32
  • 1
    Have you been able to convert a tiny (say 5x5) ASCII file in Esri ASCII raster format to a raster using your technique? If that causes issues for you (which it should not) then that will be easier to help with than the bigger dataset.
    – PolyGeo
    Oct 28, 2013 at 9:16
  • I tried a small grid and converted it without problems. Perhaps the problem is in saving the large Excel worksheet as a .txt file. I used to save as .dbf format but that option is disabled in the latest Excel versions. Oct 28, 2013 at 10:45

1 Answer 1

2

From Esri grid - Wikipedia:

ESRI ASCII Raster format

So your example should be converted like this:

NCOLS 7
NROWS 3
XLLCORNER xxxxxxx
YLLCORNER yyyyyyy
CELLSIZE 1
NODATA_VALUE -9999
0.01 0.01 0.01 0.01 0.01 0.01 0.01
0.01 0.01 0.01 0.01 0.01 0.01 0.01
0.01 0.01 0.01 0.01 0.01 0.01 0.01

where xxxxxxx and yyyyyyy are the coordinates of the lower left corner of your raster. Change the other values accordingly. Hope this helps.

5
  • Conversion of the data now works fine. I had to transpose the data followed by sorting the rownumbers from high to low to get to the desired datastructure for ArcGIS. However, the main problem was in saving as a .txt file in Excel. I finally saved as 'Text (Tab delimited)' and then replaced all the tabs with spaces in Notepad. That did the trick! Oct 28, 2013 at 11:17
  • There's the SAGA GIS Grid tools --> Grid orientation tool that is able to mirror (horizontally or vertically) grid values. Oct 28, 2013 at 13:27
  • Actually, the main problem was in getting nrows and ncols correct: I bet they did not have the same values in your successful try that they had on the initial failed try.
    – whuber
    Oct 28, 2013 at 13:28
  • No, nrows and ncols was not the main problem. I was able to mirror in Excel; a mirror tool in ArcGIS would have been handy though. Main problem was converting the excel datasheet to .txt file. There are several possibilities to save as .txt. It is important to carefully check in Notepad or a different editor what Excel has done to your data. Oct 28, 2013 at 13:44
  • 1
    There's a Mirror tool in ArcGIS too. Oct 28, 2013 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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