Hello, I'm having problems with gdalwarp-ing a MODIS L1B calibrated radiance dataset.
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 MOD021KM.A2012062.0455.006.2014220083128.hdf SUBDATASET_20_NAME=HDF4_SDS:UNKNOWN:"MOD021KM.A2012062.0455.006.2014220083128.hdf":0 SUBDATASET_20_DESC=[406x271] Latitude (32-bit floating-point) SUBDATASET_21_NAME=HDF4_SDS:UNKNOWN:"MOD021KM.A2012062.0455.006.2014220083128.hdf":1 SUBDATASET_21_DESC=[406x271] Longitude (32-bit floating-point) SUBDATASET_22_NAME=HDF4_SDS:UNKNOWN:"MOD021KM.A2012062.0455.006.2014220083128.hdf":2 SUBDATASET_22_DESC=[15x2030x1354] EV_1KM_RefSB (16-bit unsigned integer) By my reading of https://trac.osgeo.org/gdal/wiki/rfc4_geolocate 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: http://staff.acecrc.org.au/~mdsumner/mod1.jpg If I understand correctly, gdalwarp should be able to georeference this with a simple call, optionally with tr, te, and t_srs values gdalwarp infile out.tif The t_srs I use is '+proj=laea +lon_0=60 +lat_0=-70 +ellps=WG84'. Here's the gdalinfo output for the EV_1KM_RefSB subdataset for the relevant section: gdalinfo HDF4_SDS:UNKNOWN:"MOD021KM.A2012062.0455.006.2014220083128.hdf":2 | grep 'Geolocation:' -A 10 Geolocation: LINE_OFFSET=0 LINE_STEP=1 PIXEL_OFFSET=0 PIXEL_STEP=1 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"]] X_BAND=1 X_DATASET=HDF4_SDS:UNKNOWN:"MOD021KM.A2012062.0455.006.2014220083128.hdf":1 Y_BAND=1 Y_DATASET=HDF4_SDS:UNKNOWN:"MOD021KM.A2012062.0455.006.2014220083128.hdf":0 Corner Coordinates: I get this file originally from here (136 Mb): ftp://ladsweb.nascom.nasa.gov/allData/6/MOD021KM/2012/062/MOD021KM.A2012062.0455.006.2014220083128.hdf I see this in 1.11.1 and 2.0.0beta1. I have also attached the gdalinfo output in full here: http://staff.acecrc.org.au/~mdsumner/gdalinfo_EV_1KM_RefSB.txt cheers, Mike.
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
