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

Home » Public Forums » archive » Re: Shape to raster
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: Shape to raster [message #78138 is a reply to message #78123] Wed, 26 October 2011 10:02 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Fabzou writes:

> My apologies if this question has been posted before.
>
> I have a polygon vector file from which I know the coordinates within a
> grid (subpixel precision) and I would like to make a mask from this
> information (within the polygon = 1, outside = 0).
>
> The only idea I have to make this would be to use the polyfill command
> and use the produced image as a mask. This would be easy to do, but I am
> worried about the precision I would reach by doing so (I am concerned
> about the line thickness, for example, and all the things that make of
> POLYFILL and DRAW_ROI a plot routine and not a "shape to raster" routine).
>
> Maybe there is an IDL equivalent to the ENVI "Build mask from a ROI" tool?

I wouldn't worry about it. I'd put my polygon
into an IDLanROI object and use the ComputeMask
method to create the mask. I'm pretty sure this
is exactly what ENVI does, or pretty close to it. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ENVI Navigating GeoTiff Image Incorrectly?
Next Topic: Re: unable to set time attribute for netCDF in IDL

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

Current Time: Fri Oct 10 12:30:40 PDT 2025

Total time taken to generate the page: 2.10614 seconds