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

Home » Public Forums » archive » Re: Convert pixel coordinates to LAT/LON
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: Convert pixel coordinates to LAT/LON [message #58272] Fri, 25 January 2008 06:10
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gary writes:

> Thanks for the guidance. Is there a projection that can be used for a
> radar image? Some sort of projection that lays out a radial pattern
> from a given lat/lon? I think that's what I need.

I think what I would do is use a UTM map projection.
It is simple enough to find out what zone your
radar is in. (Just use the longitude to determine
zone.) Put the center of the UTM projection at 0,0,
which would then correspond to your center lat/lon.
The extent of the UTM would be the range of the radar.
The resolution you can determine from image actual image.
The resolution/range = scale.

Once all of that is known, you could make arrays of
latitude and longitude for all your pixels, as in this
article:

http://www.dfanning.com/map_tips/pixel_to_ll.html

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: Convert pixel coordinates to LAT/LON [message #58289 is a reply to message #58272] Thu, 24 January 2008 11:59 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gary writes:

> Thanks for the guidance. Is there a projection that can be used for a
> radar image? Some sort of projection that lays out a radial pattern
> from a given lat/lon? I think that's what I need.

I have some ideas about this, but I'm going to be
in meetings all afternoon. I'll think about it.

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Convert pixel coordinates to LAT/LON [message #58291 is a reply to message #58289] Thu, 24 January 2008 11:05 Go to previous message
Gary is currently offline  Gary
Messages: 4
Registered: January 2008
Junior Member
Thanks for the guidance. Is there a projection that can be used for a
radar image? Some sort of projection that lays out a radial pattern
from a given lat/lon? I think that's what I need. Thanks again.
Re: Convert pixel coordinates to LAT/LON [message #58292 is a reply to message #58291] Thu, 24 January 2008 10:38 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gary writes:

> Many apologies for what might be an entirely newbie question, which I
> am. I am trying to determine the lat/lon of a given position on a
> radar image. I have the lat/lon of the center point of the image. The
> image space covers less than a full degree of longitude and covers
> double the latitude. The difference in the meters/degree of latitude
> over the range is ~6m, so I linearly scale latitude over the range of
> pixels. For the longitude, I determine the meters/degree longitude for
> the given latitude (determine from the linear scaling). I then
> multiply the pixel coordinates by the meters/degree, and determine the
> degree offset from the edge of the image and add this to the lat or
> lon of the edge of the image. I understand all of this might be
> tedious and better served by using IDL's mapping functions, however,
> I'm trying to do all of this in as simple a fashion as possible in a
> GUI I've cobbled together which is already growing. I'm looking for
> some validation of this as a method that will provide reasonable
> results. Of course, I recognize I may have failed to supply addequate
> info, so please let me know if anything else is required. Thanks

Well, depending upon what kind of map projection this
image is in you are either going to be in the ball park
with this approach, or wildly wrong. It is unlikely that
you are going to be spot on. :-)

Assuming you are not using a Mercator projection (since we
are on the verge of proclaiming the one normally used
in IDL worthless), I think you would be MUCH further
ahead to use a map projection to make these calculations.

http://www.dfanning.com/map_tips/pixel_to_ll.html

It's really pretty easy if you can get the map projection
set up correctly.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (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: Convert pixel coordinates to LAT/LON
Next Topic: Choosing Mercator Map Projections

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

Current Time: Thu Oct 09 04:36:24 PDT 2025

Total time taken to generate the page: 1.11820 seconds