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

base grid without bbox not accepted by mapproxy-seed #598

Open
tristndev opened this issue Sep 9, 2022 · 0 comments
Open

base grid without bbox not accepted by mapproxy-seed #598

tristndev opened this issue Sep 9, 2022 · 0 comments
Labels

Comments

@tristndev
Copy link
Contributor

Context

In my mapproxy.yaml, I define mutliple grids based with coverages (here: my-extend-grid-with-coverage on a base grid my-base-grid that defines the remaining parameters, but no coverage:

grids:
    my-base-grid:
        origin: 'sw'
        srs: 'EPSG:25832'
        num_levels: 30
        res_factor: sqrt2

    my-extend-grid-with-coverage:
        base: my-base-grid
        bbox: [10.2, 53.6, 11.1, 54.0]
        bbox_srs: 'EPSG:4326'

This worked fine when I just used it as configuration for the mapproxy server itself. Once I started seeding, the configuration import failed (see below).

Expected Behavior

I expect the configuration to be correctly loaded in every scenario.

Actual Behavior

The configuration works fine when just starting the mapproxy server. However, the configuration import fails when importing the configuration using the mapproxy-seeed CLI tool with the stack trace:

Traceback (most recent call last):
  File "/usr/local/bin/mapproxy-seed", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/mapproxy/seed/script.py", line 367, in main
    return SeedScript()()
  File "/usr/local/lib/python3.9/site-packages/mapproxy/seed/script.py", line 222, in __call__
    seed_conf = load_seed_tasks_conf(options.seed_file, mapproxy_conf)
  File "/usr/local/lib/python3.9/site-packages/mapproxy/seed/config.py", line 64, in load_seed_tasks_conf
    seed_conf = SeedingConfiguration(conf, mapproxy_conf=mapproxy_conf)
  File "/usr/local/lib/python3.9/site-packages/mapproxy/seed/config.py", line 143, in __init__
    self.grids = bidict((name, grid_conf.tile_grid()) for name, grid_conf in iteritems(self.mapproxy_conf.grids))
  File "/usr/local/lib/python3.9/site-packages/mapproxy/seed/util.py", line 41, in __init__
    for key, val in iterator:
  File "/usr/local/lib/python3.9/site-packages/mapproxy/seed/config.py", line 143, in <genexpr>
    self.grids = bidict((name, grid_conf.tile_grid()) for name, grid_conf in iteritems(self.mapproxy_conf.grids))
  File "/usr/local/lib/python3.9/site-packages/mapproxy/util/py.py", line 78, in wrapper
    cache[key] = func(self, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/mapproxy/config/loader.py", line 301, in tile_grid
    grid = tile_grid(
  File "/usr/local/lib/python3.9/site-packages/mapproxy/grid.py", line 106, in tile_grid
    raise ValueError('need a bbox for grid with %s' % srs)

Possible Fix

Can be "fixed" by defining a bbox also for the base grid. Would be better to make both mapproxy server and the seeding tool have the same acceptance critera for importing configuration files.

Your Environment

I use the current kartoza/docker-mapproxy image.

@weskamm weskamm added the bug label Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants