[MapProxy] seed a WMTS service and create a WMS service

Daniel O'donohue danodonohue at hotmail.com
Thu Aug 8 22:52:08 PDT 2013


here is the Get Capbilities file from the WMTS service 

<?xml version="1.0" encoding="utf-8"?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd">
  <ows:ServiceIdentification>
    <ows:Title>FOT ortofoto</ows:Title>
    <ows:Abstract>Tilet version af Ortofoto forår.</ows:Abstract>
    <ows:Keywords>
      <ows:Keyword>orto_foraar</ows:Keyword>
      <ows:Keyword>ortofoto</ows:Keyword>
      <ows:Keyword>forår</ows:Keyword>
      <ows:Keyword>foraar</ows:Keyword>
      <ows:Keyword>WMTS</ows:Keyword>
    </ows:Keywords>
    <ows:ServiceType>OGC:WMTS</ows:ServiceType>
    <ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
    <ows:Fees>Kontakt Geodatastyrelsen</ows:Fees>
    <ows:AccessConstraints>Kræver abonnement på Kortforsyningen</ows:AccessConstraints>
  </ows:ServiceIdentification>
  <ows:ServiceProvider>
    <ows:ProviderName>Geodatastyrelsen</ows:ProviderName>
    <ows:ProviderSite xlink:href="http://www.kortforsyningen.dk"/>
    <ows:ServiceContact>
      <ows:ContactInfo>
        <ows:Phone>
          <ows:Voice>+45 72 54 50 00</ows:Voice>
          <ows:Facsimile>+45 38 88 99 10</ows:Facsimile>
        </ows:Phone>
        <ows:Address>
          <ows:DeliveryPoint>Rentemestervej 8</ows:DeliveryPoint>
          <ows:City>København NV</ows:City>
          <ows:PostalCode>2400</ows:PostalCode>
          <ows:Country>Danmark</ows:Country>
          <ows:ElectronicMailAddress>kontakt at kortforsyningen.dk</ows:ElectronicMailAddress>
        </ows:Address>
      </ows:ContactInfo>
    </ows:ServiceContact>
  </ows:ServiceProvider>
  <ows:OperationsMetadata>
    <ows:Operation name="GetCapabilities">
      <ows:DCP>
        <ows:HTTP>
          <ows:Get xlink:href="http://kortforsyningen.kms.dk/orto_foraar?">
            <ows:Constraint name="GetEncoding">
              <ows:AllowedValues>
                <ows:Value>KVP</ows:Value>
              </ows:AllowedValues>
            </ows:Constraint>
          </ows:Get>
        </ows:HTTP>
      </ows:DCP>
    </ows:Operation>
    <ows:Operation name="GetTile">
      <ows:DCP>
        <ows:HTTP>
          <ows:Get xlink:href="http://kortforsyningen.kms.dk/orto_foraar?">
            <ows:Constraint name="GetEncoding">
              <ows:AllowedValues>
                <ows:Value>KVP</ows:Value>
              </ows:AllowedValues>
            </ows:Constraint>
          </ows:Get>
        </ows:HTTP>
      </ows:DCP>
    </ows:Operation>
  </ows:OperationsMetadata>
  <Contents>
    <Layer>
      <ows:Title>orto_foraar</ows:Title>
      <ows:Abstract>Tilet udgave af orto_foraar</ows:Abstract>
      <ows:WGS84BoundingBox>
        <ows:LowerCorner>3.32016 53.113655</ows:LowerCorner>
        <ows:UpperCorner>17.55777 58.35397</ows:UpperCorner>
      </ows:WGS84BoundingBox>
      <ows:Identifier>orto_foraar</ows:Identifier>
      <Style isDefault="true">
        <ows:Identifier>default</ows:Identifier>
      </Style>
      <Format>image/jpeg</Format>
      <TileMatrixSetLink>
        <TileMatrixSet>View1</TileMatrixSet>
      </TileMatrixSetLink>
    </Layer>
    <TileMatrixSet>
      <ows:Identifier>View1</ows:Identifier>
      <ows:BoundingBox>
        <ows:LowerCorner>120000 5900000</ows:LowerCorner>
        <ows:UpperCorner>1000000 6500000</ows:UpperCorner>
      </ows:BoundingBox>
      <ows:SupportedCRS>urn:ogc:def:crs:EPSG::25832</ows:SupportedCRS>
      <TileMatrix>
        <ows:Identifier>L00</ows:Identifier>
        <ScaleDenominator>5851428.57142857</ScaleDenominator>
        <TopLeftCorner>120000 6500000</TopLeftCorner>
        <TileWidth>256</TileWidth>
        <TileHeight>256</TileHeight>
        <MatrixWidth>3</MatrixWidth>
        <MatrixHeight>2</MatrixHeight>
      </TileMatrix>
      <TileMatrix>
        <ows:Identifier>L01</ows:Identifier>
        <ScaleDenominator>2925714.28571429</ScaleDenominator>
        <TopLeftCorner>120000 6500000</TopLeftCorner>
        <TileWidth>256</TileWidth>
        <TileHeight>256</TileHeight>
        <MatrixWidth>6</MatrixWidth>
        <MatrixHeight>4</MatrixHeight>
      </TileMatrix>
      <TileMatrix>
        <ows:Identifier>L02</ows:Identifier>
        <ScaleDenominator>1462857.14285714</ScaleDenominator>
        <TopLeftCorner>120000 6500000</TopLeftCorner>
        <TileWidth>256</TileWidth>
        <TileHeight>256</TileHeight>
        <MatrixWidth>12</MatrixWidth>
        <MatrixHeight>8</MatrixHeight>
      </TileMatrix>
      <TileMatrix>
        <ows:Identifier>L03</ows:Identifier>
        <ScaleDenominator>731428.57142857</ScaleDenominator>
        <TopLeftCorner>120000 6500000</TopLeftCorner>
        <TileWidth>256</TileWidth>
        <TileHeight>256</TileHeight>
        <MatrixWidth>24</MatrixWidth>
        <MatrixHeight>16</MatrixHeight>
      </TileMatrix>
      <TileMatrix>
        <ows:Identifier>L04</ows:Identifier>
        <ScaleDenominator>365714.28571429</ScaleDenominator>
        <TopLeftCorner>120000 6500000</TopLeftCorner>
        <TileWidth>256</TileWidth>
        <TileHeight>256</TileHeight>
        <MatrixWidth>48</MatrixWidth>
        <MatrixHeight>32</MatrixHeight>
      </TileMatrix>
      <TileMatrix>
        <ows:Identifier>L05</ows:Identifier>
        <ScaleDenominator>182857.14285714</ScaleDenominator>
        <TopLeftCorner>120000 6500000</TopLeftCorner>
        <TileWidth>256</TileWidth>
        <TileHeight>256</TileHeight>
        <MatrixWidth>96</MatrixWidth>
        <MatrixHeight>64</MatrixHeight>
      </TileMatrix>
      <TileMatrix>
        <ows:Identifier>L06</ows:Identifier>
        <ScaleDenominator>91428.57142857</ScaleDenominator>
        <TopLeftCorner>120000 6500000</TopLeftCorner>
        <TileWidth>256</TileWidth>
        <TileHeight>256</TileHeight>
        <MatrixWidth>192</MatrixWidth>
        <MatrixHeight>128</MatrixHeight>
      </TileMatrix>
      <TileMatrix>
        <ows:Identifier>L07</ows:Identifier>
        <ScaleDenominator>45714.28571429</ScaleDenominator>
        <TopLeftCorner>120000 6500000</TopLeftCorner>
        <TileWidth>256</TileWidth>
        <TileHeight>256</TileHeight>
        <MatrixWidth>384</MatrixWidth>
        <MatrixHeight>256</MatrixHeight>
      </TileMatrix>
      <TileMatrix>
        <ows:Identifier>L08</ows:Identifier>
        <ScaleDenominator>22857.14285714</ScaleDenominator>
        <TopLeftCorner>120000 6500000</TopLeftCorner>
        <TileWidth>256</TileWidth>
        <TileHeight>256</TileHeight>
        <MatrixWidth>768</MatrixWidth>
        <MatrixHeight>512</MatrixHeight>
      </TileMatrix>
      <TileMatrix>
        <ows:Identifier>L09</ows:Identifier>
        <ScaleDenominator>11428.57142857</ScaleDenominator>
        <TopLeftCorner>120000 6500000</TopLeftCorner>
        <TileWidth>256</TileWidth>
        <TileHeight>256</TileHeight>
        <MatrixWidth>1536</MatrixWidth>
        <MatrixHeight>1024</MatrixHeight>
      </TileMatrix>
      <TileMatrix>
        <ows:Identifier>L10</ows:Identifier>
        <ScaleDenominator>5714.28571429</ScaleDenominator>
        <TopLeftCorner>120000 6500000</TopLeftCorner>
        <TileWidth>256</TileWidth>
        <TileHeight>256</TileHeight>
        <MatrixWidth>3072</MatrixWidth>
        <MatrixHeight>2048</MatrixHeight>
      </TileMatrix>
      <TileMatrix>
        <ows:Identifier>L11</ows:Identifier>
        <ScaleDenominator>2857.14285714</ScaleDenominator>
        <TopLeftCorner>120000 6500000</TopLeftCorner>
        <TileWidth>256</TileWidth>
        <TileHeight>256</TileHeight>
        <MatrixWidth>6144</MatrixWidth>
        <MatrixHeight>4096</MatrixHeight>
      </TileMatrix>
    </TileMatrixSet>
  </Contents>
</Capabilities>


From: danodonohue at hotmail.com
To: mapproxy at lists.osgeo.org
Subject: seed a WMTS service and create a WMS service
Date: Wed, 7 Aug 2013 11:25:42 +0000




Hi list 
I am trying to create a WMS service based on a WMTS service and just cant seem to get it to work.
After seeding the WMTS service I can see that all the images in the cache a white or in the completely wrong order.
I should this is something to do with the grids I am using but can't seen to figure it out. Here is my set up .. any help / advice / hints or tips are welcome

services:
  demo:
  tms:
  wms:
    srs: ['EPSG:4326','EPSG:25832']
    image_formats: ['image/png','image/jpeg']
 
     
layers:
  - name: DK_Ortofoto
    title: Ortofoto
    sources: [Ortofoto_Cache]

caches:
  Ortofoto_Cache:
    grids: [utm32n]
    meta_size: [4,4]
    sources: [Ortofoto_WMTS_Cache]
  Ortofoto_WMTS_Cache:
    grids: [DK_Grid_WMTS]
    #disable_storage: true
    meta_size: [4,4]
    sources: [Ortofoto_WMTS]
  
sources:
  Ortofoto_WMTS:
    #only to LO9
    type: tile
    url: http://kortforsyningen.kms.dk/orto_foraar?SERVICE=WMTS&LOGIN=name&PASSWORD=password&layer=orto_foraar&REQUEST=GetTile&VERSION=1.0.0&STYLE=default&TILEMATRIXSET=View1&TILEMATRIX=L0%(z)s&TILEROW=%(y)s&TILECOL=%(x)s&FORMAT=image%%2Fjpeg
    grid:  DK_Grid_WMTS
