[gdal-dev] R: Re: MODIS reprojection

lauramail at iol.it lauramail at iol.it
Thu Apr 18 05:04:08 PDT 2013


Hi Rutger,
thank you for your reply.
The metadata in the HDF show me these bounding box:
EASTBOUNDINGCOORDINATE=36.5436731054265
NORTHBOUNDINGCOORDINATE=43.0619355408597
SOUTHBOUNDINGCOORDINATE=21.8438333503548
WESTBOUNDINGCOORDINATE=6.83616802377613

and the first test has been:
gdal_translate -of Gtiff -co "tfw=yes" -a_ullr WESTBOUNDINGCOORDINATE 
NORTHBOUNDINGCOORDINATE EASTBOUNDINGCOORDINATE SOUTHBOUNDINGCOORDINATE input.
tif temp.tif
gdalwarp -t_srs "+proj=utm +zone=32 +datum=WGS84" temp.tif output.tif

but with bad results. Then I read that in order to geolocate swaths, there is 
a separate product called MOD03 with lat/lon matrix and I tried as my previous 
post. It is not clear for me now  which values should I put here (I copy from 
your reply)
" +a=6371007.181 +b=6371007.181 +units=m +no_defs" -a_ullr 2223901.039333
-3335851.559000 3335851.559000 -4447802.078667"
your coordinates in option -a_ullr are totally different from mine, I guess 
you have them in sinusoidal projection but I do not see anything similar.

Regards,
Laura


>----Messaggio originale----
>Da: kassies at gmail.com
>Data: 18/04/2013 11.10
>A: <gdal-dev at lists.osgeo.org>
>Ogg: Re: [gdal-dev] MODIS reprojection
>
>Hey Laura,
>
>Since the MxD14.A2 products are already projected in the sinusoidal
>projection there is no need to warp using GCP's. Fitting a polynomial
>through some GCP's will always be less accurate then using the projection
>the data is already in.
>
>Somewhere in the metadata in the HDF there should be a boundingbox (corner
>coordinates, in sinusoidal projection) for the specific tile you are using,
>you can then assign these with the projection using gdal_translate. Once
>assigned, you can use gdalwarp in the same way as you already described.
>
>Youre gdal_translate command should look somewhat like this:
>gdal_translate -of "VRT" -a_srs "+proj=sinu +lon_0=0 +x_0=0 +y_0=0
>+a=6371007.181 +b=6371007.181 +units=m +no_defs" -a_ullr 2223901.039333
>-3335851.559000 3335851.559000 -4447802.078667 <input HDF subdataset>
><output vrt file>
>
>You can get the correct subdataset reference by running gdalinfo on you HDF.
>The coordinates i used are for tile h20v12, so make sure you use the ones
>from your tile. I used a vrt as output which you can use as an input for
>gdal_translate, but its also fine to use Geotiff or anything else you
>prefer.
>
>Hope this helps.
>
>Regards,
>Rutger
>
>
>
>
>
>
>
>
>
>
>--
>View this message in context: http://osgeo-org.1560.x6.nabble.com/MODIS-
reprojection-tp5047700p5047887.html
>Sent from the GDAL - Dev mailing list archive at Nabble.com.
>_______________________________________________
>gdal-dev mailing list
>gdal-dev at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



More information about the gdal-dev mailing list