[MapProxy] Summing total tiles; --dry-run

Oliver Tonnhofer olt at omniscale.de
Sun Feb 25 23:39:30 PST 2018


Hi Ian,

> On 16. Feb 2018, at 01:32, Ian Reese <ireese at linz.govt.nz> wrote:
> I am doing a dry run using a seed configs with multiple coverages:
> 
> mapproxy-seed --dry-run -f config.yml -s seedconfig.yml  --progress-file .mapproxy_seed_pgress >> summary
> 
> Selection from sample summary output:
> 
>     Seeding cache 'cache' with grid 'NZTM' in EPSG:2193
>     Limited to coverage in: -177.07120, -44.51783, -175.90962, -43.53327 (EPSG:4326)
>     Levels: [6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
>     Overwriting: no tiles
> [10:54:37] 14  66.68% 2441356.80000, 5066982.40000, 2442073.60000, 5067699.20000 (4878880 tiles)
>   nz_colour_basemap_nztm_grid:
>     Seeding cache 'cache' with grid 'NZTM' in EPSG:2193
>     Limited to coverage in: -174.70910, -62.09470, 178.78876, 0.00000 (EPSG:4326)
>     Levels: [0, 1, 2, 3, 4, 5]
>     Overwriting: no tiles
> [10:54:48]  0 100.00% -1000000.00000, 3087000.00000, 3327000.00000, 10000000.00000 (8688 tiles)
> 
> My seed config has multiple coverages. The goal is to count the total number of tiles estimated in the dry run.  The output of the dry run counts the total number of tiles produced for each coverage, but does not output an estimated total for the entire tile cache (see above example).  Maybe I am missing something simple?
> 
> I have tried to send the outputs to a file and read the summary,  summing all the lines where rendering has reached 100%.  I then realized the output does not always record 100% before moving to the next coverage to render; rendering my method incorrect.
> 
> grep '100.00%' summary | cut -d "(" -f2 | cut -d ")" -f1 | sed -r 's/tiles//g' | awk '{n += $1}; END{print n}'
> 
> From this information I have two questions:
> 
> 1. Can the the total estimated sum of the tiles be determined using `mapproxy-seed --dry-run`? 

No, each seeding task is run independently. The total number of tiles should be lower if you have overlapping coverages. 

> 1.If not, are you aware of an easier method to get a sum total number of the estimated tiles doing a `mapproxy-seed --dry-run`; using a seed config with multiple coverages? 


You can use mapproxy-util grids with a coverage to get a good estimation. 
https://mapproxy.org/docs/nightly/mapproxy_util.html#grids

And you can use union coverages to estimate for multiple coverages: https://mapproxy.org/docs/nightly/coverages.html#union


Regards,
Oliver

-- 
Oliver Tonnhofer  | Omniscale GmbH & Co KG  | https://omniscale.com
OpenStreetMap WMS and tile services         | https://maps.omniscale.com





More information about the MapProxy mailing list