I use a similar command, without the -a_ullr argument<div><br></div><div>e.g.</div><div><br></div><div><div>gdal_translate -a_srs '+proj=sinu +R=6371007.181 +nadgrids=@null +wktext' <input HDF subdataset> <output tiff file></div>
<br><div class="gmail_quote">On Thu, Apr 18, 2013 at 6:10 AM, Rutger <span dir="ltr"><<a href="mailto:kassies@gmail.com" target="_blank">kassies@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hey Laura,<br>
<br>
Since the MxD14.A2 products are already projected in the sinusoidal<br>
projection there is no need to warp using GCP's. Fitting a polynomial<br>
through some GCP's will always be less accurate then using the projection<br>
the data is already in.<br>
<br>
Somewhere in the metadata in the HDF there should be a boundingbox (corner<br>
coordinates, in sinusoidal projection) for the specific tile you are using,<br>
you can then assign these with the projection using gdal_translate. Once<br>
assigned, you can use gdalwarp in the same way as you already described.<br>
<br>
Youre gdal_translate command should look somewhat like this:<br>
gdal_translate -of "VRT" -a_srs "+proj=sinu +lon_0=0 +x_0=0 +y_0=0<br>
+a=<a href="tel:6371007.181" value="+556371007181">6371007.181</a> +b=<a href="tel:6371007.181" value="+556371007181">6371007.181</a> +units=m +no_defs" -a_ullr 2223901.039333<br>
-3335851.559000 3335851.559000 -4447802.078667 <input HDF subdataset><br>
<output vrt file><br>
<br>
You can get the correct subdataset reference by running gdalinfo on you HDF.<br>
The coordinates i used are for tile h20v12, so make sure you use the ones<br>
from your tile. I used a vrt as output which you can use as an input for<br>
gdal_translate, but its also fine to use Geotiff or anything else you<br>
prefer.<br>
<br>
Hope this helps.<br>
<br>
Regards,<br>
Rutger<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/MODIS-reprojection-tp5047700p5047887.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/MODIS-reprojection-tp5047700p5047887.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br></div>