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

mapcache_detail on custom grid #307

Open
ness31 opened this issue Feb 15, 2023 · 0 comments
Open

mapcache_detail on custom grid #307

ness31 opened this issue Feb 15, 2023 · 0 comments

Comments

@ness31
Copy link

ness31 commented Feb 15, 2023

While using mapcache_detail to analyze cache coverage, I have good results while using built-in WGS84 grid

mapcache_detail -c /var/www/html/geo/mapcache.xml -t osm_transp_en -g WGS84 -z 0,10
Finished: 100.000% done
{
        "layer":        "osm_transp_en",
        "grid": "WGS84",
        "unit": "dd",
        "region":       {
                "bounding_box": [-180, -90, 180, 90],
                "geometry":     {
                        "type": "Polygon",
                        "coordinates":  [[-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90]]
                }
        },
        "zoom_levels":  [{
                        "level":        0,
                        "files":        [{
                                        "file_name":    "/tiles/FOUNDATION_LAYERS/OSM/EN_2018_transp/WGS84/0-10/osm_sql0-10.sqlite3",
                                        "file_size":    5568710656,
                                        "file_bounding_box":    [-180, -90, 180, 90],
                                        "region_in_file":       {
                                                "bounding_box": [-180, -90, 180, 90],
                                                "geometry":     {
                                                        "type": "Polygon",
                                                        "coordinates":  [[-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90]]
                                                }
                                        },
                                        "nb_tiles_in_region":   {
                                                "cached_in_file":       2,
                                                "max_in_file":  2,
                                                "coverage":     1
                                        }
                                }],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      2,
                                "max_in_level": 2,
                                "coverage":     1
                        }
                }, {
                        "level":        1,
                        "files":        [{
                                        "file_name":    "/tiles/FOUNDATION_LAYERS/OSM/EN_2018_transp/WGS84/0-10/osm_sql0-10.sqlite3",
                                        "file_size":    5568710656,
                                        "file_bounding_box":    [-180, -90, 180, 90],
                                        "region_in_file":       {
                                                "bounding_box": [-180, -90, 180, 90],
                                                "geometry":     {
                                                        "type": "Polygon",
                                                        "coordinates":  [[-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90]]
                                                }
                                        },
                                        "nb_tiles_in_region":   {
                                                "cached_in_file":       8,
                                                "max_in_file":  8,
                                                "coverage":     1
                                        }
                                }],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      8,
                                "max_in_level": 8,
                                "coverage":     1
                        }
                }, {
                        "level":        2,
                        "files":        [{
                                        "file_name":    "/tiles/FOUNDATION_LAYERS/OSM/EN_2018_transp/WGS84/0-10/osm_sql0-10.sqlite3",
                                        "file_size":    5568710656,
                                        "file_bounding_box":    [-180, -90, 180, 90],
                                        "region_in_file":       {
                                                "bounding_box": [-180, -90, 180, 90],
                                                "geometry":     {
                                                        "type": "Polygon",
                                                        "coordinates":  [[-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90]]
                                                }
                                        },
                                        "nb_tiles_in_region":   {
                                                "cached_in_file":       32,
                                                "max_in_file":  32,
                                                "coverage":     1
                                        }
                                }],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      32,
                                "max_in_level": 32,
                                "coverage":     1
                        }
                }, {
                        "level":        3,
                        "files":        [{
                                        "file_name":    "/tiles/FOUNDATION_LAYERS/OSM/EN_2018_transp/WGS84/0-10/osm_sql0-10.sqlite3",
                                        "file_size":    5568710656,
                                        "file_bounding_box":    [-180, -90, 180, 90],
                                        "region_in_file":       {
                                                "bounding_box": [-180, -90, 180, 90],
                                                "geometry":     {
                                                        "type": "Polygon",
                                                        "coordinates":  [[-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90]]
                                                }
                                        },
                                        "nb_tiles_in_region":   {
                                                "cached_in_file":       128,
                                                "max_in_file":  128,
                                                "coverage":     1
                                        }
                                }],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      128,
                                "max_in_level": 128,
                                "coverage":     1
                        }
                }, {
                        "level":        4,
                        "files":        [{
                                        "file_name":    "/tiles/FOUNDATION_LAYERS/OSM/EN_2018_transp/WGS84/0-10/osm_sql0-10.sqlite3",
                                        "file_size":    5568710656,
                                        "file_bounding_box":    [-180, -90, 180, 90],
                                        "region_in_file":       {
                                                "bounding_box": [-180, -90, 180, 90],
                                                "geometry":     {
                                                        "type": "Polygon",
                                                        "coordinates":  [[-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90]]
                                                }
                                        },
                                        "nb_tiles_in_region":   {
                                                "cached_in_file":       512,
                                                "max_in_file":  512,
                                                "coverage":     1
                                        }
                                }],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      512,
                                "max_in_level": 512,
                                "coverage":     1
                        }
                }, {
                        "level":        5,
                        "files":        [{
                                        "file_name":    "/tiles/FOUNDATION_LAYERS/OSM/EN_2018_transp/WGS84/0-10/osm_sql0-10.sqlite3",
                                        "file_size":    5568710656,
                                        "file_bounding_box":    [-180, -90, 180, 90],
                                        "region_in_file":       {
                                                "bounding_box": [-180, -90, 180, 90],
                                                "geometry":     {
                                                        "type": "Polygon",
                                                        "coordinates":  [[-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90]]
                                                }
                                        },
                                        "nb_tiles_in_region":   {
                                                "cached_in_file":       2048,
                                                "max_in_file":  2048,
                                                "coverage":     1
                                        }
                                }],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      2048,
                                "max_in_level": 2048,
                                "coverage":     1
                        }
                }, {
                        "level":        6,
                        "files":        [{
                                        "file_name":    "/tiles/FOUNDATION_LAYERS/OSM/EN_2018_transp/WGS84/0-10/osm_sql0-10.sqlite3",
                                        "file_size":    5568710656,
                                        "file_bounding_box":    [-180, -90, 180, 90],
                                        "region_in_file":       {
                                                "bounding_box": [-180, -90, 180, 90],
                                                "geometry":     {
                                                        "type": "Polygon",
                                                        "coordinates":  [[-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90]]
                                                }
                                        },
                                        "nb_tiles_in_region":   {
                                                "cached_in_file":       8192,
                                                "max_in_file":  8192,
                                                "coverage":     1
                                        }
                                }],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      8192,
                                "max_in_level": 8192,
                                "coverage":     1
                        }
                }, {
                        "level":        7,
                        "files":        [{
                                        "file_name":    "/tiles/FOUNDATION_LAYERS/OSM/EN_2018_transp/WGS84/0-10/osm_sql0-10.sqlite3",
                                        "file_size":    5568710656,
                                        "file_bounding_box":    [-180, -90, 180, 90],
                                        "region_in_file":       {
                                                "bounding_box": [-180, -90, 180, 90],
                                                "geometry":     {
                                                        "type": "Polygon",
                                                        "coordinates":  [[-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90]]
                                                }
                                        },
                                        "nb_tiles_in_region":   {
                                                "cached_in_file":       32762,
                                                "max_in_file":  32768,
                                                "coverage":     0.99981689453125
                                        }
                                }],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      32762,
                                "max_in_level": 32768,
                                "coverage":     0.99981689453125
                        }
                }, {
                        "level":        8,
                        "files":        [{
                                        "file_name":    "/tiles/FOUNDATION_LAYERS/OSM/EN_2018_transp/WGS84/0-10/osm_sql0-10.sqlite3",
                                        "file_size":    5568710656,
                                        "file_bounding_box":    [-180, -90, 180, 90],
                                        "region_in_file":       {
                                                "bounding_box": [-180, -90, 180, 90],
                                                "geometry":     {
                                                        "type": "Polygon",
                                                        "coordinates":  [[-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90]]
                                                }
                                        },
                                        "nb_tiles_in_region":   {
                                                "cached_in_file":       131072,
                                                "max_in_file":  131072,
                                                "coverage":     1
                                        }
                                }],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      131072,
                                "max_in_level": 131072,
                                "coverage":     1
                        }
                }, {
                        "level":        9,
                        "files":        [{
                                        "file_name":    "/tiles/FOUNDATION_LAYERS/OSM/EN_2018_transp/WGS84/0-10/osm_sql0-10.sqlite3",
                                        "file_size":    5568710656,
                                        "file_bounding_box":    [-180, -90, 180, 90],
                                        "region_in_file":       {
                                                "bounding_box": [-180, -90, 180, 90],
                                                "geometry":     {
                                                        "type": "Polygon",
                                                        "coordinates":  [[-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90]]
                                                }
                                        },
                                        "nb_tiles_in_region":   {
                                                "cached_in_file":       507904,
                                                "max_in_file":  524288,
                                                "coverage":     0.96875
                                        }
                                }],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      507904,
                                "max_in_level": 524288,
                                "coverage":     0.96875
                        }
                }, {
                        "level":        10,
                        "files":        [{
                                        "file_name":    "/tiles/FOUNDATION_LAYERS/OSM/EN_2018_transp/WGS84/0-10/osm_sql0-10.sqlite3",
                                        "file_size":    5568710656,
                                        "file_bounding_box":    [-180, -90, 180, 90],
                                        "region_in_file":       {
                                                "bounding_box": [-180, -90, 180, 90],
                                                "geometry":     {
                                                        "type": "Polygon",
                                                        "coordinates":  [[-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90]]
                                                }
                                        },
                                        "nb_tiles_in_region":   {
                                                "cached_in_file":       2008064,
                                                "max_in_file":  2097152,
                                                "coverage":     0.95751953125
                                        }
                                }],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      2008064,
                                "max_in_level": 2097152,
                                "coverage":     0.95751953125
                        }
                }],
        "nb_tiles_in_region":   {
                "cached_in_cache":      2690724,
                "max_in_cache": 2796202,
                "coverage":     0.96227811867669077
        },
        "sizes":        {
                "total_size_of_files":  5568710656,
                "total_nbtiles_in_files":       2690724,
                "average_tile_size":    2069,
                "estimated_max_cache_size":     5785341938,
                "estimated_cached_cache_size":  5567107956,
                "estimated_missing_cache_size": 218233982
        }
}

