[GRASS-user] GRASS 7 subpixel shift of imported Landsat data
Tomáš Brunclík
brunclik at atlas.cz
Wed May 27 03:49:13 PDT 2015
Hello all,
working with GRASS GIS 7.0.1svn (r65198) @Linux, I noticed, that when
importing two Landsat images from different dates, I often get them
spatially shifted to each other when comparing them in detail - meaning
when you zoom in to about 1:5000 scale and switch the viewed bands, the
features in the map jump by a fraction of pixel size. For Landsat 8
images LC81910252013208 (reflectance product) and LC81910252013224 (DN
product) the shift is about 15m (half the pixel size) in both horizontal
and vertical direction. The same two products imported in GRASS 6.4.4
have no visible shift at all and the corresponding pixels seem to be
perfectly aligned.
The procedure to reproduce this:
1)Download and uncompress this archive (133 MB):
https://dl.dropboxusercontent.com/u/24062833/pixel_shift_208_224.zip
/
The archive contains band 5 of the two above mentioned Landsat scenes,
where the one with DOY 208 (the last number of the scene code,
day-of-year) is from surface reflectance (SR) product, the other with
DOY 224 is digital number (DN) product (I work on a script to
atmospherically correct DN product based on reference SR image)//.//
/
2) Start GRASS 7, create new mapset in location with UTM 33N
(EPSG:32633) spatial reference system.
3) Import each image, open them in the map, set colors, zoom in and
compare a distinct feature placement in detail:
#import
r.in.gdal input="/path/to/data/LC81910252013208LGN00_sr_band5.tif"
output=208_grass7
r.in.gdal input="/path/to/data/LC81910252013224LGN00_B5.TIF"
output=224_grass7
#set the null pixels of the DN band (helps the bands to get similar
color palette in the next step)
r.null map=224_grass7 setnull=0
#set colors:
r.colors map=208_grass7
r.colors map=224_grass7
4) Zoom in to a distinct feature in about 1:5000 scale (I have used a
pond at coordinates 542365,554675), switch visibility of both images on,
then repeatedly switch on/off the upper image in the stack. You should
see the shift quite clearly. Zooming in even more, it is possible to
measure the shift.
Repeat the steps 3,4 in GRASS 6 (6.4.4/Linux in my case) importing as
208_band5_grass6, 224_band5_grass6. The result is (for me) that files
208_grass7, 208_grass6, 224_grass6 are perfectly aligned, while
224_grass7 is off about 15m east and 15m south from the rest (seems it
is exactly half pixel size)...
I tried if region settings prior the import affects this, it seems not.
Also the problem is always exactly the same when trying several times,
creating new mapset or not.
I also tried if the images are shifted when the tiffs are opened
directly in QGIS - they are not.
I also tried to download JPEG quicklook products of the above mentioned
scenes (created both from DN product, JPEG color format) and the results
are not shifted.
As I use the images in change detection, the shift causes that
especially linear no-change features (like highways, runways) are not
detected as no-change.
Now, any ideas why is that, and why it is so in GRASS7 and not in GRASS6?
Tomas B.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20150527/1f3db800/attachment.html>
More information about the grass-user
mailing list