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

Home » Public Forums » archive » Map projections
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
Map projections [message #27969] Mon, 12 November 2001 07:55 Go to next message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
Is there any way to get at the coordinate conversion function for the
currently active map projection? I'm talking about a function that takes
a physical position in latitude and longitude coordinates, and converts
it into an image position using either data, device, or normal
coordinates. It doesn't matter which; once the position is in any one of
those forms, I can get the others by using CONVERT_COORD. Such functions
have to exist in order for IDL to perform mapping, but they don't seem
to be publically exposed. I'd also like to have access to the inverse
function, to get a lat/lon corresponding to an image position.

--
James Kuyper
MODIS Level 1 Lead
Science Data Support Team
(301) 352-2150
Re: map projections [message #58680 is a reply to message #27969] Wed, 13 February 2008 14:04 Go to previous messageGo to next message
jeffnettles4870 is currently offline  jeffnettles4870
Messages: 111
Registered: October 2006
Senior Member
On Feb 13, 3:53 pm, kishore1...@gmail.com wrote:
> Hi,
>
> Now, I am learning IDL programming.
> I have a model minimum temperature fraction values with longitude
> latitudinally, I am planning to plot on globe map with longitude and
> latitudinally.
> The data sets are like this
> longitude=float(65)
> latitude=float(32)
> temp_fra=float(65,32)
> These temp_frac values are in between 0.01 to 0.9.
> How to plot these values global map.it might be same as image on
> global map.
>
> If anybody knows how to plot longitude/latitude values on global map
> and try to suggest me.
>
> I am awaiting for your reply,
>
> Kishore

This might get you started...

http://www.dfanning.com/map_tips/ptsource.html
Re: Map Projections [message #69370 is a reply to message #27969] Fri, 15 January 2010 13:12 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Bennett writes:

> I currently have data with an associated latitude and longitude
> frame. I've seen David Fanning's "Navigating GOES Images" example but
> the process does not seem to work for my data.

Humm. I just re-read that article. That's the way I would
have done it two years ago when I knew next to nothing
about map projections. :-)

If you want to tell me where I can find the image you
are working with, I'll see if I can write a better
article, knowing what I know today. I *think* I am off
on Monday, but I better check the calendar! :-)

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: Map Projections [message #69371 is a reply to message #27969] Fri, 15 January 2010 12:52 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Bennett writes:

> I currently have data with an associated latitude and longitude
> frame. I've seen David Fanning's "Navigating GOES Images" example but
> the process does not seem to work for my data.
> When I say it does not work the resulting projection results in
> showing much less of the data than it should based on the lat/lon
> limits.

How are you choosing the "limits"? These are not necessarily
the corners of your image.

> Does the data inherently have to be North up and east/west going right/
> left? My data is presented in an orientation where North is at an
> angle as are the other directions where the bottom of the image is not
> lowest latitude etc... Is there a special way to handle the
> projection for these types of datasets?

No, pick the upper-left corner of the rectangular image as your
starting point, and you should be good to go. What kind of map
projection is this, what is the lat/lon in the upper left corner,
what size is your image in pixels, and what is the resolution of
a pixel in meters? (You *can* determine the later number from
the lat/lon corners of your image.)

> The end result I'm looking for is a GeoTiff. I would think that with
> all this information at my fingertips IDL would make this easy but
> alas it is not.

You have been reading WAY too many marketing materials. :-)

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: Map Projections [message #69502 is a reply to message #27969] Mon, 18 January 2010 11:00 Go to previous message
Juggernaut is currently offline  Juggernaut
Messages: 83
Registered: June 2008
Member
On Jan 18, 12:41 pm, David Fanning <n...@dfanning.com> wrote:
> Bennett writes:
>> I am currently simply following your example and selecting the middle
>> left, top, right and bottom as my limits.  I should probably be doing
>> a different calculation to retrieve these points since I don't have
>> the nicely oriented data.  Poor map projection knowledge = rough road.
>
> It has been a rough road for me, too. About two years
> of it. And every time I am *sure* I know what I am doing,
> it is proven otherwise. My map projection articles
> reflect this start and stop progress. (The only way
> I know to make certain progress is to write an
> article about what I *think* I know!) But, you might
> want to read this article:
>
>   http://www.dfanning.com/map_tips/iceshelf.html
>
> That will probably get you closer to where you want to
> go then the article you are reading now.
>
> Of course, eventually I am going to put all this together
> into a book that will secure my financial future. But in the
> meantime, you will have to piece it together. If you look
> at it in a certain way, it's actually fun. ;-)
>
> 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.")

I appreciate the link and the freeness of it. In my experience,
documented = fun and undocument = unfun. Thank you for piecing
together a few nuggets for us so that we have some useful
documentation.
Re: Map Projections [message #69504 is a reply to message #27969] Mon, 18 January 2010 09:41 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Bennett writes:

> I am currently simply following your example and selecting the middle
> left, top, right and bottom as my limits. I should probably be doing
> a different calculation to retrieve these points since I don't have
> the nicely oriented data. Poor map projection knowledge = rough road.

It has been a rough road for me, too. About two years
of it. And every time I am *sure* I know what I am doing,
it is proven otherwise. My map projection articles
reflect this start and stop progress. (The only way
I know to make certain progress is to write an
article about what I *think* I know!) But, you might
want to read this article:

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

That will probably get you closer to where you want to
go then the article you are reading now.

Of course, eventually I am going to put all this together
into a book that will secure my financial future. But in the
meantime, you will have to piece it together. If you look
at it in a certain way, it's actually fun. ;-)

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: Map Projections [message #69506 is a reply to message #69371] Mon, 18 January 2010 09:28 Go to previous message
Juggernaut is currently offline  Juggernaut
Messages: 83
Registered: June 2008
Member
On Jan 15, 3:52 pm, David Fanning <n...@dfanning.com> wrote:
> Bennett writes:
>> I currently have data with an associated latitude and longitude
>> frame.  I've seen David Fanning's "Navigating GOES Images" example but
>> the process does not seem to work for my data.
>> When I say it does not work the resulting projection results in
>> showing much less of the data than it should based on the lat/lon
>> limits.
>
> How are you choosing the "limits"? These are not necessarily
> the corners of your image.
>
>> Does the data inherently have to be North up and east/west going right/
>> left?  My data is presented in an orientation where North is at an
>> angle as are the other directions where the bottom of the image is not
>> lowest latitude etc...  Is there a special way to handle the
>> projection for these types of datasets?
>
> No, pick the upper-left corner of the rectangular image as your
> starting point, and you should be good to go. What kind of map
> projection is this, what is the lat/lon in the upper left corner,
> what size is your image in pixels, and what is the resolution of
> a pixel in meters? (You *can* determine the later number from
> the lat/lon corners of your image.)
>
>> The end result I'm looking for is a GeoTiff.  I would think that with
>> all this information at my fingertips IDL would make this easy but
>> alas it is not.
>
> You have been reading WAY too many marketing materials. :-)
>
> 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.")

I am currently simply following your example and selecting the middle
left, top, right and bottom as my limits. I should probably be doing
a different calculation to retrieve these points since I don't have
the nicely oriented data. Poor map projection knowledge = rough road.
Re: Map Projections [message #69510 is a reply to message #69370] Mon, 18 January 2010 05:16 Go to previous message
Juggernaut is currently offline  Juggernaut
Messages: 83
Registered: June 2008
Member
On Jan 15, 4:12 pm, David Fanning <n...@dfanning.com> wrote:
> Bennett writes:
>> I currently have data with an associated latitude and longitude
>> frame.  I've seen David Fanning's "Navigating GOES Images" example but
>> the process does not seem to work for my data.
>
> Humm. I just re-read that article. That's the way I would
> have done it two years ago when I knew next to nothing
> about map projections. :-)
>
> If you want to tell me where I can find the image you
> are working with, I'll see if I can write a better
> article, knowing what I know today. I *think* I am off
> on Monday, but I better check the calendar! :-)
>
> 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.")

Sadly I don't have the ability to get the data to the group here. I
would essentially be equivalent to taking the GOES data and rotating
it by some 30-60 degrees cropping out the garbage areas and then
attempting to get the same answer...which I haven't done yet but will
try if I get a chance. Here's what would be a nice sequence and what
I would like to get to.

success = createGeoTiff(data, lats, lons, /MERCATOR)

One day...with IDL (or PythonXY) I will achieve this and the world
will be an easier place to project one's data. It's the kind of world
I'd like to live in.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: concatenating arrays, stored by a pointer array
Next Topic: Re: Convolve a spectrum (from MODTRAN) with a spectral response function

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

Current Time: Wed Oct 08 19:31:56 PDT 2025

Total time taken to generate the page: 0.00594 seconds