X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 11 Feb 2013 01:01 PM by  anon
Envi_convert_file_coordinates inaccurate?
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
11 Feb 2013 01:01 PM
    Hello- I'm a fairly inexperienced IDL user, but I'm working with someone who has considerably more experience and we're both stumped. Here's what we're trying to do. It's a bit complicated (at least to me!), so I hope this makes sense: We have an ENVI file classified into 5 classes. Our hope is to randomly generate 30 lat/long points within EACH class (30 points/class), so that the random points can be identified in ArcGIS and compared to a high-resolution image to validate the classification. Good so far? Here's what we did in IDL, an example for one of the 5 pixel values... let's say a value of 3: opened file info, extracted dimensions, etc found locations of all the pixels with a value of 3 in a 1-D matrix converted these to a 2-D matrix of locations (X and Y values) generate a random sample of 30 of these pixel locations Extracted the locations as UTM coordinates converted the UTM coordinates into actual lat/long values (decimal degrees) export these coordinates as a text file That all went off without a hitch. Then when I opened the classified image in arc (I tried both a .tif and an ENVI format file) and searched the output coordinates, they were inaccurate. Not far off (they were in the correct geographical area), but the coordinates did not represent the correct pixel type, or indeed, any single consistent pixel type. Does anyone know where we went wrong? Is it just an issue of accuracy, or switching from ENVI to Arc? I'd be happy to supply the code, there's just sort of a lot of it. I'm new to IDL and these forums, so my apologies if I was too general. Thanks! Cheers, Emma

    Deleted User



    New Member


    Posts:
    New Member


    --
    11 Feb 2013 01:54 PM
    Hi Emma, Maybe you need to use another ENVI routine. It looks like you used 'envi_convert_file_coordinates, maybe you need to use 'envi_convert_projection_coordinates' instead.

    Deleted User



    New Member


    Posts:
    New Member


    --
    12 Feb 2013 09:17 AM
    Sorry, that's actually my mistake! I should have included "Envi_convert_projection_coordinates" in the title as well, because that's the command we used to convert the UTMs to lat/longs. we used envi_convert_file_coordinates earlier in the code to translate the x/y coorinates of the pixels in question into UTMs. Should we use convert_projection_coordinates for both? Thanks. Emma
    You are not authorized to post a reply.