Pixel edge artifacts in hillshade #7217
Replies: 1 comment 1 reply
-
|
Hi Lars, thanks for opening this discussion! Actually, the source I'm using is not a terrainrgb or terrarium tileset, but a COG I produced with gdalwarp /srv/<source>.tif /srv/<target>.tiff -of COG -co BLOCKSIZE=256 -co TILING_SCHEME=GoogleMapsCompatible -co COMPRESS=DEFLATE -co RESAMPLING=BILINEAR -co OVERVIEW_RESAMPLING=NEAREST -co OVERVIEWS=IGNORE_EXISTING -co ADD_ALPHA=NO -dstnodata NaN
Edit: after careful reprocessing, it is possible i was missing the tiling-scheme, it now does look like this grid is gone. Will confirm tomorrow! PS: Might be this thread #4903 you had in mind? Details
# WORKS
gdal_translate dura_scaled.tif dura_final-8.cog.tif -of COG -a_srs EPSG:3857 -a_gt 0.01 2.0 0 -0.01 0 -2.0 -co BLOCKSIZE=256 -co TILING_SCHEME=GoogleMapsCompatible -co COMPRESS=DEFLATE -co RESAMPLING=BILINEAR -co OVERVIEW_RESAMPLING=NEAREST -co OVERVIEWS=IGNORE_EXISTING -co ADD_ALPHA=NO
# DOES NOT WORK
gdal_translate -of COG -co BIGTIFF=YES -co COMPRESS=DEFLATE -co PREDICTOR=2 -co RESAMPLING=AVERAGE -co OVERVIEW_RESAMPLING=AVERAGE -b 1 -a_nodata -9999 -colorinterp_1 gray -a_srs EPSG:3857 -a_gt 0 2 0 0 0 -2 -a_scale 1000 DuraEuropos_Synagogue_DSM.tiff DuraEuropos_Synagogue_DSM.cog.tiff
# Attempt mixing:
gdal_translate -of COG -co BIGTIFF=YES -a_srs EPSG:3857 -a_gt 0.01 2.0 0 -0.01 0 -2.0 -co BLOCKSIZE=256 -co TILING_SCHEME=GoogleMapsCompatible -co COMPRESS=DEFLATE -co RESAMPLING=BILINEAR -co OVERVIEW_RESAMPLING=NEAREST -co PREDICTOR=3 -co OVERVIEWS=IGNORE_EXISTING -co ADD_ALPHA=NO -b 1 -a_nodata nan -colorinterp_1 gray -a_scale -4000 DuraEuropos_Synagogue_W_0.5mm_DSM.tiff dura_final-9.cog.tif
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @jo-chemla, responding to your question in:
The artifacts don't appear at maximum zoom, correct? If so, I think the cause is the downsamping filter used in tiling/pyramiding the source heightmap.
Assuming you're first encoding the heightmap to terrain RGB and then tiling the image, you should use nearest neighbor or an equivalent non-interpolating filter. RGB-encoded values that are interpolated are effectively nonsense.
I remember a similar thread with spikes in the terrain which were shown to have been caused by the tiling downsamping. Can't find that at the moment.
Beta Was this translation helpful? Give feedback.
All reactions