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

Home » Public Forums » archive » Need help with map projection conversion in IDL or ENVI
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
Need help with map projection conversion in IDL or ENVI [message #88051] Fri, 14 March 2014 18:06 Go to next message
zcwjtt is currently offline  zcwjtt
Messages: 3
Registered: March 2014
Junior Member
I've been fighting with this problem for days and have finally given
up on solving it myself. I hope that someone with more experience
manipulating maps in IDL/ENVI can offer me some advice and guidance.

I have a geostationary satellite image file (actually many such files) that is written as an hdf. The data in the file only have latitude and longitude values corresponding to the pixels in the image in the file,
but without projection parameters.

I guess it is the "Satellite" projection, since the ranges of latitudes and longitudes covers a sphere.

I would like to read partial data and change them to another projection type, such as Mercator.
But I don't have any good idea where to start with.

Any suggestions would be most welcome.
Re: Need help with map projection conversion in IDL or ENVI [message #88052 is a reply to message #88051] Fri, 14 March 2014 19:00 Go to previous messageGo to next message
Paul Levine is currently offline  Paul Levine
Messages: 29
Registered: February 2008
Junior Member
On 2014-03-15 01:06:42 +0000, zcwjtt@gmail.com said:

> I've been fighting with this problem for days and have finally given
> up on solving it myself. I hope that someone with more experience
> manipulating maps in IDL/ENVI can offer me some advice and guidance.
>
> I have a geostationary satellite image file (actually many such files)
> that is written as an hdf. The data in the file only have latitude and
> longitude values corresponding to the pixels in the image in the file,
> but without projection parameters.
>
> I guess it is the "Satellite" projection, since the ranges of latitudes
> and longitudes covers a sphere.
>
> I would like to read partial data and change them to another projection
> type, such as Mercator.
> But I don't have any good idea where to start with.
>
> Any suggestions would be most welcome.


Based on what you said, I'm guessing the data are in an equirectangular
projection https://en.wikipedia.org/wiki/Equirectangular_projection

When selecting projections in ENVI, it is called "Geographic Lat/Lon".
The only catch is, ENVI can only handle it if the latitude and
longitudes between projections are equal (e.g., 1 degree by 1 degree).
You need to know the latitude and longitude of any single pixel (what
ENVI calls the "tie point") as well as where that single pixel is in
the image. Usually, the bottom left pixel is used, so the image
coordinates of the tie point are (1,1).

In IDL, you would need to create latitude and longitude vectors, which
you can then use in e.g. the image or countour function along with
"grid_units = 2"

If you could provide more details, in particular, the latitude and
longitude values that are delivered in the hdf file, I or others may be
able to provide more specific instructions
Re: Need help with map projection conversion in IDL or ENVI [message #88053 is a reply to message #88052] Fri, 14 March 2014 20:03 Go to previous messageGo to next message
zcwjtt is currently offline  zcwjtt
Messages: 3
Registered: March 2014
Junior Member
On Saturday, March 15, 2014 10:00:44 AM UTC+8, Paul Levine wrote:
> On 2014-03-15 01:06:42 +0000, zcw...@gmail.com said:
>
>
>
>> I've been fighting with this problem for days and have finally given
>
>> up on solving it myself. I hope that someone with more experience
>
>> manipulating maps in IDL/ENVI can offer me some advice and guidance.
>
>>
>
>> I have a geostationary satellite image file (actually many such files)
>
>> that is written as an hdf. The data in the file only have latitude and
>
>> longitude values corresponding to the pixels in the image in the file,
>
>> but without projection parameters.
>
>>
>
>> I guess it is the "Satellite" projection, since the ranges of latitudes
>
>> and longitudes covers a sphere.
>
>>
>
>> I would like to read partial data and change them to another projection
>
>> type, such as Mercator.
>
>> But I don't have any good idea where to start with.
>
>>
>
>> Any suggestions would be most welcome.
>
>
>
>
>
> Based on what you said, I'm guessing the data are in an equirectangular
>
> projection https://en.wikipedia.org/wiki/Equirectangular_projection
>
>
>
> When selecting projections in ENVI, it is called "Geographic Lat/Lon".
>
> The only catch is, ENVI can only handle it if the latitude and
>
> longitudes between projections are equal (e.g., 1 degree by 1 degree).
>
> You need to know the latitude and longitude of any single pixel (what
>
> ENVI calls the "tie point") as well as where that single pixel is in
>
> the image. Usually, the bottom left pixel is used, so the image
>
> coordinates of the tie point are (1,1).
>
>
>
> In IDL, you would need to create latitude and longitude vectors, which
>
> you can then use in e.g. the image or countour function along with
>
> "grid_units = 2"
>
>
>
> If you could provide more details, in particular, the latitude and
>
> longitude values that are delivered in the hdf file, I or others may be
>
> able to provide more specific instructions

Thank you for kindly help, and sorry for my ambiguous information.
Here comes the detail:
I know the latitude and longitude of any single pixel as well as where that single pixel is in the image.
Actually I have a look-up-table, which tells lat/lon of any single pixel in the image, and the ranges (X length and Y length) of look-up-table equals to the pixels (X length and Y length) in the image.
I tried to Contour the look-up-table, and it showed two spheres (one is contour of the latitudes, the other is of longitudes).
So I guess it's a "Satellite" projection, I confirm it's not an equirectangular projection.
i.e.:
look-up-table looks like:
NAN NAN ... NAN ... NAN NAN
NAN NAN ... lon ... NAN NAN
NAN lon ... lon ... lon NAN
lon ... ... lon ... lon lon
NAN lon ... lon ... lon NAN
NAN NAN ... lon ... NAN NAN
NAN NAN ... NAN ... NAN NAN
so as the latitudes.

The problem is that I have lon/lat/value of every pixel in the image, but I don't know how to convert them into an projection, like the equirectangular projection. (maybe this is a question about interpolation)
In other words, I actually not care much about the original projection.
I would like to know the best method to project from the original lon/lat/values.

Thanks again.
Re: Need help with map projection conversion in IDL or ENVI [message #88054 is a reply to message #88052] Fri, 14 March 2014 20:08 Go to previous message
zcwjtt is currently offline  zcwjtt
Messages: 3
Registered: March 2014
Junior Member
On Saturday, March 15, 2014 10:00:44 AM UTC+8, Paul Levine wrote:
> On 2014-03-15 01:06:42 +0000, zcw...@gmail.com said:
>
>
>
>> I've been fighting with this problem for days and have finally given
>
>> up on solving it myself. I hope that someone with more experience
>
>> manipulating maps in IDL/ENVI can offer me some advice and guidance.
>
>>
>
>> I have a geostationary satellite image file (actually many such files)
>
>> that is written as an hdf. The data in the file only have latitude and
>
>> longitude values corresponding to the pixels in the image in the file,
>
>> but without projection parameters.
>
>>
>
>> I guess it is the "Satellite" projection, since the ranges of latitudes
>
>> and longitudes covers a sphere.
>
>>
>
>> I would like to read partial data and change them to another projection
>
>> type, such as Mercator.
>
>> But I don't have any good idea where to start with.
>
>>
>
>> Any suggestions would be most welcome.
>
>
>
>
>
> Based on what you said, I'm guessing the data are in an equirectangular
>
> projection https://en.wikipedia.org/wiki/Equirectangular_projection
>
>
>
> When selecting projections in ENVI, it is called "Geographic Lat/Lon".
>
> The only catch is, ENVI can only handle it if the latitude and
>
> longitudes between projections are equal (e.g., 1 degree by 1 degree).
>
> You need to know the latitude and longitude of any single pixel (what
>
> ENVI calls the "tie point") as well as where that single pixel is in
>
> the image. Usually, the bottom left pixel is used, so the image
>
> coordinates of the tie point are (1,1).
>
>
>
> In IDL, you would need to create latitude and longitude vectors, which
>
> you can then use in e.g. the image or countour function along with
>
> "grid_units = 2"
>
>
>
> If you could provide more details, in particular, the latitude and
>
> longitude values that are delivered in the hdf file, I or others may be
>
> able to provide more specific instructions

Thank you for kindly help, and sorry for my ambiguous information.
Here comes the detail:
I know the latitude and longitude of any single pixel as well as where that single pixel is in the image.
Actually I have a look-up-table, which tells lat/lon of any single pixel in the image, and the ranges (X length and Y length) of look-up-table equals to the pixels (X length and Y length) in the image.
I tried to Contour the look-up-table, and it showed two spheres (one is contour of the latitudes, the other is of longitudes).
So I guess it's a "Satellite" projection, I confirm it's not an equirectangular projection.
i.e.:
look-up-table looks like:
NAN NAN NAN LON NAN NAN NAN
NAN NAN LON LON LON NAN NAN
NAN LON ... LON ... LON NAN
LON LON ... LON ... LON LON
NAN LON ... LON ... LON NAN
NAN NAN LON LON LON NAN NAN
NAN NAN NAN LON NAN NAN NAN
so as the latitudes.

The problem is that I have lon/lat/value of every pixel in the image, but I don't know how to convert them into an projection, like the equirectangular projection. (maybe this is a question about interpolation)
In other words, I actually not care much about the original projection.
I would like to know the best method to project from the original lon/lat/values.

Thanks again.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Force to print exponential to e-6
Next Topic: Pi is Rotten?

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

Current Time: Wed Oct 08 11:40:10 PDT 2025

Total time taken to generate the page: 0.00468 seconds