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

Home » Public Forums » archive » read lambert projected image
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
read lambert projected image [message #88797] Fri, 20 June 2014 10:56 Go to next message
audrey.schaufelberger is currently offline  audrey.schaufelberger
Messages: 10
Registered: June 2014
Junior Member
I have somewhat a tricky problem: I would like to read a jpeg file which shows a lambert projection of a map. What I would like is to have an rgb value associated with coordinates, so that I can plot the map in a different projection. Does anyone have an idea how I could accomplish this?

best,
as
Re: read lambert projected image [message #88798 is a reply to message #88797] Fri, 20 June 2014 14:09 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
as@gmail.com writes:

> I have somewhat a tricky problem: I would like to read a jpeg file which shows a lambert projection of a map. What I would like is to have an rgb value associated with coordinates, so that I can plot the map in a different projection. Does anyone have an idea how I could accomplish this?

Prayer would be my suggestion, unless you know something you are not
telling us about the map projection details and the projected meter
extent of the image.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: read lambert projected image [message #88799 is a reply to message #88798] Sat, 21 June 2014 09:56 Go to previous messageGo to next message
audrey.schaufelberger is currently offline  audrey.schaufelberger
Messages: 10
Registered: June 2014
Junior Member
I am afraid I don't quite understand what you mean... I have an image showing the farside of the moon. The complete farside, so I know that the map ranges from 90...270 deg in longitude and from -90...90 deg in latitude. I also know that the projection used is a lambert equal area projection. In addition, the map fills the image, i.e., (90/0) deg touches the left center, (180/90) deg the top center, (270/0) deg the right center and (180/-90) deg the bottom center of the image. So in theory I guess, since everything seems well defined, I should be able to determine the lon/lat pair corresponding to a x/y image coordinate. I was hoping there was a procedure where I can tell what projection a map is plotted with, and the procedure would read the .jpg while assigning each x/y image coordinate the right lon/lat coordinate.
but that might be a bit much I ask for...
Re: read lambert projected image [message #88800 is a reply to message #88799] Sat, 21 June 2014 11:30 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
audrey.schaufelberger@gmail.com writes:

> I am afraid I don't quite understand what you mean... I have an image showing the farside of the moon. The complete farside, so I know that the map ranges from 90...270 deg in longitude and from -90...90 deg in latitude. I also know that the projection used is a lambert equal area projection. In addition, the map fills the image, i.e., (90/0) deg touches the left center, (180/90) deg the top center, (270/0) deg the right center and (180/-90) deg the bottom
center of the image. So in theory I guess, since everything seems well defined, I should be able to determine the lon/lat pair corresponding to a x/y image coordinate. I was hoping there was a procedure where I can tell what projection a map is plotted with, and the procedure would read the .jpg while assigning each x/y image coordinate the right lon/lat coordinate.
> but that might be a bit much I ask for..

With a JPEG image, you are asking for too much. Can you find the same
image in a GeoTiff image format? That will have the map projection
information you need built into it. Failing that, NASA (or whoever
created the original image) usually have information about the map
projection used, etc. Since this is the moon, you will need to know its
radius, and what kind of Geoid (sphere, ellipsoid, etc) was used to
determine the latitude and longitude points. It wouldn't surprise me if
the organization that captured the image has already created latitude
and longitude arrays for every image pixel. Have you looked for these?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: read lambert projected image [message #88805 is a reply to message #88800] Sat, 21 June 2014 15:15 Go to previous messageGo to next message
audrey.schaufelberger is currently offline  audrey.schaufelberger
Messages: 10
Registered: June 2014
Junior Member
I see...
Whereas the data used to produce the image is readily available from NASA, the image published is highly processed (cleaned, altitude-corrected, fitted, etc.). I only found one version of the image available (http://www.lpl.arizona.edu/~nic/Moon/LPMAG.html) and unfortunately I can't seem to locate the person who created this image to ask for the raw data. If I am not mistaken, the author neither mentions in this publication nor previous publications the information you mention I need to know. All the author mentions is that an equal-area lambert projection was used... Lets say I would assume that she used a standard radius and a sphere as a Geoid, it would still be an immense task to transform the (x,y) corrdinates to (lon, lat) coordinate, right? I am wondering if it is even worth a try writing such a program from scratch...
Re: read lambert projected image [message #88807 is a reply to message #88805] Sat, 21 June 2014 20:56 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
audrey.schaufelberger@gmail.com writes:

> I see...
> Whereas the data used to produce the image is readily available from NASA, the image published is highly processed (cleaned, altitude-corrected, fitted, etc.). I only found one version of the image available (http://www.lpl.arizona.edu/~nic/Moon/LPMAG.html) and unfortunately I can't seem to locate the person who created this image to ask for the raw data. If I am not mistaken, the author neither mentions in this publication nor previous publications the
information you mention I need to know. All the author mentions is that an equal-area lambert projection was used... Lets say I would assume that she used a standard radius and a sphere as a Geoid, it would still be an immense task to transform the (x,y) corrdinates to (lon, lat) coordinate, right? I am wondering if it is even worth a try writing such a program from scratch...

No I don't think it will be an "immense" task. It might take 10-15
minutes if you understand map projections well enough to know what you
are doing. Learning about map projections might be an "immense" task,
depending on your definition. It took me 2-3 years, and I'm not always
100% sure I know what I'm doing now. In the scheme of things, that was
only 10% of the time I'm been working with IDL, so a short time. :-)

I've been moderately successful when "guessing" about map projections.
Knowing how to recompile and run IDL programs after making random
changes to the code helps. But, sometimes guessing doesn't work well at
all. Then, it is a lot of work for a null result.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: map_set without any grid lines
Next Topic: display position arrays on an image

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

Current Time: Wed Oct 08 13:38:02 PDT 2025

Total time taken to generate the page: 0.00487 seconds