[gdal-dev] R: Re: MODIS reprojection
laura0
lauramail at iol.it
Thu Apr 18 07:24:49 PDT 2013
If I try your command I get
ERROR 1: Unable to compute a transformation between pixel/line
and georeferenced coordinates for temp.tif.There is no affine transformation and no GCPs.
----Messaggio originale----
Da: ml-node+s1560n5047999h80 at n6.nabble.com
Data: 18/04/2013 16.18
A: "laura0"<lauramail at iol.it>
Ogg: Re: MODIS reprojection
I use a similar command, without the -a_ullr argument
e.g.
gdal_translate -a_srs '+proj=sinu +R=6371007.181 +nadgrids=@null +wktext' <input HDF subdataset> <output tiff file>
On Thu, Apr 18, 2013 at 6:10 AM, Rutger <[hidden email]> wrote:
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=<a href="tel:6371007.181" value="+556371007181">6371007.181 +b=<a href="tel:6371007.181" value="+556371007181">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
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
If you reply to this email, your message will be added to the discussion below:
http://osgeo-org.1560.x6.nabble.com/MODIS-reprojection-tp5047700p5047999.html
To unsubscribe from MODIS reprojection, click here.
NAML
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/R-Re-MODIS-reprojection-tp5048000.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130418/0e5e8b4b/attachment.html>
More information about the gdal-dev
mailing list