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

problem with ArcGIS compact cache v2 in local SRS #859

Open
Mar-ile opened this issue Jan 8, 2024 · 1 comment
Open

problem with ArcGIS compact cache v2 in local SRS #859

Mar-ile opened this issue Jan 8, 2024 · 1 comment

Comments

@Mar-ile
Copy link

Mar-ile commented Jan 8, 2024

Context

Hey,
I'm trying to create a WMTS with ArcGIS compat cache v2 as source. I have created two caches one in WebMercator (hereafter as cache 2 - World Map) and one in local SRS (hereafter as cache 1 - Poland Map).

So based on the documentation (https://mapproxy.org/docs/1.13.0/) I managed to load cache 2 (in WebMercator).

For cache 2 I created my own GRID based on WebMercator and defined BBOX, BBOX_SRS, ORIGIN (set to UL or NW) and resolution values (generated with mapproxy-util scales --dpi 96 --as-res-config) - loading and displaying went fine.
image

services:
  demo:
  tms:
    use_grid_names: true
    origin: ul
  kml:
    use_grid_names: true
  wmts:
  wms:
    md:
      title: MapProxy WMS Proxy
      abstract: This is a minimal MapProxy example.

layers:
  - name: worlds
    title: Cached Test Layer World
    sources: [world_cache]

caches:
  world_cache:
    sources: []
    grids: [world_grid]
    format: "image/png"
    cache:
      type: compact
      version: 2
      directory: C:/Users/ilenc/Desktop/World/cache_data/_alllayers/

grids:
  webmercator:
    base: GLOBAL_WEBMERCATOR
  world_grid:
    base: webmercator
    srs: "EPSG:3857"
    bbox:
      [
        -20037507.229594339,
        -20037507.229594339,
        20037507.229594339,
        20037507.229594339,
      ]
    bbox_srs: "EPSG:3857"
    tile_size: [256, 256]
    origin: ul
    res: [
        #  res              level     scale @96.0 DPI
        156542.7208419323, #  0   591657527.59155500
        78271.3604209660, #  1   295828763.79577702
        39135.6802104831, #  2   147914381.89788899
        19567.8401052414, #  3    73957190.94894400
        9783.9200526207, #  4    36978595.47447200
        4891.9600263104, #  5    18489297.73723600
        2445.9800131552, #  6     9244648.86861800
        1222.9900065776, #  7     4622324.43430900
        611.4950032889, #  8     2311162.21715500
        305.7475016443, #  9     1155581.10857700
        152.8737508223, # 10      577790.55428900
        76.4368754110, # 11      288895.27714400
        38.2184377055, # 12      144447.63857200
        19.1092188528, # 13       72223.81928600
        9.5546094264, # 14       36111.90964300
        4.7773047133, # 15       18055.95482200
        2.3886523567, # 16        9027.97741100
        1.1943261782, # 17        4513.98870500
        0.5971630892, # 18        2256.99435300
        0.2985815445, # 19        1128.49717600
      ]

globals:

For cache 1 I followed a similar procedure, with the difference that it was not based on WebMercator but I defined a local SRS and the other things mentioned above - everything went without problems, but nothing is displayed.
image

services:
  demo:
  tms:
    use_grid_names: true
    origin: ul
  kml:
    use_grid_names: true
  wmts:
  wms:
    srs: ["EPSG:3857", "EPSG:2180"]
    md:
      title: MapProxy WMS Proxy
      abstract: This is a minimal MapProxy example.

layers:
  - name: poland
    title: Cached Test Layer Poland
    sources: [poland_cache]

caches:
  poland_cache:
    sources: []
    grids: [poland_grid]
    format: "image/png"
    cache:
      type: compact
      version: 2
      directory: C:/Users/ilenc/Desktop/Poland/cahce_data/test_poland_3/tile/

grids:
  poland_grid:
    srs: "EPSG:2180"
    bbox:
      [
        -57484.615432610502,
        64610.002854817547,
        1059423.4743773644,
        832654.60719910637,
      ]
    tile_size: [256, 256]
    origin: nw
    res: [
        #  res            level     scale @96.0 DPI
        4233.3333333333, #  0    16000000.00000000
        2116.6666666667, #  1     8000000.00000000
        1058.3333333333, #  2     4000000.00000000
        529.1666666667, #  3     2000000.00000000
        264.5833333333, #  4     1000000.00000000
        132.2916666667, #  5      500000.00000000
        66.1458333333, #  6      250000.00000000
        # 33.0729166667, #  7      125000.00000000
        # 16.5364583333, #  8       62500.00000000
        # 8.2682291667, #  9       31250.00000000
      ]

globals:

the same transparent tile is returned if I use the re-projection from 3857 to 4326 or 2180.

where am I making a mistake, or is it supposed to work that way ?

Your Environment

  • Version used: Mapproxy v 2.0.0 and 2.0.1
  • Environment name and version (e.g. Python 2.7.5 with mod_wsgi 4.5.9): python 3.9.18
  • Server type and version: -
  • Operating System and version: Windows 11 Pro version 22H2
@simonseyock
Copy link
Contributor

Thanks for reporting this issue @Mar-ile

In theory I'd say this should work, but sadly do not have a license for ArcGIS and cannot verify it. If you can provide a sensible fix for this issue, we are happy to assist you in creating a PR for this.

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