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

Home » Public Forums » archive » Re: How to spatial subset files by ENVI vector file (EVF) or other shapefile ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: How to spatial subset files by ENVI vector file (EVF) or other shapefile ? [message #57583] Mon, 17 December 2007 06:01
wita is currently offline  wita
Messages: 43
Registered: January 2005
Member
On Dec 17, 1:58 pm, Lucia <lucia...@gmail.com> wrote:
> I can spatial subset files by EVF in ENVI, but I need to do it by IDL.

Dear Lucia,

I have never tested this, but it seems to me that you need to use
ENVI_GET_ROI_DIMS_PTR to get the dimensions pointer for the ROI.
So you basically carry out the following steps:
roi_ids = envi_get_roi_ids(fid = fid)
dims = [envi_get_roi_dims_ptr(roi_ids[0]), 0, 0, 0, 0]
data = envi_get_data(fid=fid, dims=dims)

then you can write the data to a file and set up an ENVI header file
for it. I haven't figured out how to find the map coordinates for the
selected subset but I guess the ENVI manual will give a clue
somewhere.

with best regards,

Allard
Re: How to spatial subset files by ENVI vector file (EVF) or other shapefile ? [message #57586 is a reply to message #57583] Mon, 17 December 2007 05:22 Go to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Dec 17, 1:58 pm, Lucia <lucia...@gmail.com> wrote:
> I can spatial subset files by EVF in ENVI, but I need to do it by IDL.

i did not understand exatly you'r problem but just:
1- save your EVF file to .shp file ( it si easy in ENVI)
2-see this article from David: http://www.dfanning.com/map_tips/shapefile.html
chears
Dav
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: DELVAR in IDL7.0 for windows
Next Topic: How to spatial subset files by ENVI vector file (EVF) or other shapefile ?

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

Current Time: Wed Oct 08 19:52:55 PDT 2025

Total time taken to generate the page: 0.00458 seconds