comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Batch ENVI Resize Data (Spatial/Spectral)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Batch ENVI Resize Data (Spatial/Spectral) [message #71195] Mon, 07 June 2010 07:52 Go to previous message
titan is currently offline  titan
Messages: 59
Registered: March 2006
Member
On Jun 4, 8:31 pm, Chris Jengo <cje...@gmail.com> wrote:
> To subset using map coordinates, you first need to convert your map
> coordinates into pixel coordinates for the image of interest.  Create
> an array containing the lat/lon coordinates for a box containing Italy
> (or whatever map subset you want), and push these through
> ENVI_CONVERT_FILE_COORDINATES to retrieve their respective pixel
> coordinates.  Then construct your DIMS vector to RESIZE_DOIT by
> finding the min and max boundaries of the returned vertices (in pixel
> coordinates) that form a polygon.

Maybe I found another way:
;; Matrix test
asc_proj=ENVI_GET_PROJECTION(FID=asc_r_fid,PIXEL_SIZE=asc_ps )
italy=asc_img[715:768,72:123]
italy_r_fact=[0.041397525,0.040697525]
output_pixel_size=[1000.000, 1000.000]
mc_italy_proj=[0.0D,0.0D,589086.84,5564990.5]
output_italy_proj = ENVI_MAP_INFO_CREATE(PROJ=asc_proj,
PS=output_pixel_size, MC=mc_italy_proj)

;; Enter the subset of Italy
ENVI_ENTER_DATA,
italy,MAP_INFO=output_italy_proj,PIXEL_SIZE=output_pixel_siz e,$
BNAMES='Italy_file',R_FID=italy_r_fid

ENVI_FILE_QUERY,italy_r_fid,DIMS=italy_res_data_dims

; Resize_doit it in order to see it bigger
ENVI_DOIT, 'RESIZE_DOIT', FID=italy_r_fid, DIMS=italy_res_data_dims,
POS=0,$
INTERP=0, RFACT=italy_r_fact,
OUT_BNAME='Italy',/IN_MEMORY, R_FID=italy_resize_r_fid
ENVI_FILE_QUERY,italy_resize_r_fid,DIMS=italy_resize_dims,
NS=italy_resize_ns, NL=italy_resize_nl, NB=italy_resize_nb
;;----------------------------
so the trick was in the RFACT value!! setting the proper value I can
start from the 54x52 image and then I get the 1304x1278 image

It seems correct to me also comparing the result with the file that I
get manually..
What do you think?
PS In any case thanks for your support!!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: CONTOUR: how to get rid of that zero tick name?
Next Topic: Testing if HDF5 file is corrupt

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:25:20 PDT 2025

Total time taken to generate the page: 0.00435 seconds