Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce concept of pixel index bands #250

Open
Scartography opened this issue Mar 4, 2020 · 1 comment
Open

introduce concept of pixel index bands #250

Scartography opened this issue Mar 4, 2020 · 1 comment
Assignees

Comments

@Scartography
Copy link
Collaborator

  • metadata gets lost when using mapchete covert to single GTiff
  • use rio info --tags for verification on any tagged tile
@ungarj ungarj changed the title Mapchete Convert does not gather GTiff --tags from tiles introduce concept of pixel index bands Mar 4, 2020
@ungarj ungarj self-assigned this Mar 4, 2020
@ungarj
Copy link
Owner

ungarj commented Mar 4, 2020

We use GeoTIFF tags to enable adding per-pixel metadata to process outputs. This works by adding a separate band where pixels with common metadata get the same index value. Furthermore a dictionary which maps between indexes and whatever metadata we want to append is passed on and written to the output GeoTIFF.

This means, however that for every process tile the index values can be different, i.e. otherwise same metadata entries can have different indexes between adjacent process tile outputs. This causes a problem when merging tiles from a TileDrectory e.g. by running mapchete convert.

By introducing a global concept of a pixel index band we can add the required logic to all the affected parts of the code:

  • mapchete.io.raster.create_mosaic() should be able to merge different index bands
  • mapchete.io.raster.resample_from_array() should only apply nearest interpolation to index band
  • mapchete.io.raster.extract_from_array() probably should also return the index dictionary
  • TileDirectory metadata should hint whether an index band exists
  • process output definition shall get an index band option
  • name and place of the index dictionary within the GeoTIFF files should be standardized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants