Simple method to display an ENVI image on a map? [message #88296] |
Tue, 08 April 2014 13:51  |
BillG
Messages: 6 Registered: March 2007
|
Junior Member |
|
|
Folks,
I have an ENVI "image" (actually a digital elevation map with an ENVI header). I want to display it on as an image on a projected map, then add other stuff on the map. The image is on a UTM grid and that is how I want it displayed. Is there a ***simple*** sequence of IDL commands that will get the map projection parameters from the ENVI header, reproject the image and display the map?
Here is the ENVI header: (D. Fanning FYI: this is a dem of High Park, CO after the fire of 2012)
ENVI
description = {
NEON AIG lidar first return elevation [Sat Nov 30 16:27:00 2013]}
samples = 44125
lines = 30954
bands = 1
header offset = 0
file type = ENVI Standard
data type = 4
interleave = bsq
sensor type = Unknown
byte order = 0
map info = {UTM, 1.000, 1.000, 446881.000, 4513309.000, 1.0000000000e+000, 1.0000000000e+000, 13, North, WGS-84, units=Meters}
coordinate system string = {PROJCS["UTM_Zone_13N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984 ",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich ",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator "],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing ",0.0],PARAMETER["Central_Meridian",-105.0],PARAMETER["Scale_Factor ",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter ",1.0]]}
wavelength units = Unknown
data ignore value = 0.00000000e+000
band names = {
elevation}
Cheers,
Bill Gallery
|
|
|
Re: Simple method to display an ENVI image on a map? [message #88297 is a reply to message #88296] |
Tue, 08 April 2014 15:04  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Bill Gallery writes:
>
> Folks,
>
> I have an ENVI "image" (actually a digital elevation map with an ENVI header). I want to display it on as an image on a projected map, then add other stuff on the map. The image is on a UTM grid and that is how I want it displayed. Is there a ***simple*** sequence of IDL commands that will get the map projection parameters from the ENVI header, reproject the image and display the map?
>
>
> Here is the ENVI header: (D. Fanning FYI: this is a dem of High Park, CO after the fire of 2012)
>
> ENVI
> description = {
> NEON AIG lidar first return elevation [Sat Nov 30 16:27:00 2013]}
> samples = 44125
> lines = 30954
> bands = 1
> header offset = 0
> file type = ENVI Standard
> data type = 4
> interleave = bsq
> sensor type = Unknown
> byte order = 0
> map info = {UTM, 1.000, 1.000, 446881.000, 4513309.000, 1.0000000000e+000, 1.0000000000e+000, 13, North, WGS-84, units=Meters}
> coordinate system string = {PROJCS["UTM_Zone_13N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984 ",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich ",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator "],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing ",0.0],PARAMETER["Central_Meridian",-105.0],PARAMETER["Scale_Factor ",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter ",1.0]]}
> wavelength units = Unknown
> data ignore value = 0.00000000e+000
> band names = {
> elevation}
>
> Cheers,
>
> Bill Gallery
Is there a "***simple****" sequence!? No. We are talking about map
projections here. :-)
This looks like 1 meter resolution imagery to me, so I would probably do
something like this:
xrange = [446881.0D, 446881.0D + 44125.0D]
yrange = [4513309.0D - 30954.0D, 4513309.0D]
mapCoord = cgMap('UTM', Zone=13, Ellipsoid='WGS 84', $
Center_Lon=-105, XRange=xrange, YRange=yrange)
cgDisplay, 900, 900, Aspect=image
mapCoord -> Draw
cgImage, image
Then, I'd plot on the image. If I was using lat/lon values, I'd be sure
to pass the map coordinate object to do the conversion from lat/lon to
x/y space:
cgPlotS, lon, lat, PSYM=2, Map=mapCoord
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|