CGMAP_GRID: Lattitude lines [message #88188] |
Thu, 27 March 2014 05:27  |
Oliver Angelil
Messages: 11 Registered: November 2013
|
Junior Member |
|
|
I cannot get my latitude lines to run all the way through my map (from left to right borders). They seem to just run along the middle of the image. Anyone have any ideas?
Thank you in advance.
Oliver
|
|
|
|
|
|
|
|
|
|
Re: CGMAP_GRID: Lattitude lines [message #88199 is a reply to message #88197] |
Thu, 27 March 2014 07:28   |
Oliver Angelil
Messages: 11 Registered: November 2013
|
Junior Member |
|
|
I just updated the coyote library - and it seems to not have helped.
If you have the patience to look into this issue a bit further, here's the relevant part of the code:
cgIMAGE, data, /KEEP, POSITION=Position
map = Obj_New('cgMap', 'sinusoidal', /GCTP, SPHERE_RADIUS=6371007.181D, /OnImage)
uv = Map_Proj_Forward([lslon, tslon, rslon, bslon], [lslat, tslat, rslat, bslat], MAP_STRUCTURE=map->GetMapStruct())
map -> SetProperty, XRANGE=[uv[0,0], uv[0,2]], YRANGE=[uv[1,3], uv[1,1]], /Draw
cgMap_Continents, MAP_STRUCTURE=map, /Countries, /Continents, COLOR='white', /HIRES
cgMap_Grid, /cgGrid, Map=mapObj, color='white', thick=2
void = cgSnapshot(FILENAME=output_dir+'MOD10A1_'+date+'.png', /NODIALOG)
On Thursday, 27 March 2014 15:04:58 UTC+1, David Fanning wrote:
> Oliver Angelil writes:
>
>
>
>> Roughly 4 months ago.
>
>
>
> Ah. Could explain it. :-)
>
>
>
> 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: CGMAP_GRID: Lattitude lines [message #88200 is a reply to message #88199] |
Thu, 27 March 2014 07:39   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Oliver Angelil writes:
> cgMap_Grid, /cgGrid, Map=mapObj, color='white', thick=2
Can you try this using *your* map object. :-)
cgMap_Grid, /cgGrid, Map=map, color='white', thick=2
Does that help?
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: CGMAP_GRID: Lattitude lines [message #88201 is a reply to message #88200] |
Thu, 27 March 2014 07:53   |
Oliver Angelil
Messages: 11 Registered: November 2013
|
Junior Member |
|
|
Yes I tried that, but it gives me exactly the same image produced when using my original line:
cgMap_Grid, /cgGrid, Map_structure=map, color='white', thick=2
I have emailed you the image so you can see what exactly about the latitude lines I am trying to correct.
Oliver
On Thursday, 27 March 2014 15:39:08 UTC+1, David Fanning wrote:
> Oliver Angelil writes:
>
>
>
>> cgMap_Grid, /cgGrid, Map=mapObj, color='white', thick=2
>
>
>
> Can you try this using *your* map object. :-)
>
>
>
> cgMap_Grid, /cgGrid, Map=map, color='white', thick=2
>
>
>
> Does that help?
>
>
>
> 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: CGMAP_GRID: Lattitude lines [message #88203 is a reply to message #88201] |
Thu, 27 March 2014 08:20  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Oliver Angelil writes:
>
> Yes I tried that, but it gives me exactly the same image produced when using my original line:
>
> cgMap_Grid, /cgGrid, Map_structure=map, color='white', thick=2
>
> I have emailed you the image so you can see what exactly about the latitude lines I am trying to correct.
cgMap_Grid tries to figure out which latitude and longitude lines are
passing trough the image "scene" by sampling the image at 25 points
around its perimeter. When the lines are at angles, as these are, the
algorithm can become confused about the lat and lon range that it uses
to create default grid lines. In these cases, you pretty much have to
abandon the automatic grid lines and define them specifically yourself.
Pass them into the program with LONS and LATS keywords.
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.")
|
|
|