<div dir="ltr"><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">Hello, I'm having problems with gdalwarp-ing a MODIS L1B calibrated radiance dataset. </div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">This file contains 31 SDS subdatasets, the first two here are Latitude and Longitude arrays and the third is the reflectance data EV_1KM_RefSB. The geolocation arrays have a pixel and line for every fifth pixel/line in the data</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">MOD021KM.A2012062.0455.006.2014220083128.hdf</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">SUBDATASET_20_NAME=HDF4_SDS:UNKNOWN:"MOD021KM.A2012062.0455.006.2014220083128.hdf":0</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">SUBDATASET_20_DESC=[406x271] Latitude (32-bit floating-point)</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">SUBDATASET_21_NAME=HDF4_SDS:UNKNOWN:"MOD021KM.A2012062.0455.006.2014220083128.hdf":1</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">SUBDATASET_21_DESC=[406x271] Longitude (32-bit floating-point)</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">SUBDATASET_22_NAME=HDF4_SDS:UNKNOWN:"MOD021KM.A2012062.0455.006.2014220083128.hdf":2</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">SUBDATASET_22_DESC=[15x2030x1354] EV_1KM_RefSB (16-bit unsigned integer)</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">By my reading of <a href="https://trac.osgeo.org/gdal/wiki/rfc4_geolocate" target="_blank">https://trac.osgeo.org/gdal/wiki/rfc4_geolocate</a> that means the Geolocation tag from gdalinfo should have a PIXEL_STEP and LINE_STEP of 5, and if I do this I get a much better result but it's still not right. I've put a jpeg image of the result, with the coastline mapped and not lining up, here:  </div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></div><div><span style="font-size:13.1999998092651px;line-height:17.9999980926514px"><a href="http://staff.acecrc.org.au/~mdsumner/mod1.jpg">http://staff.acecrc.org.au/~mdsumner/mod1.jpg</a></span><br></div><div><span style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></span></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">If I understand correctly, gdalwarp should be able to georeference this with a simple call, optionally with tr, te, and t_srs values</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">gdalwarp infile out.tif </div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">The t_srs I use is '+proj=laea +lon_0=60 +lat_0=-70 +ellps=WG84'. </div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"> Here's the gdalinfo output for the EV_1KM_RefSB subdataset for the relevant section: </div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">gdalinfo HDF4_SDS:UNKNOWN:"MOD021KM.A2012062.0455.006.2014220083128.hdf":2 |  grep 'Geolocation:' -A 10</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">Geolocation:</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">  LINE_OFFSET=0</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">  LINE_STEP=1</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">  PIXEL_OFFSET=0</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">  PIXEL_STEP=1</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">  SRS=GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">  X_BAND=1</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">  X_DATASET=HDF4_SDS:UNKNOWN:"MOD021KM.A2012062.0455.006.2014220083128.hdf":1</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">  Y_BAND=1</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">  Y_DATASET=HDF4_SDS:UNKNOWN:"MOD021KM.A2012062.0455.006.2014220083128.hdf":0</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">Corner Coordinates:</div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">I get this file originally from here (136 Mb): </div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><a href="ftp://ladsweb.nascom.nasa.gov/allData/6/MOD021KM/2012/062/MOD021KM.A2012062.0455.006.2014220083128.hdf" target="_blank">ftp://ladsweb.nascom.nasa.gov/allData/6/MOD021KM/2012/062/MOD021KM.A2012062.0455.006.2014220083128.hdf</a></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">I see this in 1.11.1 and 2.0.0beta1. </div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">I have also attached the gdalinfo output in full here: </div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></div><div><span style="font-size:13.1999998092651px;line-height:17.9999980926514px"><a href="http://staff.acecrc.org.au/~mdsumner/gdalinfo_EV_1KM_RefSB.txt">http://staff.acecrc.org.au/~mdsumner/gdalinfo_EV_1KM_RefSB.txt</a></span><br></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></div><div style="font-size:13.1999998092651px;line-height:17.9999980926514px">cheers, Mike. </div></div>