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

Home » Public Forums » archive » Projected Meter Space and mapCoord
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: Projected Meter Space and mapCoord [message #88970 is a reply to message #88968] Wed, 09 July 2014 07:30 Go to previous messageGo to previous message
morganlsilverman is currently offline  morganlsilverman
Messages: 46
Registered: February 2013
Member
On Wednesday, July 9, 2014 10:00:34 AM UTC-4, David Fanning wrote:
> Morgan Silverman writes:
>
>
>
>> I'm looking more just for clarification so that I can understand further. I understand that latitude and longitude points have to be converted into projected meter space to be correctly placed on a map background. I've run my code 2 different ways, first using
>
>>
>
>> city_lats = [ 39.75, 41.29, 33.84, 45.49, 47.62, 40.22]
>
>> city_lons = [ -105.00, -95.92, -84.38, -122.69, -122.34, -74.78]
>
>> xy = mapCoord->Forward(city_lons, city_lats)
>
>> city_x = Reform(xy[0,*])
>
>> city_y = Reform(xy[1,*])
>
>> cgPlotS, city_x[j], city_y[j], Color=Byte(j+1), PSYM=16, SYMSize=2.0
>
>>
>
>>
>
>> and the second just using
>
>> city_lats = [ 39.75, 41.29, 33.84, 45.49, 47.62, 40.22]
>
>> city_lons = [ -105.00, -95.92, -84.38, -122.69, -122.34, -74.78]
>
>> cgPlotS, city_lons(j), city_lats(j), map=mapCoord, Color=Byte(j+1), PSYM=16, SYMSize=2.0
>
>>
>
>> mapCoord has already been defined in both cases. I just abbreviated the code for simplicity. It appears that both graph exactly the same and look correct. I'm wondering if this is true and if it matters what method you use or if one is better, mapCoord->Forward(lon,lat) or cgPlotS, map=mapCoord. I would like to do things correctly and not incorrect but still have them seem to work for some reason.
>
>
>
> The two methods are identical. When you pass mapCoord to cgPlotS in the
>
> second method, it simply allows you to perform the caculations you do by
>
> hand in the first method.
>
>
>
> My point was that if you have NaNs in the latitude and logitude vectors
>
> that you are trying to display, neither of these two methods can be
>
> completed successfully. It sounded to me as if that was the problem you
>
> are experiencing.
>
>
>
> 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.")

Yes, that was the problem and I understood you're response. Duh, of course NaN's can't be projected onto metered space in a map. I should have realized that. I guess I just assumed they would be skipped over. The whole metered space issue still had me thinking about these two methods though, hence the new question for clarification.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: cgPlotS problem with NaN values in data
Next Topic: Reading Multiple .sav files with same variable names for graphing

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

Current Time: Fri Oct 10 15:46:36 PDT 2025

Total time taken to generate the page: 1.28428 seconds