1

I am having trouble converting an ERDAS (*.img) file into a headerless binary file.

I want to use those images in the TIMESAT program.

I'm trying to do this in IDRISI 32 but there is an error saying:

minimum values exceeds maximum value

during the process.

What does the error mean, or how can I achieve this task using another program? For example, ArcGIS, ENVI, ERDAS, but not GDAL (with which I am unfamiliar). It seems I need to write some code to work in GDAL and I am not a coder.

  • It could be as simple that the values in your original img raster are not binary [0,1]. Or, the conversion program that you are using is also having to convert the NoData values which are not within a binary bit range. – Jeffrey Evans Mar 11 '14 at 13:57
  • I have created a NDVI file from ENVI 4.8 >> Transform >> NDVI >> saved Output data type as Floating Point. Next i use Basic Tools >> Stretch Data >> Stretch Type Linear >> Stretch range By value -0.036 to 0.833 which is my NDVI range to Output DATA Range to 0 to 255. and saved the DATA Type as Integer as Timesat requires 8 bit integer(0-255). I did same procedure for my 5 NDVI files, except i used different Stretch range By value X to Y, based on their own range. Now i try to open them in TIMESAT >> TSM GUI I created a txt file with the absolute path like this 5 C:\timesat31\NDVI\trial\ndvi_1 – Laxmi Karki Aug 29 '14 at 5:56
  • @LaxmiKarki Welcome to GIS SE! You may have noticed that your answer has been converted to a comment (see above). This is because it did not address this question and appeared to be trying to ask a new one. I recommend that you consider researching/asking it as a new question. – PolyGeo Aug 29 '14 at 6:38
2

with ArcGIS, you can use the "copy raster" tools to convert the img file in a ENVI file. Just write ".dat" at the end of the name of the output file. With ENVI you just need to convert to an ENVI file and use the file that has no extension.

By the way, you don't need to write code to use gdal. You can install it with OSGEO4W, then you type

gdal_translate -of ENVI -co INTERLEAVE=BSQ myimage.img myoutputimage.dat 

and it runs the conversion.

  • Thank you Radouxju. I tried to do it in ARCGIS as you suggested. Are you sure output image with .dat extention can be created in ARCGIS. when I write .dat at the end of output file, Arcgis give me a caution with extention of output file. – Bandrush Barda Mar 12 '14 at 10:25
  • Do you have experience in TIMESAT program? can TIMESAT read ENVI file? I have ENVI file (without extention) which have a .hdr file together. Which one of them can be read in Timesat? – Bandrush Barda Mar 12 '14 at 10:29
  • I work with ArcGIS 10 and I don't have this warning. Concerning your second question, the TIMESAT help states that it can use ENVI file (the one without extension) if it is BSQ (which is most of the time the case) and single band. So yes you can also do it with ENVI (in fact it would be more straightforward) – radouxju Mar 12 '14 at 10:38
  • I want to convert my .img file into headerless binary format with 8 bit-unsigned integer. Original image is erdas .img file with 32 bit float. ARCGIS can convert this 32-bit float image into 8 bit-unsigned integer. I'm just trying to figure out why copy raster tool cannot run the process. – Bandrush Barda Mar 12 '14 at 10:38
  • Ok, thank you. So I'll do it using my ENVI files. Thank you very much for your help. – Bandrush Barda Mar 12 '14 at 10:40

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.