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

Home » Public Forums » archive » Re: Display radar data?
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
Re: Display radar data? [message #62858] Thu, 09 October 2008 00:40
Dave[4] is currently offline  Dave[4]
Messages: 38
Registered: December 2007
Member
On Oct 8, 10:32 pm, David Fanning <n...@dfanning.com> wrote:
> Dave writes:
>>     I have some weather radar data, whose coordinates are distances
>> (kilometers) and angles to the radar station. So how can I convert
>> these local coordinates to longitude/latitude cordinates?  Please give
>> any clue.
>
> Set up a map projection of the area of interest with MAP_SET
> or MAP_PROJ_INIT. Then use CV_COORD to convert your data
> from polar coordinates to rectangular coordinates (which
> will be the data or lat/lon coordinates, in this case).
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Fanning, very thanks for your reply. Your answer is simple, but not
suit for my problem.
As Ciao says, high-precision is very important for radar data. Many
things should be considered, such like earth radius,
altitude of radar station and so on. Things going complex.
I find SPRINT code at http://www.mmm.ucar.edu/pdas/pdas.html, which is
a program to interpolate radar measurements taken at spherical
coordinates (range, azimuth, and elevation) to regularly-spaced
Cartesian or longitude-latitude grids. May be I should try it. Thanks
again.

DAVE
Re: Display radar data? [message #62860 is a reply to message #62858] Wed, 08 October 2008 07:59 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <MPG.2356726dd34c2ea398a4bd@news.giganews.com>,
David Fanning <news@dfanning.com> wrote:

> Dave writes:
>
>> I have some weather radar data, whose coordinates are distances
>> (kilometers) and angles to the radar station. So how can I convert
>> these local coordinates to longitude/latitude cordinates? Please give
>> any clue.
>
> Set up a map projection of the area of interest with MAP_SET
> or MAP_PROJ_INIT. Then use CV_COORD to convert your data
> from polar coordinates to rectangular coordinates (which
> will be the data or lat/lon coordinates, in this case).
>
> Cheers,
>
> David

I think LL_ARC_DISTANCE is a lot easier and the source code is available.

LL_ARC_DISTANCE could be improved by making it handle double precision
inputs better (!DTOR is single precision), by replacing the awkward WHILE loops
with MOD operations, and by vectorizing it.

Ken
Re: Display radar data? [message #62861 is a reply to message #62860] Wed, 08 October 2008 06:41 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article
<d8a8332c-2a1d-46be-9a3a-ba7263d4f4ae@b38g2000prf.googlegroups.com>,
Dave <daikan1998@tom.com> wrote:

> Dear friends:
>
> I have some weather radar data, whose coordinates are distances
> (kilometers) and angles to the radar station. So how can I convert
> these local coordinates to longitude/latitude cordinates? Please give
> any clue. Thanks.
>
> dave

LL_ARC_DISTANCE

What, that name wasn't obvious?

Ken Bowman
Re: Display radar data? [message #62864 is a reply to message #62861] Wed, 08 October 2008 08:35 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pgrigis@gmail.com writes:

> While I am sure that this strategy would work, that will be depriving
> the original
> poster of the joy of figuring out how to convert polar coordinates in
> a plane tangent
> to a sphere at a given point to spherical coordinates. Now, that's a
> beautiful
> geometry problem, isn't it?

It's beautiful, alright. But if your plane geometry texts
have been sitting on your shelf gathering dust, as mine
have, for the past 30+ years, it's easier to just call
the Young Genius away at college and let him figure it
out for you. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Display radar data? [message #62865 is a reply to message #62861] Wed, 08 October 2008 08:33 Go to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
pgri...@gmail.com wrote:
> David Fanning wrote:
>> Dave writes:
>>
>>> I have some weather radar data, whose coordinates are distances
>>> (kilometers) and angles to the radar station. So how can I convert
>>> these local coordinates to longitude/latitude cordinates? Please give
>>> any clue.
>>
>> Set up a map projection of the area of interest with MAP_SET
>> or MAP_PROJ_INIT. Then use CV_COORD to convert your data
>> from polar coordinates to rectangular coordinates (which
>> will be the data or lat/lon coordinates, in this case).
>
> While I am sure that this strategy would work, that will be depriving
> the original
> poster of the joy of figuring out how to convert polar coordinates in
> a plane tangent
> to a sphere at a given point to spherical coordinates. Now, that's a
> beautiful
> geometry problem, isn't it? Furthermore, if high-precision is not
> important,
> the problem may be simplified a bit by making the assumption that the
> earth is
> locally flat at the radar position, thus reducing the problem to
> converting plane
> coordinates from polar to cartesian...

In the latter approximation, a back of the envelope computation
yielded (you may want to double check this before actually using it)

lon=lon0+r/R*sin(alpha)*!radeg
lat=lat0+r/R*cos(alpha)/cos(lat0)*!radeg


Cheers,
Paolo

>
> Ciao,
> Paolo
>
>
>>
>> Cheers,
>>
>> David
>>
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Display radar data? [message #62866 is a reply to message #62861] Wed, 08 October 2008 08:13 Go to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
David Fanning wrote:
> Dave writes:
>
>> I have some weather radar data, whose coordinates are distances
>> (kilometers) and angles to the radar station. So how can I convert
>> these local coordinates to longitude/latitude cordinates? Please give
>> any clue.
>
> Set up a map projection of the area of interest with MAP_SET
> or MAP_PROJ_INIT. Then use CV_COORD to convert your data
> from polar coordinates to rectangular coordinates (which
> will be the data or lat/lon coordinates, in this case).

While I am sure that this strategy would work, that will be depriving
the original
poster of the joy of figuring out how to convert polar coordinates in
a plane tangent
to a sphere at a given point to spherical coordinates. Now, that's a
beautiful
geometry problem, isn't it? Furthermore, if high-precision is not
important,
the problem may be simplified a bit by making the assumption that the
earth is
locally flat at the radar position, thus reducing the problem to
converting plane
coordinates from polar to cartesian...

Ciao,
Paolo


>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Display radar data? [message #62867 is a reply to message #62861] Wed, 08 October 2008 07:32 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dave writes:

> I have some weather radar data, whose coordinates are distances
> (kilometers) and angles to the radar station. So how can I convert
> these local coordinates to longitude/latitude cordinates? Please give
> any clue.

Set up a map projection of the area of interest with MAP_SET
or MAP_PROJ_INIT. Then use CV_COORD to convert your data
from polar coordinates to rectangular coordinates (which
will be the data or lat/lon coordinates, in this case).

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: segmentation fault with ncdf_open
Next Topic: Open file from full address in IDL Workbench

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

Current Time: Wed Oct 08 18:56:37 PDT 2025

Total time taken to generate the page: 0.00622 seconds