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

Home » Public Forums » archive » Islands disappear with cgmap_GSHHS and GSHHS 2.3.0
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
Islands disappear with cgmap_GSHHS and GSHHS 2.3.0 [message #89568] Mon, 27 October 2014 09:19 Go to next message
Sverre Solberg is currently offline  Sverre Solberg
Messages: 18
Registered: February 2005
Junior Member
Hi,
perhaps I have missed some basic info in some of the gshhs discussion, but I have a problem that islands seem to disappear when using cgmap_gshhs (newest library release of data and procedures). This is a code example. There should be lots of small islands here. Am I doing something wrong?
----------------------------------------------------------
datafile = 'gshhg-bin-2.3.0/gshhs_h.b'
P0lat = 60
P0lon = 10
minlat = 58.5
maxlat = 59.5
minlon = 5
maxlon = 6.5

cgDisplay, 800, 1200
pos = [0.1,0.1, 0.9, 0.8]
cgMap_Set, P0lat, P0lon, Position=pos, /transverse_mercator,Color='black',$
limit = [minlat, minlon, maxlat, maxlon]

cgColorfill, [pos[0], pos[0], pos[2], pos[2], pos[0]], $
[pos[1], pos[3], pos[3], pos[1], pos[1]], $
/Normal, Color='sky blue'
cgMap_GSHHS, datafile, Fill=1, Level=4, Color='black', /Outline
map_grid,/label

cgPlotS, [pos[0], pos[0], pos[2], pos[2], pos[0]], $
[pos[1], pos[3], pos[3], pos[1], pos[1]], $
/Normal, Color='black', Thick=2
Re: Islands disappear with cgmap_GSHHS and GSHHS 2.3.0 [message #89569 is a reply to message #89568] Mon, 27 October 2014 09:37 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sverre Solberg writes:

> perhaps I have missed some basic info in some of the gshhs discussion, but I have a problem that islands seem to disappear when using cgmap_gshhs (newest library release of data and procedures). This is a code example. There should be lots of small islands here. Am I doing something wrong?

This seems to be a problem in calculating the area of the polygon
(always turning out to be 0). I have to do something else right now, but
I'll get back to this when I can.

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.")
Re: Islands disappear with cgmap_GSHHS and GSHHS 2.3.0 [message #89572 is a reply to message #89568] Mon, 27 October 2014 12:08 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sverre Solberg writes:

> perhaps I have missed some basic info in some of the gshhs discussion, but I have a problem that islands seem to disappear when using cgmap_gshhs (newest library release of data and procedures). This is a code example. There should be lots of small islands here. Am I doing something wrong?

OK, I haven't tried this with gsshg 2.3, but it seems to work with gsshg
2.2.3 and 2.3.2. The only change I made to your code was to add a
MINAREA=0 keyword to the cgMap_GSHHS call.

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.")
Re: Islands disappear with cgmap_GSHHS and GSHHS 2.3.0 [message #89575 is a reply to message #89572] Tue, 28 October 2014 01:38 Go to previous message
Sverre Solberg is currently offline  Sverre Solberg
Messages: 18
Registered: February 2005
Junior Member
Great, thanks. The MINAREA = 0 fixed it. I used an older version of your lib previously and then it worked without the MINAREA setting.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: rescaling draw widgets: is there an easier solution to this?
Next Topic: get size of function graphics objects

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

Current Time: Wed Oct 08 11:33:35 PDT 2025

Total time taken to generate the page: 0.00459 seconds