X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 19 Feb 2013 03:20 AM by  anon
Subsetting images automatically using a shapefile!
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
19 Feb 2013 03:20 AM
    Hey, I managed to write a programm with IDL to automatically load and project .hdf files in a folder and to save those files as geotiff. I would now like to subset all the image, which ar of global coverage, in order to save storage space and to focus on the area of interest. Does anyone already have a script to subet images using a shapefile as reference? I am using IDL 8 and therefore would like to use shapefiles not .evf files or the ROIs. Any help appreciated. Greetings Stef

    Deleted User



    New Member


    Posts:
    New Member


    --
    28 Feb 2013 09:46 AM
    You can probably do this by loading the shapefile using the IDLffShape object, and parsing through the entities in the file to see what the data range is, and then subset your images accordingly. For more documentation on that check out this page: http://www.exelisvis.com/docs/IDLffShape.html Alternatively, if you have an ENVI+IDL license, you can use the ENVI api to get this information more quickly. For example: e = envi() file = filepath('states.shp', subdir=['examples', 'data']) vector = e.openvector(file) print, vector.DATA_RANGE This will give you the data range of the shapefile, which you could then use to subset. In the case of states.shp, the data are in lat-lon coordinates. Does this help, is this what you are looking for? -Josh ExelisVIS
    You are not authorized to post a reply.