Select to view content in your preferred language

output a raster as a text file matrix

556
3
07-02-2011 03:53 PM
CatrionaFyffe
Emerging Contributor
Hi,

I would like to be able to output the values of a raster (e.g. the elevation data in a DEM) as a text file so that the values are a matrix. I really don't know where to start! I have used many of the functions of GIS but don't know how to get raw data out of it.

Any help would be much appreciated.

Thanks,

Cat
0 Kudos
3 Replies
EricRice
Esri Regular Contributor
Hi Cat,

I think you should check out the Raster to ASCII tool for this.  An example of the resulting raster is below.  You can open the ascii file in any text editor.

    NCOLS 480
    NROWS 450
    XLLCORNER 378922
    YLLCORNER 4072345
    CELLSIZE 30
    NODATA_VALUE -32768
    43 2 45 7 3 56 2 5 23 65 34 6 32 54 57 34
    35 45 65 34 2 6 78 4 2 6 89 3 2 7 45 23 5 ...

Regards,
Eric
0 Kudos
StephenBarrow
Emerging Contributor
If you are still after this I wrote one and posted it to the online scripts pages. It takes a raster and converts it to a matrix.


Stephen
0 Kudos
CatrionaFyffe
Emerging Contributor
Thanks - the Raster to ASCII tool works fine,

Catriona
0 Kudos