|
Re: Convert polylines to polygons [message #46775 is a reply to message #46768] |
Mon, 19 December 2005 05:36  |
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
|
|
|