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

Impossible to generate tiles when not all layers have the same dimensions #299

Open
arnaud-morvan opened this issue Jun 16, 2017 · 2 comments

Comments

@arnaud-morvan
Copy link
Member

Related with #283

TileStore handle x,y,z tiles with fixed values in each dimension.

TileGeneration create a MultiTileStore (which manage one TileStore for each layer) but it is not consistent if all layers do not have exactly the same dimensions.
https://github.com/alexbrault/tilecloud-chain/blob/48677e7483ec2ee5f94616cffb631c4fe325e168/tilecloud_chain/__init__.py#L565

Here the trace :

Traceback (most recent call last):
  File ".build/venv/bin/generate_tiles", line 11, in <module>
    load_entry_point('tilecloud-chain', 'console_scripts', 'generate_tiles')()
  File "/home/amorvan/tilecloud-chain/tilecloud_chain/generate.py", line 473, in main
    generate.gene(options, gene, options.layer)
  File "/home/amorvan/tilecloud-chain/tilecloud_chain/generate.py", line 49, in gene
    self._gene(options, gene, dimensions)
  File "/home/amorvan/tilecloud-chain/tilecloud_chain/generate.py", line 89, in _gene
    self.cache_tilestore = gene.get_tilesstore(options.cache, dimensions)
  File "/home/amorvan/tilecloud-chain/tilecloud_chain/__init__.py", line 572, in get_tilesstore
    for lname, layer in self.layers.items()
  File "/home/amorvan/tilecloud-chain/tilecloud_chain/__init__.py", line 571, in <dictcomp>
    lname: self.get_store(cache, layer, dimensions=dimensions)
  File "/home/amorvan/tilecloud-chain/tilecloud_chain/__init__.py", line 459, in get_store
    for dimension in layer['dimensions']
KeyError: 'FLOOR'
@arnaud-morvan
Copy link
Member Author

IMHO, on a design side, dimensions names should be passed to TileStore class constructor, but dimensions values should passed to the filename method.

@sbrunner
Copy link
Member

Patch welcome

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

No branches or pull requests

2 participants