Having ASCII issues between exporting Raster to ASCII file from GIS into MATLAB. Columns and Rows not matching

2956
1
12-12-2015 09:12 AM
ElizabethMerton
New Contributor

I am trying to export layers from an analysis using raster calculator in ArcGIS. I have 6 files, all have the same extent, cell size and number of rows and columns. I have tried exporting (RASTER TO ASCII) individually as well as tried batch exporting. However, when I import into MATLAB to run my statistical analysis, the imported files have different numbers of columns and rows. Any idea how to solve this? Or whether this sounds more like a GIS issue or Matlab issue?

Thanks,

L

0 Kudos
1 Reply
DanPatterson_Retired
MVP Emeritus

Sounds like a Matlab issue.  If you can confirm that your files do indeed do have the same number of rows and columns etc, I would check to see how Matlab reads ASCII files since ASCII files is sometimes a loose reference to a particular file format.

As a test, I would suggest creating an ascii file in a text editor so that it is rectangular, perhaps 8 rows by 10 columns, give the file a real world header and see how matlab reads that file.  This will determine whether, the file is being read correctly, row order versus column order and whether the origin is being properly identified.  Also, what is the actual difference in the number of rows and columns.

This link contains the format obviously, you could just change the number of rows and columns etc and away you go for testing.

Re: �??ASCII To Raster�?� is not working!

0 Kudos