

|
 |
| Programming > Idl-pvware > Re: pollyfillv,... |
|
| << Topic |
< Post |
Post 3 of 7 Topic 5594 of 6457
|
Post > |
Topic >> |
Re: pollyfillv, area of a blob, etc...
by David Fanning <news@[EMAIL PROTECTED]
>
Apr 3, 2008 at 08:16 AM
| JP writes:
> by the way, I would be happy if at least I could calculate the
> centroid of each polygon and then get the array index for each
> centroid.
I suppose the centroid of the polygon is the average
value of it vertices, or maybe the mean if you didn't
want to overbias outliers. In your case, you could
probably just pick a vertex and be pretty darn close
to it. :-)
> But I don't know how to calculate the centroid (Coyote's procedure
> CENTROID works with an array, not with a polygon).
>
> And if I had the centroid, how do I easily get the array index?
ROUND would probably work. :-)
Or, if you polygons were in some other coordinate system,
you will have to convert from that system to device coordinates.
CONVERT_COORD will be helpful.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Se****e ma de ni thui. ("Perhaps thou speakest truth.")


|
7 Posts in Topic:
|
JP <guerschman@[EMAIL |
2008-04-02 23:16:04 |
|
JP <guerschman@[EMAIL |
2008-04-02 23:38:44 |
|
David Fanning <news@[E |
2008-04-03 08:16:33 |
|
JP <guerschman@[EMAIL |
2008-04-03 16:08:07 |
|
James Kuyper <jameskuy |
2008-04-04 11:03:20 |
|
David Fanning <news@[E |
2008-04-04 06:31:24 |
|
pgrigis@[EMAIL PROTECTED] |
2008-04-04 07:18:51 |
|
Post A Reply:

|
|
|
|