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

Home » Public Forums » archive » Need a vector generalization procedure in ENVI
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Need a vector generalization procedure in ENVI [message #39163] Mon, 19 April 2004 00:54
wl2776 is currently offline  wl2776
Messages: 13
Registered: February 2004
Junior Member
Hi all.
I have a file with vector polygons.
The vertice coordinates are in map projection (stereographic in my
case).
I convert this file to the format of ESRI Shapefile. Vectors in this
format can have a set of attributes.
I need to write to the attribute a mean value of image pixels
surrounded by the polygon.

I create a ROI, transfer map coordinates to the image pixel
coordinates using envi_convert_file_coordinates, assign these image
pixel coordinates to the ROI, then use envi_get_roi_data to get array
of pixel values.

But envi_get_roi_data returns the error: "Not enough valid and unique
points specified".
The reason is: the sample polygon has 4 vertices and surrounds 2
pixels.
After transferring map coordinates to image coordinates I get the
arrays looking like following: xpts=[3155, 3156, 3156, 3155, 3155],
ypts=[24, 24, 26, 26, 24]

As far as I can understand, Envi_get_roi_data needs the arrays like
xpts=[3155,3155], ypts=[24, 25]

Could anyone advise me some algorithm to transform a polygon from map
coordinates to image coordinates?
The polygons can be of various form, not only rectangular, but small
in size.
I tried search in help systems of both IDL and EnVI, but didn't find
anything.

Thanks in advance.
[Message index]
 
Read Message
Previous Topic: Re: IDL Save Files: A Journey into Craig's World
Next Topic: Test mail

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

Current Time: Sat Oct 11 14:48:34 PDT 2025

Total time taken to generate the page: 0.64110 seconds