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

Home » Public Forums » archive » CGMAP_GRID: Lattitude lines
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
CGMAP_GRID: Lattitude lines [message #88188] Thu, 27 March 2014 05:27 Go to next message
Oliver Angelil is currently offline  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 #88189 is a reply to message #88188] Thu, 27 March 2014 05:45 Go to previous messageGo to next message
Oliver Angelil is currently offline  Oliver Angelil
Messages: 11
Registered: November 2013
Junior Member
btw, i'm working with MODIS sinusoidal data. Basically working from this: https://www.idlcoyote.com/map_tips/modis_overlay.html
Re: CGMAP_GRID: Lattitude lines [message #88192 is a reply to message #88188] Thu, 27 March 2014 06:14 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Oliver Angelil writes:

> 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?

Does your command look like this:

cgMap_Grid, /Label, /cgGrid, Map=mapObj

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 #88193 is a reply to message #88192] Thu, 27 March 2014 06:30 Go to previous messageGo to next message
Oliver Angelil is currently offline  Oliver Angelil
Messages: 11
Registered: November 2013
Junior Member
When using:
cgMap_Grid, /Label, /cgGrid, Map=mapObj

I see the error: 'Current plotting device must have map coordinates'

Cheers,

Oliver
Re: CGMAP_GRID: Lattitude lines [message #88194 is a reply to message #88193] Thu, 27 March 2014 06:42 Go to previous messageGo to next message
Oliver Angelil is currently offline  Oliver Angelil
Messages: 11
Registered: November 2013
Junior Member
And my original command was:
cgMap_Grid, MAP_STRUCTURE=map, COLOR='white', LATDELTA=2, LONDELTA=2, THICK=2, /CGGRID
Re: CGMAP_GRID: Lattitude lines [message #88195 is a reply to message #88193] Thu, 27 March 2014 06:54 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Oliver Angelil writes:

> When using:
> cgMap_Grid, /Label, /cgGrid, Map=mapObj
>
> I see the error: 'Current plotting device must have map coordinates'

When was the last time you updated your Coyote Library? This morning?

http://www.idlcoyote.com/code_tips/fixcoyoteprogram.php

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 #88196 is a reply to message #88195] Thu, 27 March 2014 07:00 Go to previous messageGo to next message
Oliver Angelil is currently offline  Oliver Angelil
Messages: 11
Registered: November 2013
Junior Member
Roughly 4 months ago.
Re: CGMAP_GRID: Lattitude lines [message #88197 is a reply to message #88196] Thu, 27 March 2014 07:04 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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 #88199 is a reply to message #88197] Thu, 27 March 2014 07:28 Go to previous messageGo to next message
Oliver Angelil is currently offline  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 Go to previous messageGo to next message
David Fanning is currently offline  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 Go to previous messageGo to next message
Oliver Angelil is currently offline  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 Go to previous message
David Fanning is currently offline  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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Gridded MODIS lat/lon array
Next Topic: Hankel (Fourier-Bessel) Transform

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

Current Time: Wed Oct 08 15:23:35 PDT 2025

Total time taken to generate the page: 0.00792 seconds