X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 23 Feb 2017 03:36 PM by  anon
Is there bug in ASCII Grid expot?
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
23 Feb 2017 03:36 PM
    I've got geotiff 20x30 pixels (obtained from ENVI "save as") for which ENVI generated the world file tfw: 0.5 0 0 -0.5 20.25 49.75 So 49.75 is the uper left pixel center value (i.e. according to https://en.wikipedia.org/wiki/World_file) the tiff file has also geotags (dumped with exiftool): Pixel Scale : 0.5 0.5 0 Model Tie Point : 0 0 0 20 50 0 Geo Tiff Version : 1.1.0 GT Model Type : Geographic GT Raster Type : Pixel Is Area Geographic Type : WGS 84 Geog Linear Units : Linear Meter Geog Angular Units : Angular Degree when I export this file to ASCII Grid format (ESRI) it has in header yllcorner 35.500 As one can simply calculate from world file: yllcorner = ylrcenter - "pixel size in the y-direction"/2 - (ysize -1)*"pixel size in the y-direction" = 49.75-0.5/2 - (30-1)*0.5 = 35 so yllcorner 35.500 is corresponding to the upper boundary of the lower left pixel, it's not the correct yllcorner value! (I guess someone missed -1 in the formula)

    Deleted User



    Basic Member


    Posts:228
    Basic Member


    --
    20 Mar 2017 12:58 PM
    You may be right, but I'd like to be sure by asking you for details about exactly how you created the ASCII file that has the incorrect yllcorner value in its header. You mention that this is an ESRI file? But it is also an ASCII file? Was this generated right in the standard ENVI 5.4 interface, using File > Save As > Save As ASCII? Best, Peg

    Deleted User



    New Member


    Posts:
    New Member


    --
    03 Apr 2017 05:27 PM
    >You mention that this is an ESRI file? But it is also an ASCII file? Was this generated right in the standard ENVI 5.4 interface, using File > Save As > Save As ASCII? Yes, the ASCII file was generated using classic ENVI File > Save As > Save As ASCII, (ok), in appeared menu the type was set to "Arcgis ASCII GRID".
    You are not authorized to post a reply.