Skip to content

Tiles are completely different the first time they are loaded #672

@dzfranklin

Description

@dzfranklin

The first time I load a tile I see something complete different from every subsequent load.

process: hillshade.py
zoom_levels:
    min: 8
    max: 12
input:
    dem: copernicus_dem_30m_pentlands_sample.tif
output:
    format: PNG_hillshade
    path: /out
    pixelbuffer: 0
pyramid:
    grid: mercator
process_parameters:
    resampling: bilinear
import mapchete.processes.hillshade 
  
  
 def execute(mp, resampling): 
     with mp.open("dem") as src: 
         if src.is_empty(1): 
             return "empty" 
         else: 
             dem = src.read(1, resampling=resampling) 
  
     return mapchete.processes.hillshade.hillshade(dem, mp.tile.affine)

First load:

Image

Subsequent loads:

Image

I am using mapchete 2025.1.1 installed via pip. I made a script that reproduces the issue in a docker container: https://github.com/dzfranklin/mapchete-inconsistent-repro

The tile written to the output directory matches the first load. I am not sure if the first load is completely correct but it looks closer to the correct hillshading than the second load.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions