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

Home » Public Forums » archive » Re: Associating GeoTiFF tags with basic Mercator projection parameters?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Associating GeoTiFF tags with basic Mercator projection parameters? [message #74257 is a reply to message #74172] Tue, 04 January 2011 19:38 Go to previous message
BLesht is currently offline  BLesht
Messages: 89
Registered: March 2007
Member
Just to close this thread with something that may be of use to anyone
who has a similar problem, David's suggestion of following the steps
described in his article

http://www.dfanning.com/map_tips/goesmap.html

was right on.

Because I already had a projected image, I skipped the warping part
and started with using MAP_PROJ_INIT to set up the projection. I used
the GCTP version of the Mercator projection and specified the equator
as the TRUE_SCALE_LATITUDE. Because my files were based on a subset
of the original map, I used the subset geographic boundaries to define
the LIMIT vector in the MAP_PROJ_INIT and in the MAP_PROJ_FORWARD
procedure. The resulting GeoTiFF files have the correct map
information.

MercMap = MAP_PROJ_INIT(105, /GCTP, $ ; Mercator
ELLIPSOID = 8, $ ; WGS84
LIMIT = [lr_lat, lr_lon, ul_lat, ul_lon], $ ; Corners
should be enough
CENTER_LONGITUDE = center_lon, $
TRUE_SCALE_LATITUDE = 0.0)

uv = MAP_PROJ_FORWARD([left_lon, top_lon, right_lon, bottom_lon], $
[left_lat, top_lat, right_lat, bottom_lat], $
MAP_STRUCTURE=MercMap)

xscale = ABS(uv[0,0] - uv[0,2])/(s[0])
yscale = ABS(uv[1,1] - uv[1,3])/(s[1])
tp = [uv[0,0], uv[1,1]]
;
g_tags = { $
ModelPixelScaleTag: [xscale, yscale, 0], $
ModelTiepointTag: [0, 0, 0, tp, 0], $
GTModeTypeGeoKey: 1, $ ; Geographic
GTRasterTypeGeoKey: 1, $ ; Pixel represents
area
GeographicTypeGeoKey: 4326, $ ; WGS84
GeogLinearUnitsGeoKey: 9001, $ ; meters
GeogAngularUnitsGeoKey: 9102, $ ; angular degree
ProjectedCSTypeGeoKey: 32767, $ ;
ProjectionGeoKay: 32767, $ ;
ProjCoordTransGeoKey: 7, $ ; Mercator
ProjLinearUnitsGeoKey: 9001, $ ;
ProjNatOriginLongGeoKey: center_lon $
ProjNatOriginLatGeoKey: 0.0, $
ProjFalseNorthingGeoKey: 0, $
ProjFalseEastingGeoKey: 0, $
ProjScaleAtNatOriginGeoKey: 1. $
}

Thanks again, David.


On Jan 4, 11:42 am, Barry Lesht <ble...@gmail.com> wrote:
> Thanks, David.  I tried that early on, but went to the angular measure
> (adding the GeogAngularUnitsGeoKey) for some reason (maybe I saw a
> different example somewhere). I'll give it another go.  By the way,
> have nice recollections of IDL course you taught way back "in the
> day."  Still telling "Coyote stories?"  Barry
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: More efficient method of appending to arrays when using pointers?
Next Topic: How to append a multi dimensional array?

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

Current Time: Thu Oct 09 23:35:24 PDT 2025

Total time taken to generate the page: 0.55925 seconds