X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 10 Nov 2011 04:20 PM by  anon
Output Extent in envi_convert_file_map_projection
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:5
New Member


--
10 Nov 2011 04:20 PM
    I'm trying to write a program to automatically reproject files in the same way that I do it interactively. The interactive gui as a section to select the output projection and Map extent. However, the batch procedure, ENVI_CONVERT_FILE_MAP_PROJECTION, which seems batch procedure for the same functionality does not seem to allow the output extent to be specified. It only allows a the dimensions of the input scene/subscene to be defined. How does the interactive gui support this? Are there other undocumented parameters available or some other procedure I should be using? Thanks, Solar

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    11 Nov 2011 08:07 AM
    You handle this using the DIMS keyword. You need to figure out the DIMS you need for the map extents you want. If you know the coordinates of the extents, then you can use ENVI CONVERT_FILE_COORINATES to find the image coordinates to use based on those map extents.

    Deleted User



    New Member


    Posts:5
    New Member


    --
    15 Nov 2011 03:50 PM
    That doesn't quite produce the desired result. The output extents of course form a rectangle, but in the input coordinate system, those extents from a parallelogram. In only being able to specify the min,max X and Y dimensions, I must set a rectangle that encloses the output extents' parallelogram but which will include some data that will not really be in the output scene. So this approach might reduce the amount of extra data, but it's not really going to produce an exact match to an existing file. In one of my searches on this issue I saw a suggestion of perhaps using theenvi_layer_stacking_doit with the /exclusive flag. It will cause the output to include the 'sample' band in the output data which could subsequently be removed. Seems to me there must be a better, albeit undocumented, way to do this since the interactive GUI can do it and the layer stacking process does something very similar.

    Deleted User



    New Member


    Posts:
    New Member


    --
    16 Nov 2011 08:00 AM
    Unfortunately, ENVI_CONVERT_FILE_MAP_PROJECTION does not currently provide a mechanism to reproduce the behavior that you can get in interactive ENVI by choosing the "Match Existing File" option. I agree that it would be great if it did. I think you might be right that the fastest way to get what you want would be to use ENVI_LAYER_STACKING with the /exclusive flag. Your inputs would be your image of interested and another image in the desired projection to which you want to match the extent. Then after the layer stacking remove the one extra band that you used to specify the extent. - Peg
    You are not authorized to post a reply.