[mapserver-users] GRIB files - gdal_translate
Ivan
ivan.lucena at pmldnet.com
Thu May 21 19:27:56 PDT 2009
Olá Roberto,
The file T126L28.ctl gives up the clue:
--
xdef 161 linear *-150.000015* *0.937500*
ydef 98 levels
*-61.246* -60.311
-59.376 -58.441 -57.506 -56.571 -55.636 -54.701 -53.766 -52.831 -51.896 -50.961
-50.026 -49.091 -48.156 -47.221 -46.286 -45.350 -44.415 -43.480 -42.545 -41.610
-40.675 -39.740 -38.805 -37.870 -36.935 -36.000 -35.065 -34.130 -33.195 -32.260
-31.325 -30.389 -29.454 -28.519 -27.584 -26.649 -25.714 -24.779 -23.844 -22.909
-21.974 -21.039 -20.104 -19.169 -18.234 -17.299 -16.364 -15.429 -14.493 -13.558
-12.623 -11.688 -10.753 -9.818 -8.883 -7.948 -7.013 -6.078 -5.143 -4.208
-3.273 -2.338 -1.403 -0.468 0.468 1.403 2.338 3.273 4.208 5.143
6.078 7.013 7.948 8.883 9.818 10.753 11.688 12.623 13.558 14.493
15.429 16.364 17.299 18.234 19.169 20.104 21.039 21.974 22.909 23.844
24.779 25.714 26.649 27.584 28.519 *29.454*
zdef 7 levels
--
Whatever "ydef 98 levels" means, it looks like there is one Y ordinate for each one of the 98 rows.
So your upper left and lower right values are in fact -150.0 -61.246 0.9375 29.454.
I create a VRT file based on that:
$ gdal_translate -of VRT T126L28.grb T126L28.vrt -a_ullr -150.0 -61.246 0.9375 29.454
And I opened it on QGIS and the image looks pretty good to me. See attachment.
Since you don't want to convert the data to other format you can create VRTs and use then instead.
DATA "c:/ms4w/data/raster/T126L28.vrt"
Does it make sense?
PT_BR: Revisando: Eu interpretei o arquivo .ctl, achei a extensao da imagem e criei arquivos vrt
passando estes parametros. Agora quando eu abro o arquivo vrt os dados continuam sendo lidos do .grb
mas com a descricao do vrt. Tente fazer o mesmo pra ver se resolve pra voce. (eu estudei no INPE :)
Regards,
Ivan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot.png
Type: image/png
Size: 26612 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090521/27c064d3/attachment.png>
More information about the MapServer-users
mailing list