<div dir="ltr">Hi,<div><br></div><div>I think the <span style="font-size:13.1999998092651px;line-height:17.9999980926514px">MOD021KM swath product is point data, which should be gridded using the array of latitude and longitude given.</span></div><div><span style="font-size:13.1999998092651px;line-height:17.9999980926514px">gdal griddata may be an option. However, it's very slow even for a single band of </span><span style="font-size:13.1999998092651px;line-height:17.9999980926514px">MOD021KM product.</span></div><div><span style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></span></div><div><span style="font-size:13.1999998092651px;line-height:17.9999980926514px">MODIS team provides MODIS Swath Reprojection Tool for gridding the data, which performs fast.</span></div><div><span style="font-size:13.1999998092651px;line-height:17.9999980926514px"> <a href="https://lpdaac.usgs.gov/tools/modis_reprojection_tool_swath">https://lpdaac.usgs.gov/tools/modis_reprojection_tool_swath</a></span></div><div><span style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></span></div><div><span style="font-size:13.1999998092651px;line-height:17.9999980926514px">I do not know the science behind </span><span style="font-size:13.1999998092651px;line-height:17.9999980926514px">MODIS Swath Reprojection Tool why it's faster than the gdal griddata.</span></div><div><span style="font-size:13.1999998092651px;line-height:17.9999980926514px">Can we discuss and implement a faster gridding tool in gdal? Why I am focusing gdal is because the MODIS swath tool works only for MODIS data, but the expected gdal tool would work for any data.</span></div><div><span style="font-size:13.1999998092651px;line-height:17.9999980926514px"><br></span></div><div><span style="font-size:13.1999998092651px;line-height:17.9999980926514px">Thanks.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 21, 2015 at 4:45 PM, 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,<br>
<br>
Maybe i'm missing something, but for as far as i know, the MODIS MOD021KM<br>
product is still a 'swath', and therefore still containing the bow-tie<br>
effect as the result of the scanning sensor. Wouldn't this mean that<br>
gdalwarp will never work? The lat/lon arrays aren't continuous, so any<br>
fitting (GCP/TPS) wont be accurate. And upsampling the arrays with cubic,<br>
like Even did, will result in interpolating pixels which are next each other<br>
in the array/file, but aren't next to each other 'on the ground', wont work<br>
well.<br>
<br>
I think you need to either use a dedicated algorithm (like gradient search),<br>
or something very generic (like the KDTree of Pyresample) to overcome the<br>
bow-tie effect.<br>
<br>
I have spend alot of time experimenting with this in GDAL, since i try to do<br>
as much with GDAL as possible. But projecting a swath file from a scanning<br>
sensor (like MODIS or VIIRS) is something i have never gotten to work. For<br>
some historic discussion about this see for example:<br>
<a href="http://osgeo-org.1560.x6.nabble.com/gdal-dev-reproject-python-numpy-binary-swath-lat-lon-td4978609.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/gdal-dev-reproject-python-numpy-binary-swath-lat-lon-td4978609.html</a><br>
<br>
<br>
Regards,<br>
Rutger<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/gdal-dev-gdalwarp-problems-with-MODIS-L1B-tp5206583p5206825.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/gdal-dev-gdalwarp-problems-with-MODIS-L1B-tp5206583p5206825.html</a><br>
Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<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>