Re: Image Warp Success? [message #69732 is a reply to message #69731] |
Tue, 09 February 2010 12:52   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> Has anyone ever had any success using MAP_PROJ_IMAGE to
> warp an image in one map projection into another map
> projection?
>
> Given what I know about the non-reentrant nature of the
> MAP_PROJ_*** routines, I can't image this ever working
> properly, but I thought I would give it a try. I have
> an image in a UTM map projection that I want to convert
> to a Lambert Equal Area projection. The result looks
> like a disaster. I'd pursue this further if someone
> could give me hope. :-(
My inability to get a reasonable result with MAP_PROJ_IMAGE
has turned out to be at least partly due to an incredibly
embarrassing error in my MapCoord object, which I use to
work around many of the reentrant limitations of the
MAP_PROJ_*** routines.
If the desired map projection was passed into the object
as a string (e.g., 'UTM') rather than as an index
(e.g., 101), then the wrong map projection information
was saved in the object. I rarely use map projection
names, which is probably why it took me so long to discover
this grievous error. :-(
In any case, this is fixed now, and I have confirmed that
the output map structure from my object and from MAP_PROJ_INIT
are identical no matter how the map projection is selected.
http://www.dfanning.com/programs/catalyst/source/coordinates /mapcoord__d
efine.pro
Once this problem was fixed, I obtained what appear to be
reasonable results from MAP_PROJ_IMAGE. My apologies for casting
aspertion on code that possibly doesn't deserve it. I do note
that the documenation is not clear as to what the "range"
parameter should be, and that you only get "correct" results if
you specify the range in UV coordinates, rather than the lat/lon
coordinates specified in the on-line help. I learned this only
by comparing the results from the results from ENVI.
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.")
|
|
|