grids:
  utm32n:
    srs: 'EPSG:25832'
    bbox: [7.9,54.3,13.2,57.8]
    bbox_srs: 'EPSG:4326'
    origin: 'nw'
  DK_Grid:
    srs: 'EPSG:25832'
    bbox: [7.9,54.3,16.2,57.8]
    bbox_srs: 'EPSG:4326'
    #bbox: [7.9,54.3,13.2,57.8]
    #bbox_srs: 'EPSG:4326'
  DK_Grid_WMTS:
    srs: 'EPSG:25832'
    bbox: [7.9,54.3,16.2,57.8]
    bbox_srs: 'EPSG:4326'
    origin: "nw"

globals:
  #next are some global configuration options for MapProxy. They mostly explain themselves, or can be looked-up in the MapProxy docs.
  cache:
    # where to store the cached images
    base_dir: './cache_data'
    # where to store lockfiles
    lock_dir: './cache_data/lockfiles'
  # image/transformation options
  image:
      resampling_method: bilinear
      jpeg_quality: 90

      
seeds:
  Cache_DK1:
    caches: [Ortofoto_Cache]
    grids: [utm32n]
    coverages: [DK_square]
    levels:
      from: 0
      to: 5

coverages:
  DK_square: 
    #srs:'EPSG:25832'
    bbox: [7.9,54.3,13.2,57.8]
    bbox_srs: 'EPSG:4326'
  DK_Buffer300:
    datasource: 'E:\ARTOGIS_Cache\DK.txt'
    srs: 'EPSG:25832'
  
 		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20130809/8efa7864/attachment-0001.html>


More information about the MapProxy mailing list