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

Home » Public Forums » archive » cgmap_gshhs.pro minarea issue
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: cgmap_gshhs.pro minarea issue [message #86614 is a reply to message #86594] Fri, 22 November 2013 09:34 Go to previous messageGo to previous message
pvelissariou is currently offline  pvelissariou
Messages: 4
Registered: November 2013
Junior Member
On Thursday, November 21, 2013 7:09:28 PM UTC-5, pvelis...@fsu.edu wrote:
> Apparently, in the recent versions (>= 2.2) of gshhs database
>
> the units of the header.area changed from 1/10 km^2 to 1/10 m^2.
>
> For cgmap_gshhs to work properly the line:
>
> polygonArea = header.area * 0.1 (ok for gshhs < 2.2)
>
> should be changed to:
>
> polygonArea = header.area * 1.0e-7 (for gshhs >= 2.2)

David,

From gshhs.c file we have:
line = (h.area) ? 0 : 1; /* Either Polygon (0) or Line (1) (if no area) */
if (version >= 9) { /* Variable magnitude for area scale */
m = h.flag >> 26;
scale = pow (10.0, (double)m); /* Area scale */
}
area = h.area / scale; /* Now im km^2 */
f_area = h.area_full / scale; /* Now im km^2 */

so, in the cgmap_gshhs.pro
we should have something like:
magnitude = 10.0 ^ ( - ISHFT(f, -26) ) for version >= 9
and
magnitude = 0.1 for version < 9

and
polygonArea = header.area * magnitude

in order to produce the correct results for the polygon area
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL 8.2, read pixel value along a surface
Next Topic: Exelis code library down - someone has G

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

Current Time: Sat Oct 11 06:53:25 PDT 2025

Total time taken to generate the page: 1.19855 seconds