1
0
mirror of https://github.com/klokantech/tileserver-php.git synced 2025-08-01 12:10:13 +02:00

Cleaning of the PHP - router, object code, same functionality Fixes #14 Fixes #17 Fixes #19

This commit is contained in:
Dalibor Janák
2014-04-11 10:51:19 +02:00
parent 324129f8f8
commit 296a752e28
5 changed files with 1339 additions and 1125 deletions

View File

@@ -12,8 +12,12 @@ Options -MultiViews
# Mapping of the WMTS standardized URLs to real files and XML capabilities to tileserver.php
RewriteEngine On
#check htaccess functionality
SetEnv HTACCESS on
DirectoryIndex tileserver.php
RewriteEngine on
# WMTS RESTful
# ------------
# The file can be accessed directly:
@@ -32,68 +36,11 @@ RewriteRule ^([\w\d\._-]+)/.+?(\d+)/(\d+)/(\d+)\.(\w+)$ $1/$2/$3/$4.$5 [L]
# rewrite .jpeg -> .jpg
RewriteRule ^(.+).jpeg$ $1.jpg [L]
# MBTiles support at /layer/z/x/y.ext - loads the tile from mbtiles with php
# TODO: serve also 404 errors for tiles
RewriteRule ^([^\/]+\.mbtiles)\/.*?(\d+)\/(\d+)\/(\d+)\.(\w+)$ tileserver-mbtiles.php?tileset=$1&z=$2&x=$3&y=$4&ext=$5 [L]
RewriteRule ^([^\/]+\.mbtiles)\/.*?(\d+)\/(\d+)\/(\d+)\.grid.json?$ tileserver-mbtiles.php?tileset=$1&z=$2&x=$3&y=$4&ext=grid [QSA,L]
# TODO: use mod_sqlite if available to map the tiles to URL directly by apache
# Not modified HTTP 302
RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]
# WMTS KVP
# --------
# map the /?key=value&... -> /layer/z/x/y.ext KVP getTile queries directly to files
# format passed as mime-extension, cleaning formats (jpeg->jpg)
RewriteCond %{QUERY_STRING} ^(.*)format=image/jpeg(.*)$ [NC]
RewriteRule ^(.*)$ $1?%1format=jpg%2 [N]
RewriteCond %{QUERY_STRING} ^(.*)format=jpeg(.*)$ [NC]
RewriteRule ^(.*)$ $1?%1format=jpg%2 [N]
RewriteCond %{QUERY_STRING} ^(.*)format=image/png(.*)$ [NC]
RewriteRule ^(.*)$ $1?%1format=png%2 [N]
# variable order of keys: TODO: sort the same way as mime-extension to fixed order
RewriteCond %{QUERY_STRING} ^.*request=gettile.*layer=([\w\d\._-]+).*tilematrix=(\d+).*tilerow=(\d+).*tilecol=(\d+).*format=(\w+).*$ [NC]
RewriteRule ^ %1/%2/%3/%4.%5 [L]
RewriteCond %{QUERY_STRING} ^.*request=gettile.*layer=([\w\d\._-]+).*format=(\w+).*tilematrix=(\d+).*tilerow=(\d+).*tilecol=(\d+).*$ [NC]
RewriteRule ^ %1/%3/%5/%4.%2 [L]
RewriteCond %{QUERY_STRING} ^.*request=gettile.*layer=([\w\d\._-]+).*tilematrix=(\d+).*tilecol=(\d+).*tilerow=(\d+).*format=(\w+).*$ [NC]
RewriteRule ^ %1/%2/%4/%3.%5 [L]
# Example: http://www.tileserver.com/wmts?request=getTile&layer=grandcanyon&tileMatrix=10&tilerow=192&tilecol=401&format=png
# Example: http://www.tileserver.com/wmts?service=WMTS&request=GetTile&version=1.0.0&layer=ne2geo&style=&format=image/jpeg&TileMatrixSet=WGS84&TileMatrix=1&TileRow=2&TileCol=2
# WMTS ServiceMetadata (GetCapabilities)
# --------------------------------------
RewriteRule ^.*WMTSCapabilities.xml$ tileserver-wmts.php [QSA,L]
RewriteRule ^wmts$ tileserver-wmts.php [QSA,L]
RewriteCond %{QUERY_STRING} ^.*request=getcapabilities.*$ [NC]
RewriteRule ^ tileserver-wmts.php [L]
# Example: http://www.tileserver.com/dev/?service=WMTS&version=1.0.0&request=GetCapabilities
# TMS XML (ArcBruTile)
# --------------------
RewriteRule ^tms$ tileserver-tms.php [QSA,L]
RewriteRule ^(.+)/tms$ tileserver-tms.php?layer=$1 [QSA,L]
# Example: http://www.tileserver.com/dev/?service=WMTS&version=1.0.0&request=GetCapabilities
# request for non-existent tiles -> layer/none.png or none.png
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^([\w\d\._-]+)/(\d+)/(\d+)/(\d+)\.png$ $1/none.png [L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^([\w\d\._-]+)/none\.png$ none.png [L]
# request for non-existent tiles -> layer/none.jpg or none.jpg
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^([\w\d\._-]+)/(\d+)/(\d+)/(\d+)\.jpg$ $1/none.jpg [L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^([\w\d\._-]+)/none\.jpg$ none.jpg [L]
# TileJSON JSONP wrapper for MapBOX.js API
RewriteRule ^maps.jsonp?$ tileserver.php?service=json [QSA,L]
RewriteCond %{REQUEST_URI} !\.grid\.json [NC]
RewriteRule ^(.+).jsonp?$ tileserver.php?service=json&layer=$1 [QSA,L]
# If-Modified-Since (if php is not installed as cgi then comment lines below)
#RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
#RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]
# handle all request on the root '/' by tileserver.php
RewriteRule ^$ tileserver.php?service=html [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(tileserver\.php)
RewriteRule ^(.*)$ tileserver.php/$1 [L]

View File

@@ -1,123 +0,0 @@
<?php
// Based on: https://github.com/Zverik/mbtiles-php
// Read: https://github.com/klokantech/tileserver-php/issues/1
// TODO: clean the code!!!
if (!is_file($_GET['tileset'])) {
header('HTTP/1.0 404 Not Found');
echo "<h1>404 Not Found</h1>";
echo "TileServer.php could not found what you requested.";
die();
// TODO: if ($_GET['ext'] == 'png') { ...
// TODO: better image 256x256px !!!
// header("Content-type: image/png");
//print("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x01\x00\x00\x00\x01\x08\x06\x00\x00\x00\x1f\x15\xc4\x89\x00\x00\x00\rIDAT\x08\xd7c````\x00\x00\x00\x05\x00\x01^\xf3*:\x00\x00\x00\x00IEND\xaeB`\x82");
}
$tileset = $_GET['tileset'];
if (isset($_GET['tileset'])) {
$tileset = $_GET['tileset'];
$flip = true;
try {
$db = new PDO('sqlite:' . $tileset, '', '', array(PDO::ATTR_PERSISTENT => true));
if (!isset($db)) {
header('Content-type: text/plain');
print 'Incorrect tileset name: ' . $_GET['tileset'];
exit;
}
// http://c.tile.openstreetmap.org/12/2392/1190.png
$z = floatval($_GET['z']);
$y = floatval($_GET['y']);
$x = floatval($_GET['x']);
if ($flip) {
$y = pow(2, $z) - 1 - $y;
}
if ($_GET['ext'] != 'grid' && $_GET['ext'] != 'json') {
$result = $db->query('select tile_data as t from tiles where zoom_level=' . $z . ' and tile_column=' . $x . ' and tile_row=' . $y);
$data = $result->fetchColumn();
if (!isset($data) || $data === FALSE) {
// TODO: Put here ready to use empty tile!!!
$png = imagecreatetruecolor(256, 256);
imagesavealpha($png, true);
$trans_colour = imagecolorallocatealpha($png, 0, 0, 0, 127);
imagefill($png, 0, 0, $trans_colour);
header('Content-type: image/png');
imagepng($png);
//header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found');
} else {
$result = $db->query('select value from metadata where name="format"');
$resultdata = $result->fetchColumn();
$format = isset($resultdata) && $resultdata !== FALSE ? $resultdata : 'png';
if ($format == 'jpg')
$format = 'jpeg';
header('Content-type: image/' . $format);
print $data;
}
} elseif ($_GET['ext'] == 'grid' || $_GET['ext'] == 'json') {
//Get and return UTFgrid
$result = $db->query('SELECT grid FROM grids WHERE tile_column = ' . $x . ' AND tile_row = ' . $y . ' AND zoom_level = ' . $z);
$data = $result->fetchColumn();
if (!isset($data) || $data === FALSE) {
// if not exists grid data return empty json
header('Access-Control-Allow-Origin: *');
echo 'grid({});';
die;
} else {
$grid = gzuncompress($data);
$grid = substr(trim($grid), 0, -1);
//adds legend (data) to output
$grid .= ',"data":{';
$result = $db->query('SELECT key_name as key, key_json as json FROM grid_data WHERE zoom_level=' . $z . ' and tile_column=' . $x . ' and tile_row=' . $y);
while ($r = $result->fetch(PDO::FETCH_ASSOC)) {
$grid .= '"' . $r['key'] . '":' . $r['json'] . ',';
}
$grid = rtrim($grid, ',') . '}}';
// CORS headers
header('Access-Control-Allow-Origin: *');
if (isset($_GET['callback'])) {
header("Content-Type:text/javascript charset=utf-8");
echo $_GET['callback'] . '(' . $grid . ');';
} else {
header("Content-Type:text/javascript; charset=utf-8");
echo 'grid(' . $grid . ');';
}
}
}
} catch (PDOException $e) {
header('Content-type: text/plain');
print 'Error querying the database: ' . $e->getMessage();
}
}
/*
function getbaseurl() {
return 'http://'.$_SERVER['HTTP_HOST'].preg_replace('/\/(1.0.0\/)?[^\/]*$/','/',$_SERVER['REQUEST_URI']);
}
*/
function readparams($db) {
$params = array();
$result = $db->query('select name, value from metadata');
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$params[$row['name']] = $row['value'];
}
return $params;
}
function readzooms($db) {
$zooms = array();
$result = $db->query('select zoom_level from tiles group by zoom_level order by zoom_level');
while ($zoom = $result->fetchColumn()) {
$zooms[] = $zoom;
}
return $zooms;
}
?>

View File

@@ -1,85 +0,0 @@
<?php
/*
* TileServer.php project
* ======================
* https://github.com/klokantech/tileserver-php/
* Copyright (C) 2012 - Klokan Technologies GmbH
*/
require "tileserver.php";
header("Content-type: application/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
// Accepted GET strings
$layer = (array_key_exists('layer', $_GET)) ? $_GET['layer'] : "";
# -----------
# TMS SERVICE
# -----------
if ($layer === ""):
$maps = maps();
?>
<TileMapService version="1.0.0">
<TileMaps>
<?php
foreach ($maps as $m) {
$basename = $m['basename'];
$title = (array_key_exists('name', $m )) ? $m['name'] : $basename;
$profile = $m['profile'];
if ($profile == 'geodetic')
$srs = "EPSG:4326";
else
$srs = "EPSG:3857";
echo " <TileMap title=\"$title\" srs=\"$srs\" type=\"InvertedTMS\" profile=\"global-$profile\" href=\"$baseUrl$basename/tms\" />\n";
}
?>
</TileMaps>
</TileMapService>
<?php
die;
# ---------
# TMS LAYER
# ---------
else:
$m = layer($layer);
$basename = $m['basename'];
$title = (array_key_exists('name', $m )) ? $m['name'] : $basename;
$description = (array_key_exists('description', $m )) ? $m['description'] : "";
$bounds = $m['bounds'];
$profile = $m['profile'];
if ($profile == 'geodetic') {
$srs = "EPSG:4326";
$originx = -180.0;
$originy = -90.0;
$initialResolution = 0.703125;
}
else {
$srs = "EPSG:3857";
$originx = -20037508.342789;
$originy = -20037508.342789;
list( $minx, $miny ) = $mercator->LatLonToMeters($bounds[1], $bounds[0]);
list( $maxx, $maxy ) = $mercator->LatLonToMeters($bounds[3], $bounds[2]);
$bounds = array( $minx, $miny, $maxx, $maxy );
$initialResolution = 156543.03392804062;
}
$format = $m['format'];
$mime = ($format == 'jpg') ? 'image/jpeg' : 'image/png';
?>
<TileMap version="1.0.0" tilemapservice="<?php echo $baseUrl.$basename ?>" type="InvertedTMS">
<Title><?php echo htmlspecialchars($title) ?></Title>
<Abstract><?php echo htmlspecialchars($description) ?></Abstract>
<SRS><?php echo $srs ?></SRS>
<BoundingBox minx="<?php echo $bounds[0] ?>" miny="<?php echo $bounds[1] ?>" maxx="<?php echo $bounds[2] ?>" maxy="<?php echo $bounds[3] ?>" />
<Origin x="<?php echo $originx ?>" y="<?php echo $originy ?>"/>
<TileFormat width="256" height="256" mime-type="<?php echo $mime ?>" extension="<?php echo $format ?>"/>
<TileSets profile="global-<?php echo $profile ?>">
<?php for ($zoom = $m['minzoom']; $zoom < $m['maxzoom']+1; $zoom++ ) { ?>
<TileSet href="<?php echo $baseUrl.$basename.'/'.$zoom ?>" units-per-pixel="<?php echo $initialResolution / pow(2, $zoom) ?>" order="<?php echo $zoom ?>" />
<?php } ?>
</TileSets>
</TileMap>
<?php
endif; ?>

View File

@@ -1,472 +0,0 @@
<?php
/*
* TileServer.php project
* ======================
* https://github.com/klokantech/tileserver-php/
* Copyright (C) 2012 - Klokan Technologies GmbH
*/
require "tileserver.php";
$maps = maps();
header("Content-type: application/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"; ?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" 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" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
<!-- Service Identification -->
<ows:ServiceIdentification>
<ows:Title><?php echo $config['serverTitle'] ?></ows:Title>
<ows:ServiceType>OGC WMTS</ows:ServiceType>
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
</ows:ServiceIdentification>
<!-- Operations Metadata -->
<ows:OperationsMetadata>
<ows:Operation name="GetCapabilities">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="<?php echo $baseUrl ?>wmts/1.0.0/WMTSCapabilities.xml">
<ows:Constraint name="GetEncoding">
<ows:AllowedValues>
<ows:Value>RESTful</ows:Value>
</ows:AllowedValues>
</ows:Constraint>
</ows:Get>
<!-- add KVP binding in 10.1 -->
<ows:Get xlink:href="<?php echo $baseUrl ?>wmts?">
<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="<?php echo $baseUrl ?>wmts/">
<ows:Constraint name="GetEncoding">
<ows:AllowedValues>
<ows:Value>RESTful</ows:Value>
</ows:AllowedValues>
</ows:Constraint>
</ows:Get>
<ows:Get xlink:href="<?php echo $baseUrl ?>wmts?">
<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-->
<?php
foreach ($maps as $m) {
$basename = $m['basename'];
$title = (array_key_exists('name', $m )) ? $m['name'] : $basename;
$profile = $m['profile'];
$bounds = $m['bounds'];
$format = $m['format'];
$mime = ($format == 'jpg') ? 'image/jpeg' : 'image/png';
if ($profile == 'geodetic') {
$tileMatrixSet = "WGS84";
} else {
$tileMatrixSet = "GoogleMapsCompatible";
list( $minx, $miny ) = $mercator->LatLonToMeters($bounds[1], $bounds[0]);
list( $maxx, $maxy ) = $mercator->LatLonToMeters($bounds[3], $bounds[2]);
$bounds3857 = array( $minx, $miny, $maxx, $maxy );
}
?>
<Layer>
<ows:Title><?php echo $title ?></ows:Title>
<ows:Identifier><?php echo $basename ?></ows:Identifier>
<?php /* GAIA client does not like it
if ($profile == 'mercator') { ?>
<ows:BoundingBox crs="urn:ogc:def:crs:EPSG::102100">
<ows:LowerCorner><?php echo $bounds3857[1], ' ', $bounds3857[0] ?></ows:LowerCorner>
<ows:UpperCorner><?php echo $bounds3857[3], ' ', $bounds3857[2] ?></ows:UpperCorner>
</ows:BoundingBox>
<?php } */ ?>
<ows:WGS84BoundingBox crs="urn:ogc:def:crs:OGC:2:84">
<ows:LowerCorner><?php echo $bounds[0], ' ', $bounds[1] ?></ows:LowerCorner>
<ows:UpperCorner><?php echo $bounds[2], ' ', $bounds[3] ?></ows:UpperCorner>
</ows:WGS84BoundingBox>
<Style isDefault="true">
<ows:Identifier>default</ows:Identifier>
</Style>
<Format><?php echo $mime ?></Format>
<TileMatrixSetLink>
<TileMatrixSet><?php echo $tileMatrixSet ?></TileMatrixSet>
</TileMatrixSetLink>
<ResourceURL format="<?php echo $mime ?>" resourceType="tile" template="<?php echo $baseUrl ?><?php echo $basename ?>/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.<?php echo $format ?>"/>
</Layer>
<?php
}
?>
<!--TileMatrixSet-->
<TileMatrixSet>
<ows:Title>GoogleMapsCompatible</ows:Title>
<ows:Abstract>the wellknown 'GoogleMapsCompatible' tile matrix set defined by OGC WMTS specification</ows:Abstract>
<ows:Identifier>GoogleMapsCompatible</ows:Identifier>
<ows:SupportedCRS>urn:ogc:def:crs:EPSG:6.18:3:3857</ows:SupportedCRS>
<WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible</WellKnownScaleSet>
<TileMatrix>
<ows:Identifier>0</ows:Identifier>
<ScaleDenominator>559082264.0287178</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>1</MatrixWidth>
<MatrixHeight>1</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>1</ows:Identifier>
<ScaleDenominator>279541132.0143589</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>2</MatrixWidth>
<MatrixHeight>2</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>2</ows:Identifier>
<ScaleDenominator>139770566.0071794</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>4</MatrixWidth>
<MatrixHeight>4</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>3</ows:Identifier>
<ScaleDenominator>69885283.00358972</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>8</MatrixWidth>
<MatrixHeight>8</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>4</ows:Identifier>
<ScaleDenominator>34942641.50179486</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>16</MatrixWidth>
<MatrixHeight>16</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>5</ows:Identifier>
<ScaleDenominator>17471320.75089743</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>32</MatrixWidth>
<MatrixHeight>32</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>6</ows:Identifier>
<ScaleDenominator>8735660.375448715</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>64</MatrixWidth>
<MatrixHeight>64</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>7</ows:Identifier>
<ScaleDenominator>4367830.187724357</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>128</MatrixWidth>
<MatrixHeight>128</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>8</ows:Identifier>
<ScaleDenominator>2183915.093862179</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>256</MatrixWidth>
<MatrixHeight>256</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>9</ows:Identifier>
<ScaleDenominator>1091957.546931089</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>512</MatrixWidth>
<MatrixHeight>512</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>10</ows:Identifier>
<ScaleDenominator>545978.7734655447</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>1024</MatrixWidth>
<MatrixHeight>1024</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>11</ows:Identifier>
<ScaleDenominator>272989.3867327723</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>2048</MatrixWidth>
<MatrixHeight>2048</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>12</ows:Identifier>
<ScaleDenominator>136494.6933663862</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>4096</MatrixWidth>
<MatrixHeight>4096</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>13</ows:Identifier>
<ScaleDenominator>68247.34668319309</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>8192</MatrixWidth>
<MatrixHeight>8192</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>14</ows:Identifier>
<ScaleDenominator>34123.67334159654</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>16384</MatrixWidth>
<MatrixHeight>16384</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>15</ows:Identifier>
<ScaleDenominator>17061.83667079827</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>32768</MatrixWidth>
<MatrixHeight>32768</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>16</ows:Identifier>
<ScaleDenominator>8530.918335399136</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>65536</MatrixWidth>
<MatrixHeight>65536</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>17</ows:Identifier>
<ScaleDenominator>4265.459167699568</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>131072</MatrixWidth>
<MatrixHeight>131072</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>18</ows:Identifier>
<ScaleDenominator>2132.729583849784</ScaleDenominator>
<TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>262144</MatrixWidth>
<MatrixHeight>262144</MatrixHeight>
</TileMatrix>
</TileMatrixSet>
<TileMatrixSet>
<ows:Identifier>WGS84</ows:Identifier>
<ows:Title>GoogleCRS84Quad</ows:Title>
<ows:SupportedCRS>urn:ogc:def:crs:EPSG:6.3:4326</ows:SupportedCRS>
<ows:BoundingBox crs="urn:ogc:def:crs:EPSG:6.3:4326">
<LowerCorner>-180.000000 -90.000000</LowerCorner>
<UpperCorner>180.000000 90.000000</UpperCorner>
</ows:BoundingBox>
<WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleCRS84Quad</WellKnownScaleSet>
<TileMatrix>
<ows:Identifier>0</ows:Identifier>
<ScaleDenominator>279541132.01435887813568115234</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>2</MatrixWidth>
<MatrixHeight>1</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>1</ows:Identifier>
<ScaleDenominator>139770566.00717943906784057617</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>4</MatrixWidth>
<MatrixHeight>2</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>2</ows:Identifier>
<ScaleDenominator>69885283.00358971953392028809</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>8</MatrixWidth>
<MatrixHeight>4</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>3</ows:Identifier>
<ScaleDenominator>34942641.50179485976696014404</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>16</MatrixWidth>
<MatrixHeight>8</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>4</ows:Identifier>
<ScaleDenominator>17471320.75089742988348007202</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>32</MatrixWidth>
<MatrixHeight>16</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>5</ows:Identifier>
<ScaleDenominator>8735660.37544871494174003601</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>64</MatrixWidth>
<MatrixHeight>32</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>6</ows:Identifier>
<ScaleDenominator>4367830.18772435747087001801</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>128</MatrixWidth>
<MatrixHeight>64</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>7</ows:Identifier>
<ScaleDenominator>2183915.09386217873543500900</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>256</MatrixWidth>
<MatrixHeight>128</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>8</ows:Identifier>
<ScaleDenominator>1091957.54693108936771750450</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>512</MatrixWidth>
<MatrixHeight>256</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>9</ows:Identifier>
<ScaleDenominator>545978.77346554468385875225</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>1024</MatrixWidth>
<MatrixHeight>512</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>10</ows:Identifier>
<ScaleDenominator>272989.38673277234192937613</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>2048</MatrixWidth>
<MatrixHeight>1024</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>11</ows:Identifier>
<ScaleDenominator>136494.69336638617096468806</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>4096</MatrixWidth>
<MatrixHeight>2048</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>12</ows:Identifier>
<ScaleDenominator>68247.34668319308548234403</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>8192</MatrixWidth>
<MatrixHeight>4096</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>13</ows:Identifier>
<ScaleDenominator>34123.67334159654274117202</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>16384</MatrixWidth>
<MatrixHeight>8192</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>14</ows:Identifier>
<ScaleDenominator>17061.83667079825318069197</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>32768</MatrixWidth>
<MatrixHeight>16384</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>15</ows:Identifier>
<ScaleDenominator>8530.91833539912659034599</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>65536</MatrixWidth>
<MatrixHeight>32768</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>16</ows:Identifier>
<ScaleDenominator>4265.45916769956329517299</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>131072</MatrixWidth>
<MatrixHeight>65536</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>17</ows:Identifier>
<ScaleDenominator>2132.72958384978574031265</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>262144</MatrixWidth>
<MatrixHeight>131072</MatrixHeight>
</TileMatrix>
</TileMatrixSet>
</Contents>
<ServiceMetadataURL xlink:href="<?php echo $baseUrl ?>wmts/1.0.0/WMTSCapabilities.xml"/>
</Capabilities>

File diff suppressed because it is too large Load Diff