[MapProxy] mbtiles export with shapefile fails with "Invalid BBOX"

mapproxy at matthias-keller.ch mapproxy at matthias-keller.ch
Sun Apr 1 08:17:00 PDT 2018


Hi

I've successfully seeded a 'file' cache in TMS layout from a WMS source.

Now I'd like to export certain shapes and zoom levels to a .mbtiles file.

I'm using the following command:

mapproxy-util export -f mapproxy.yaml --grid mercator --source my_cache 
--dest test.mbtiles --type mbtile --levels 1..12 --coverage 
Almeria-Basemap.shp --srs EPSG:3857

But I get the following exception:

WARN: grids are incompatible. needs to scale/reproject tiles for export.
Exporting cache 'cache' to 'test.mbtiles' with grid 'mercator' in EPSG:3857
   Limited to: -0.00003, 0.00033, -0.00002, 0.00034 (EPSG:4326)
   Levels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
[16:57:47]  1   0.00% -3.04402, 36.67210, -1.72785, 37.38527 (0 tiles)
Traceback (most recent call last):
   File "/usr/local/bin/mapproxy-util", line 11, in <module>
     load_entry_point('MapProxy==1.11.0', 'console_scripts', 
'mapproxy-util')()
   File 
"/home/matti/.local/lib/python2.7/site-packages/mapproxy/script/util.py", 
line 387, in main
     commands[command]['func'](args)
   File 
"/home/matti/.local/lib/python2.7/site-packages/mapproxy/script/export.py", 
line 289, in export_command
     concurrency=options.concurrency)
   File 
"/home/matti/.local/lib/python2.7/site-packages/mapproxy/seed/seeder.py", 
line 516, in seed_task
     tile_walker.walk()
   File 
"/home/matti/.local/lib/python2.7/site-packages/mapproxy/seed/seeder.py", 
line 322, in walk
     self._walk(bbox, self.task.levels)
   File 
"/home/matti/.local/lib/python2.7/site-packages/mapproxy/seed/seeder.py", 
line 371, in _walk
     all_subtiles=all_subtiles)
   File 
"/home/matti/.local/lib/python2.7/site-packages/mapproxy/seed/seeder.py", 
line 371, in _walk
     all_subtiles=all_subtiles)
   File 
"/home/matti/.local/lib/python2.7/site-packages/mapproxy/seed/seeder.py", 
line 371, in _walk
     all_subtiles=all_subtiles)
   File 
"/home/matti/.local/lib/python2.7/site-packages/mapproxy/seed/seeder.py", 
line 334, in _walk
     bbox_, tiles, subtiles = 
self.grid.get_affected_level_tiles(cur_bbox, current_level)
   File 
"/home/matti/.local/lib/python2.7/site-packages/mapproxy/grid.py", line 
970, in get_affected_level_tiles
     raise GridError('Invalid BBOX')
mapproxy.grid.GridError: Invalid BBOX

Not sure what I can do to fix this? Also, why are the grids 
incompatible? The "Limited to" bbox seems really strange. It should be 
sometehing like "-3.04402, 36.67210, -1.72785, 37.38527 (EPSG:4326)" 
(copied from the seeding process with the identical shp file). I've 
attached the shapefile.

Grid 'mercator' is defined as:

   mercator:
     base: GLOBAL_MERCATOR
     srs: 'EPSG:3857'

and the cache uses the same grid

Thanks a lot!

Matt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20180401/0abdfd15/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Almeria-Basemap.shp
Type: application/octet-stream
Size: 716 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20180401/0abdfd15/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Almeria-Basemap.shx
Type: application/octet-stream
Size: 108 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20180401/0abdfd15/attachment-0001.obj>


More information about the MapProxy mailing list