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

Home » Public Forums » archive » Re: Convert polylines to polygons
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: Convert polylines to polygons [message #46768] Mon, 19 December 2005 10:53
envi35@yahoo.ca is currently offline  envi35@yahoo.ca
Messages: 48
Registered: March 2005
Member
Hi Chris,
Thanks for your suggestion! Not bad at all! I'll try it out and let you
know whether it works for me.

Cheers, Jenny
Re: Convert polylines to polygons [message #46775 is a reply to message #46768] Mon, 19 December 2005 05:36 Go to previous message
cjengo is currently offline  cjengo
Messages: 28
Registered: June 1999
Junior Member
Jenny,
I believe it's going to take a bit of coding in ENVI, but nothing too
bad.

Use ENVI_EVF_OPEN to open your polyline layer, and ENVI_EVF_INFO to get
info such as projection, number of records, etc. Use ENVI_DEFINE_INIT
to create a new file that will contain your polygons. Loop through
each record (polyline) in your input file, reading the node coordinates
using ENVI_EVF_READ_RECORD. Make sure that your first and last point
are the same, as this is required for polygons. Use
ENVI_EVF_DEFINE_ADD_RECORD to add each new polygon to your new file.
When done, use ENVI_EVF_DEFINE_CLOSE to close and finalize your new
polygon file.

Chris
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: PLOTting into a 2-D array
Next Topic: exporting widget variables to an IDL command line

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

Current Time: Wed Oct 08 14:21:56 PDT 2025

Total time taken to generate the page: 0.00578 seconds