X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 23 Nov 2014 03:17 PM by  anon
obtaining pixel size programmaticaly?
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
23 Nov 2014 03:17 PM
    Hi folks, I have been 'away' from IDL/ENVI for some time, and coming back up to speed from a three year hiatus! Glad to see the ENVI API appears much improved and expanded from what I remember - however, I am now a bit 'lost'! I have the need to read in a ENVI raster programmatically in an IDL function. I can see from the documentation how to open the raster, how to obtain the metadata.. but I am not seeing how to view the header information programmatically, where the pixel size is (hopefully) defined. Can anyone help? Thank you.

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    24 Nov 2014 11:22 AM
    The spatial reference is stored in the SpatialRef property. For example: ENVI>raster = e.openraster(file) ENVI> spatialref=raster.spatialref ENVI> print, spatialref ENVISTANDARDRASTERSPATIALREF COORD_SYS_CODE = 0 COORD_SYS_STR = 'PROJCS["UTM_Zone_13N",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-105.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]' PIXEL_SIZE = 30.000000, 30.000000 ROTATION = 0.00000000 TIE_POINT_MAP = 274785.00, 4906905.0 TIE_POINT_PIXEL = 0.00000000, 0.00000000 or to get just the pixel size: ENVI> print, spatialref.pixel_Size 30.000000 30.000000
    You are not authorized to post a reply.