Select to view content in your preferred language

TIF to ASCII conversion leads to no data values on the ASCII file

417
4
03-05-2024 03:24 AM
kedarbhaskar
New Contributor

Hi, I want to convert my raster (.TIF) to ASCII using the "Raster to ASCII" tool in ArcGIS pro (v 3.2.0)

The .TIF was a floating point 32-bit. When I convert the data it goes into the default folder. Now, when I open this newly converted ASCII file in ArcGIS (or notepad) it is full of no data values. Then , I realized that I had to calculate statistics and build pyramids for the ASCII file for it to display correctly in ArcGIS Pro. Now the problem is when I build pyramids and statistics it creates a new file and the orinal .asc file seems to be unaltered. Meaning in ArcGIS the ASCII matches the TIF perfectly but upon opening it on a text editor (Notepad, Notepadd ++) it shows only NoData values (see image).
ASCII_error.png
There are no input parameter (other than input raster) for the Raster to ASCII tool so I am not sure where I am going wrong.

My ultimate goal is to use the ASCII file in Maxent to build ecological niche models

Solutions tried

- I converted several different TIFs into .asc but I had the same problem - the data displayed fine on ArcGIS (after pyramids were built) but the file when opened on notepad continued to show noData values (-9999)

Converted the .TIF on QGIS (same result as first solution)

-Built pyramids and statistics using their respective geoprocessing tools rather automatically when adding the raster into my map  (same result)

-Converted the ASCII to TIF then back to ASCII  (same result)

This is my first time using ASCII file so maybe I am misunderstanding something? Any help would be appreciated and please let me know if you need additional information.

 

Thanks 🙂

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor

 Was there no nodata values in the tif to begin with?

Is the text ascii representation completely -9999?

Did you create a new tif with statistics built?  I am not sure that

Calculate Statistics (Data Management)—ArcGIS Pro | Documentation

would fix the original asc file unless you created a new one


... sort of retired...
0 Kudos
KedarB
by
New Contributor

Yes, there were some nodata values in the TIF but the ASCII representation is full of -9999.

I created a TIF file and calculated stats/pyramids before converting to ASCII, but it still shows only NoData values throughout the file.

I also built pyramids for the ASCII directly using two different approaches - the first was to drag and drop the ASCII into my map to let pyramids/stats be calculated automatically. The second was to calculate stats/ pyramids using the respective geoprocessing  tools. While both approaches fix the ASCII within ArcGIS, neither seem to modify the original ASCII file. In the image below notice how the OVR file (which I believe has the pyramid and stats info) has been modified at a later time? In short, the problem is  when the .TIF is converted to ASCII pyramids and stats are not embedded - even if the .TIF has stats and pyramids built.
ASCIIandRelatedFiles.png
In the below image of the contents pane, both the TIF and the ASCII match but when I  open the associate ASCCII file it has only NoData values.
asciivstif.png
Thank you so much for your response Dan, I hope I was able to clarify the problem I had. Let me know if you need more info.

Warm regards, Kedar

0 Kudos
DanPatterson
MVP Esteemed Contributor

Tech Support would be your best bet now, since I can't find any bugs listed regarding conversion to ascii on the open support site.  Good luck.


... sort of retired...
0 Kudos
KedarB
by
New Contributor

Right. Thank you Dan. I'll post whatever solution I find.

Cheers 🙂

0 Kudos