Re: Unproject Map Images [message #55407] |
Mon, 20 August 2007 11:22 |
James Kuyper
Messages: 425 Registered: March 2000
|
Senior Member |
|
|
mankoff wrote:
> Hi Group,
>
> I have a bunch of images of Antarctica that I would like to unproject
> from their (presumably spherical) projection so that I can add them as
> layers to Google Earth. Google Earth requires that an overlay layer be
> in cylindrical/equirectangular projection and the bottom edge must be
> parallel to a latitude, in this case 90S. Your standard Antarctica
> image looks like this: http://images.google.com/images?&q=antarctica+map
>
> Ideally I want to write a procedure that takes the following
> parameters:
> 1) (x,y) pixel location of 90S
> 2) radius (in pixels) to latitude 80S
> 3) Radius to latitude 70S
> 4) Rotation
You'll have to make a guess as to which azimuthal projection was used.
In order to compare the different projections, it's convenient to
refer to the co-latitude c = 90 - latitude. Let r70 and r80 be the
projected radius of the 70th and 80th latitudes. For the most common
azimuthal projections, we have, if k is the scale at the center of the
projection:
Orthographic: r = k*sin(c) r70/r80 = sin(20)/sin(10) = 1.969615506
Lambert's equal area: r = sqrt(2)*k*sqrt(1-cos(c))
r70/r80 = sqrt(1-cos(20))/sqrt(1-cos(10)) = 1.992389396
Equidistant: r = k*c r70/r80 = 2.000000000
Stereographic: r = 2k*tan(c/2) r70/r80 = tan(10)/tan(5) = 2.015426612
Gnomonic: r = k*tan(c) r70/r80 = tan(20)/tan(10) = 2.064177772
As you can see, it takes careful measurement of r70 and r80 to
distinguish the equal-area and equi-distant projections from each
other. However, it also follows that as long as your data covers areas
close to the poles, the errors caused by misidentifying the map
projection tend to be small.
> I think with center and radius to a latitude you could 'unroll' or
> unproject the map, but having two latitude radii would allow me to
> verify the projection or determine if it is spherical or stereo or
> something else. Perhaps. I guess this isn't really an unprojection so
> much as a reprojection.
Correct.
> Anyway, on to my question: Has anyone done this? If not, does anyone
> know of any tools that currently exist?
I don't have any code written that does precisely this task. However,
I think the formulas I give above should be enough to get you started
on writing your own tool. The azimuthal part of all of these
projections is just your standard polar->rectangular conversion - it's
only the radial portion that is non-trivial.
> ... And finally, if I code it in
> IDL, do you suggest MAP_SET routines or MAP_PROJ routines. I do not
> have any familiarity with the latter.
I'd recommend using MAP_PROJ. The interface allows you to store the
map projection, which means that you can use one projection for the
inverse projection, and a different one for the forward projection,
which is precisely what you'll want to be doing.
|
|
|