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

Home » Public Forums » archive » a question on correct structure setting for EASE2 Grid in write_tiff
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
a question on correct structure setting for EASE2 Grid in write_tiff [message #93829] Tue, 01 November 2016 09:53
yinghui Liu is currently offline  yinghui Liu
Messages: 1
Registered: November 2016
Junior Member
Dear All,

I have a question on write_tiff using IDL and can not solve it. I am writing to you to ask for your help.

I am re-mapping the data on EASE2 Grid, using a .gpd file as the following;

Map Projection: Azimuthal Equal-Area (ellipsoid)
Map Reference Latitude: 90.0
Map Reference Longitude: 0.0
Map Rotation: 0.0
Map Equatorial Radius: 6378137.0 ; wgs84
Map Eccentricity: 0.081819190843 ; wgs84
Map Origin X: -4512000. ; meters -1*9024*1000/2
Map Origin Y: 4512000. ; meters 9024*1000/2
Grid Map Origin Column: -0.5
Grid Map Origin Row: -0.5
Grid Map Units per Cell: 1000. ; meters
Grid Width: 9024
Grid Height: 9024


This gpd file is adapted from a .gpd file from NSIDC, which covering the whole North Hemisphere.

; 1 km Northern Hemisphere EASE-Grid-2.0 grid parameter definition (nested in 36, 9 and 3 km gpd).
; This projection uses the WGS84 ellipsoid.
; The pole is exactly at the intersection of the middle 4 cells.
; The left/right/top/bottom latitude is 0.127234 degrees North
; (the equator goes just outside the edges of the grid coverage along the sides)
Map Projection: Azimuthal Equal-Area (ellipsoid)
Map Reference Latitude: 90.0
Map Reference Longitude: 0.0
Map Rotation: 0.0
Map Equatorial Radius: 6378137.0 ; wgs84
Map Eccentricity: 0.081819190843 ; wgs84
Map Origin X: -9000000. ; meters
Map Origin Y: 9000000. ; meters
Grid Map Origin Column: -0.5
Grid Map Origin Row: -0.5
Grid Map Units per Cell: 1000. ; meters
Grid Width: 18000
Grid Height: 18000


After remapping, I want to write the data to GeoTIFF using IDL. The test IDL code I am using is as the following,

pro test

d= fltarr(9024,9024)

d(3000:6000,3000:6000) = 15.
d(6000:6500,6000:6500)=25.

g_tags = { ModelPixelScaleTag:[1000.d, 1000.d, 0d], $
ModelTiepointTag:[-0.5d,-0.5d,0d,-4512000.d,4512000.d,0d], $
GTModelTypeGeoKey: 1s, $
GTRasterTypeGeoKey: 1s, $
GeographicTypeGeoKey: 4326s, $
;ProjFalseEastingGeoKey: 0d, $
;ProjFalseNorthingGeoKey: 0d, $
ProjCenterLongGeoKey: 0d, $
ProjCenterLatGeoKey: 90d, $
;ProjCenterEastingGeoKey: 4511.5d, $
;ProjCenterNorthingGeoKey: 4511.5d, $
ProjCoordTransGeoKey: 10s, $
ProjLinearUnitsGeoKey: 9001s $
}

write_tiff,'test.tif',d,/float,geotiff=g_tags

end

It does not work at all, and can not generate a GeoTIFF file. I have been reading the GeoTIFF specification for a couple of weeks, but still have no clue what the correct setting for the g_tags is.

I am wondering if you could help me on correctly writing the test data in a tiff file?

Thanks very much in advance for your time.


Yinghui Liu
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: array of structures -- error Conflicting data structures
Next Topic: WIDGET_DROPLIST causes a crash on XQuartz 2.7.10 and 2.7.11 on MacOSX 10.11.6

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

Current Time: Wed Oct 08 11:32:16 PDT 2025

Total time taken to generate the page: 0.00383 seconds