Re: Display radar data? [message #62858] |
Thu, 09 October 2008 00:40 |
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  |
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 #62864 is a reply to message #62861] |
Wed, 08 October 2008 08:35  |
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  |
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  |
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  |
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.")
|
|
|