I'm experiencing some unwanted lines in between raster layers.

I downloaded DEM tiles from Japan's geospatial information authority, then reprojected them using GDAL and Python. Next, I duplicated the DEMs and under properties displayed one group as a hillshade, and the other to color the hillshade based on elevation. The hillshade looks exactly as I expected– despite containing many smaller raster layers, it appears as one smooth layer. The second group however however, seems to have pale lines surrounding each of the tiles.

My suspicion is that it might have something to do with the reprojection, or that there's some other setting I need to tweak, but I'm honestly at a loss.

To reproject the layers I used the following python code:

directory = #path to directory
i = 0
for entry in os.scandir(directory):
  if entry.path.endswith(".tif"):
    i = i +1
    #cmd = "gdalwarp -t_srs EPSG:6691 " + str(entry.name) + " "+str(i)+".tif"
    cmd = "gdalwarp -t_srs EPSG:6691 " + str(entry.name) + " " + "converted/"+str(i)+".tif"

Here is a picture of the undesirable lines:

Map with lines

1 Answer 1


These anomalies are largely associated when improper interpolation technique is used while reprojecting a continuous surface such as DEM.

I believe you have chosen the 'Nearest Neighbour' resampling technique (it is set as default resampling interpolation method in the Warp) for the said purpose. The Nearest Neighbour resampling method is appropriate for discrete (categorical) data which is not the case. You should select proper resampling types such as Bilinear or Cubic convolution interpolation method to remove apparent inconsistencies in the results.

Using 'warp' tool in QGIS, simply select the one of advised method to run the process.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.