However when using custom grid as follows

<grid name="GoogleMaps">
    <extent>-20037508.3427892480 -20037508.3427892480 20037508.3427892480 20037508.3427892480</extent>
    <origin>top-left</origin>
    <srs>EPSG:3857</srs>
    <srsalias>EPSG:900913</srsalias>
    <units>m</units>
    <size>256 256</size>
    <resolutions>156543.0339280410 78271.51696402048 39135.75848201023 19567.87924100512 9783.939620502561 4891.969810251280 2445.984905125640 1222.992452562820 611.4962262814100 305.7481131407048 152.8740565703525 76.43702828517624 38.21851414258813 19.10925707129406 9.554628535647032 4.777314267823516 2.388657133911758 1.194328566955879 0.5971642834779395</resolutions>
</grid>

I get empty results, which is wrong

mapcache_detail -c /var/www/html/geo/mapcache.xml -t osm_transp_en -g GoogleMaps -z 0,10
Finished: 100.000% done
{
        "layer":        "osm_transp_en",
        "grid": "GoogleMaps",
        "unit": "m",
        "region":       {
                "bounding_box": [-20037508.342789248, -20037508.342789248, 20037508.342789248, 20037508.342789248],
                "geometry":     {
                        "type": "Polygon",
                        "coordinates":  [[-20037508.342789248, -20037508.342789248], [20037508.342789248, -20037508.342789248], [20037508.342789248, 20037508.342789248], [-20037508.342789248, 20037508.342789248], [-20037508.342789248, -20037508.342789248]]
                }
        },
        "zoom_levels":  [{
                        "level":        0,
                        "files":        [{
                                        "file_name":    "/tiles/FOUNDATION_LAYERS/OSM/EN_2018_transp/GoogleMaps/0-10/osm_sql0-10.sqlite3",
                                        "file_size":    4490650624,
                                        "file_bounding_box":    [-20037508.342789248, -20037508.342789248, 20037508.342789248, 20037508.342789248],
                                        "region_in_file":       {
                                                "bounding_box": [-20037508.342789248, -20037508.342789248, 20037508.342789248, 20037508.342789248],
                                                "geometry":     {
                                                        "type": "Polygon",
                                                        "coordinates":  [[-20037508.342789248, -20037508.342789248], [20037508.342789248, -20037508.342789248], [20037508.342789248, 20037508.342789248], [-20037508.342789248, 20037508.342789248], [-20037508.342789248, -20037508.342789248]]
                                                }
                                        },
                                        "nb_tiles_in_region":   {
                                                "cached_in_file":       0,
                                                "max_in_file":  0,
                                                "coverage":     null
                                        }
                                }],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      0,
                                "max_in_level": 0,
                                "coverage":     null
                        }
                }, {
                        "level":        1,
                        "files":        [{
                                        "file_name":    "/tiles/FOUNDATION_LAYERS/OSM/EN_2018_transp/GoogleMaps/0-10/osm_sql0-10.sqlite3",
                                        "file_size":    4490650624,
                                        "file_bounding_box":    [-20037508.342789248, 3.7252902984619141e-09, 20037508.34278924, 3.7252902984619141e-09],
                                        "region_in_file":       {
                                                "bounding_box": [-20037508.342789248, 3.7252902984619141e-09, 20037508.34278924, 3.7252902984619141e-09],
                                                "geometry":     {
                                                        "type": "Polygon",
                                                        "coordinates":  [[-20037508.342789248, 3.7252902984619141e-09], [20037508.34278924, 3.7252902984619141e-09], [20037508.34278924, 3.7252902984619141e-09], [-20037508.342789248, 3.7252902984619141e-09], [-20037508.342789248, 3.7252902984619141e-09]]
                                                }
                                        },
                                        "nb_tiles_in_region":   {
                                                "cached_in_file":       2,
                                                "max_in_file":  2,
                                                "coverage":     1
                                        }
                                }],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      2,
                                "max_in_level": 2,
                                "coverage":     1
                        }
                }, {
                        "level":        2,
                        "files":        [],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      0,
                                "max_in_level": 0,
                                "coverage":     null
                        }
                }, {
                        "level":        3,
                        "files":        [],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      0,
                                "max_in_level": 0,
                                "coverage":     null
                        }
                }, {
                        "level":        4,
                        "files":        [],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      0,
                                "max_in_level": 0,
                                "coverage":     null
                        }
                }, {
                        "level":        5,
                        "files":        [],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      0,
                                "max_in_level": 0,
                                "coverage":     null
                        }
                }, {
                        "level":        6,
                        "files":        [],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      0,
                                "max_in_level": 0,
                                "coverage":     null
                        }
                }, {
                        "level":        7,
                        "files":        [],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      0,
                                "max_in_level": 0,
                                "coverage":     null
                        }
                }, {
                        "level":        8,
                        "files":        [],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      0,
                                "max_in_level": 0,
                                "coverage":     null
                        }
                }, {
                        "level":        9,
                        "files":        [],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      0,
                                "max_in_level": 0,
                                "coverage":     null
                        }
                }, {
                        "level":        10,
                        "files":        [],
                        "nb_tiles_in_region":   {
                                "cached_in_level":      0,
                                "max_in_level": 0,
                                "coverage":     null
                        }
                }],
        "nb_tiles_in_region":   {
                "cached_in_cache":      2,
                "max_in_cache": 2,
                "coverage":     1
        },
        "sizes":        {
                "total_size_of_files":  4490650624,
                "total_nbtiles_in_files":       1398101,
                "average_tile_size":    3211,
                "estimated_max_cache_size":     6422,
                "estimated_cached_cache_size":  6422,
                "estimated_missing_cache_size": 0
        }
}

Is mapcache_detail working fine on custom grids ?

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

1 participant