Re: cgmap_gshhs.pro minarea issue [message #86615 is a reply to message #86613] |
Fri, 22 November 2013 09:37   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
>
> Takis.Velissariou@deep-c.org writes:
>
>> also
>> polygonArea = header.area * 0.1 * 10^magnitude
>> should change to:
>> polygonArea = header.area * 0.1 (for version lt 9)
>> and
>> polygonArea = header.area * 10^(-magnitude) (for version gt 9)
>
> I still don't know what to make of this. The documentation is screwy.
>
> At one place in the header file you find this:
>
> "area magnitude scale p (as in 10^p) = flag >> 26.
> We divide area by 10^p."
>
> Then, in the next couple of lines, you find this *twice*:
>
> "Area of polygon in km^2 * 10^p for this resolution file"
>
> We need to know the area of known polygons to be able to tell.
OK, I agree with you about dividing by the magnitude, too. :-)
I have an example using the Australian polygon, and I get the correct
area for the land mass only by dividing: header.area / 10^magnitude.
I'm currently having trouble with v. 2.1 of the GSHHS data. Clearly the
header is different from the one for v 2.0 and 2.2, but I can't figure
out what it is. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|