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

Home » Public Forums » archive » Plotting data spanning multiple UTM zones
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
Plotting data spanning multiple UTM zones [message #28375] Thu, 06 December 2001 09:09
tbowers0 is currently offline  tbowers0
Messages: 11
Registered: August 2001
Junior Member
I have 3D data (lat lon depth) over the Gulf of Mex. To plot this data
as a volume with sensical axes labeling I need to convert my data
lat/lon to UTM eastings/northings so its in meters cause my depth is
in meters. Simple, just use Ben Tupper's handy ll_to_utm() to convert
my data lat/lon bounds to meters and then viz passing my xdata ydata
and zdata so's everything's perfect. Problem is my data spans 2 UTM
zones and my conversion is like this

;set data lat/lon bounds, lower left indicated by
lonMinMax[0],latMinMax[0]
lonMinMax = [-90.500000, -84.500000] ;range of longitude
latMinMax = [28.385413, 31.000000] ;range of latitude
utmCoords = ll_to_utm(lonMinMax, latMinMax), ZONE=utmZone)

IDL> print, utmCoords
744973.76 3142250.3 ;<-easting/northing of
southest/westest pt.
738705.88 3432086.9 ;<-easting/northing of
northest/eastest pt.
IDL> print, utmZone
15 16

Hmmm. Data points I passed are in 2 different zones. Notice the false
easting of the southwest point is greater (more east) than that of the
northeast point because, of course, the NE point is closer to its
false origin than the SW point.

I'm kinda new to this UTM stuff, but I did find out that the middle of
each zone is at 500,000. But, I don't think I can just add an offset
of 1,000,000 for each zones easting/northing from the lowest zone
since the zones are not rectilinear, e.g.:

minZone = min(utmZone, max=maxZone)
;add 10^6meters added for every zone's (false) easting from minZone
zoneOffsets = (utmZone[*] - minZone) * (1.0D*10D^6)
eastingMinMax = reform(utmCoords[0,*]) + zoneOffsets
northingMinMax = reform(utmCoords[1,*])
IDL> print, eastingMinMax
744973.76 1238705.9
IDL> print, northingMinMax
3142250.3 3432086.9

Plotting this gives a stretched data image. Mult. by 500,000 instead:

zoneOffsets = (utmZone[*] - minZone) * (0.5D*10D^6)

looks alot better, but is a kludge just to make it look good.

So, does anyone know how to do this in IDL?

Danke
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: convert string into the name of a variable
Next Topic: Getting the widget id.

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

Current Time: Fri Oct 10 10:56:34 PDT 2025

Total time taken to generate the page: 1.27863 seconds