1
0
mirror of https://github.com/klokantech/tileserver-php.git synced 2025-08-29 09:10:37 +02:00

62 Commits

Author SHA1 Message Date
Dalibor Janák
e36a7e6a06 Fix of order of origin in geodetic profile 2016-02-26 08:51:47 +01:00
Dalibor Janák
7190e90845 Order of origin coords based on proj4 definition #70 2016-02-25 23:21:40 +01:00
Dalibor Janák
f3f2a995e5 Axis orientaton in wmts #70, bbox fix 2016-02-25 19:23:48 +01:00
Dalibor Janák
8233047097 Fixed bug in WGS84 tilematrixset 2016-02-24 20:18:06 +01:00
Dalibor Janák
46d79107e8 Minor code fixes 2016-02-24 18:55:42 +01:00
Dalibor Janák
a2162eeb99 Computation of matrix size 2016-02-18 16:49:48 +01:00
Dalibor Janák
27fc9a73ca Minor loop fixes 2016-02-18 08:43:49 +01:00
Dalibor Janák
4ff5d95a38 Code formating 2016-02-17 21:29:53 +01:00
Dalibor Janák
6da6b13fed Parse TileMatrixSet 2016-02-17 21:19:16 +01:00
Dalibor Janák
0609b25905 Refactoring of tilematrixsets creation 2016-02-17 20:29:39 +01:00
Dalibor Janák
ce485c6713 Allow to read metadata bounding box also as array 2016-02-17 11:39:16 +01:00
Dalibor Janák
ab7862209a Functions for parsing tilematrixset from json 2016-02-09 14:37:26 +01:00
Dalibor Janák
8b49aa2b8c Custom matrix sets generation refactring 2016-02-09 14:36:24 +01:00
Dalibor Janák
ea100ad8c2 Custom profile testing implemetation 2016-02-03 16:50:07 +01:00
Dalibor Janák
86527eeedb Merge branch 'customtiles' of https://github.com/klokantech/tileserver-php into customtiles 2016-02-03 15:24:43 +01:00
Dalibor Janák
3a9e74e3b0 Generate tilematrix sets from variables 2016-02-03 15:23:33 +01:00
Dalibor Janák
0446445248 Generate tilematrix sets from variables 2016-02-03 15:13:56 +01:00
Petr Pridal
853ca41ce0 Update travis badge + add docker hub badge 2016-02-02 15:26:11 +01:00
Petr Pridal
5b5f5e7905 Add .travis.yml to master 2016-02-02 15:21:02 +01:00
Dalibor Janák
b7960baaaa Travis status icon 2016-02-02 10:57:57 +01:00
Dalibor Janák
250512168c Fix of syntax error on PHP 5.2 (closes #63) 2016-02-01 20:51:03 +01:00
Dalibor Janák
6b5933e21f Utfgrid empty response bug fixed (related #62) 2016-01-26 22:55:34 +01:00
Dalibor Janák
f5408fd108 Utfgrid routing bug fixed 2016-01-26 22:31:12 +01:00
Dalibor Janák
dc26c831f1 Url for viewer switched to cdn. 2016-01-26 13:51:39 +01:00
Dalibor Janák
28aba6f9e2 Fix of utfgrid serving bug related with changes in #59 2016-01-25 18:32:07 +01:00
Dalibor Janák
8f6a2ced68 Fix of utfgid detection 2016-01-25 18:13:15 +01:00
Petr Pridal
79926b92fc Update README.md 2015-12-16 17:07:04 +01:00
Dalibor Janák
3343f80e09 404 with JSON message for not found tile #56 2015-12-15 16:27:28 +01:00
Dalibor Janák
c660ab8f41 Hybrid tile format support #59 2015-12-04 14:00:48 +01:00
Dalibor Janák
21d7a409fe Merge branch 'eyeNsky-master' 2015-12-01 23:06:12 +01:00
Dalibor Janák
abb4087942 Cleaning of image format choser for wmts #58 2015-12-01 23:03:54 +01:00
Dalibor Janák
0acdc04e32 Merge branch 'master' of https://github.com/eyeNsky/tileserver-php into eyeNsky-master 2015-12-01 22:32:46 +01:00
Petr Pridal
f9e801849e Implementation of MapBox vector tiles (MBTiles pbf) serving #42 2015-09-05 04:44:45 +02:00
Petr Pridal
e66e577d5d Merge pull request #52 from klokantech/large-mbtiles
Faster check for grids in large mbtiles file. Closes #51.
2015-08-13 13:58:16 +02:00
Petr Pridal
ffedfde75e Faster check for grids in large mbtiles file. Issue #51. 2015-08-12 18:01:28 +02:00
eyeNsky
b783c59585 add jpgpng support for ArcGIS Desktop 2015-04-02 08:19:48 -04:00
Petr Pridal
dd8d884bc6 Update README.md 2015-01-08 22:58:22 +01:00
Petr Pridal
8b4a5142e8 Update README.md 2014-12-05 12:27:55 +01:00
Dalibor Janák
53b379cd67 Empty tiles should have for @2x layers 512x512px Fixes #39 2014-08-15 01:01:35 +02:00
Petr Pridal
2bf8bf6d4b A bug introduced in #38 fixed (missing protocol in the WMTS Resource URL) 2014-08-12 17:23:41 +02:00
Petr Pridal
e4454b12be Merge pull request #38 from kurt-hectic/master
Protocol (such as HTTPS vs HTTP) of the request is used in the metadata
2014-08-12 17:13:15 +02:00
Timo Proescholdt
8002dbbb7d service metadata takes into account request protocol 2014-08-04 17:47:47 +02:00
dala
d4121d86d5 Router: Add support for @ in names of layers 2014-07-23 15:32:10 +02:00
dala
ea6e176ab3 Path to app problem fixed 2014-07-23 15:25:25 +02:00
Dalibor Janák
b13b8d98c8 Merge pull request #34 from Fil/patch-2
Autodetect minzoom, maxzoom and format for mbtiles
2014-07-23 13:42:04 +02:00
Dalibor Janák
f08d72262d CORS for tiles. 2014-06-27 09:19:26 +02:00
Dalibor Janák
4250eff554 Merge pull request #32 from Fil/patch-1
Check which .mbtiles files are readable
2014-06-23 14:44:02 +02:00
Fil
34ffddb765 Autodetect minzoom, maxzoom and format for mbtiles
* `format` is detected via JPEG's magic number `FFD8`
* `minzoom` and `maxzoom` are `min(zoom_level)` and `max(zoom_level)`
2014-06-20 23:15:01 +02:00
Fil
5d2662a6a3 Check which .mbtiles files are readable
In my setup some .mbtiles are links to an external hard drive - don't fail when the external drive is not connected. (Also this would allow to manage "publishing a map" via unix permission.)
2014-06-20 12:24:09 +02:00
dala
8dec7469f1 Bad links in the test were fixed. 2014-06-05 22:04:18 +02:00
dala
8170e02397 Strict standards error in PHP 5.4+ on function declarations Fixes #30 - Classes in server renamed. 2014-06-05 21:54:40 +02:00
dala
779e320dec Fixed problem with line break in MBtiles metadata. 2014-06-05 21:46:00 +02:00
dala
e226ae2cc3 URL encoding in tilejson. Problem with backslashes in url fixed. #29 2014-06-04 09:55:25 +02:00
Petr Pridal
61c866a521 Update README.md 2014-05-29 09:10:23 +02:00
Petr Pridal
987f01c85e Block direct downloading of .mbtiles by default #8 2014-05-28 08:33:49 +02:00
Petr Pridal
ed19c0a414 Update README.md 2014-05-28 08:19:44 +02:00
Petr Pridal
04a9abf170 Update README.md 2014-05-28 08:09:56 +02:00
Petr Pridal
c3e9b41110 Update README.md 2014-05-21 12:36:32 +02:00
Petr Pridal
6c840820f0 Link to a live demo at http://tileserver.maptiler.com/ 2014-05-21 12:35:42 +02:00
Petr Pridal
d4c1996815 Updated README.md, restructuring - closes #28 2014-05-21 11:06:23 +02:00
Petr Pridal
3181142368 Refactoring of .htaccess 2014-05-21 10:31:37 +02:00
Petr Pridal
5fca96fd91 Merge pull request #27 from klokantech/v1
Merge v1.0 branch
2014-05-19 21:56:01 +02:00
4 changed files with 513 additions and 528 deletions

View File

@@ -1,27 +1,33 @@
# tileserver.php integration with Apache via .htaccess
# Restrictions for data crawlers
#Options -Indexes
# Optional CORS header for cross-domain origin access to all data
#<ifModule mod_headers.c>
# Header set Access-Control-Allow-Origin *
#</ifModule>
# Mapping of the WMTS standardized URLs to real files and XML capabilities to tileserver.php
#check htaccess functionality
DirectoryIndex tileserver.php
RewriteEngine on
#some hostings require RewriteBase e.g. 1&1.com
# Option: some hostings require RewriteBase e.g. 1&1.com
#RewriteBase /
#RewriteBase /server/
#RewriteBase /directory/
#some hostings require -MultiViews e.g. 1&1.com
# Option: some hostings require -MultiViews e.g. 1&1.com
#Options -MultiViews
# Option: Restrictions for data crawlers
#Options -Indexes
# Option: CORS header for cross-domain origin access to all data
#<ifModule mod_headers.c>
# Header set Access-Control-Allow-Origin *
#</ifModule>
# Block direct downloading of .mbtiles
<FilesMatch "\.mbtiles$">
Order Allow,Deny
Deny from all
</FilesMatch>
# Mapping of the WMTS standardized URLs to real files and XML capabilities to tileserver.php
# WMTS RESTful
# ------------
# The file can be accessed directly:
@@ -69,4 +75,4 @@ RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(tileserver\.php)
RewriteRule ^(.*)$ tileserver.php?/$1 [L,QSA]
RewriteRule ^(.*)$ tileserver.php?/$1 [L,QSA]

9
.travis.yml Normal file
View File

@@ -0,0 +1,9 @@
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
script:
- php tileserver.php

View File

@@ -1,10 +1,14 @@
=================================================
TileServer PHP - OGC Web Map Tiling Server (WMTS)
=================================================
TileServer PHP: MapTiler and MBTiles maps via WMTS
==================================================
[![Build Status](https://travis-ci.org/klokantech/tileserver-php.svg)](https://travis-ci.org/klokantech/tileserver-php)
[![Docker Hub](https://img.shields.io/badge/docker-hub-blue.svg)](https://hub.docker.com/r/klokantech/tileserver-php/)
This server distributes maps to desktop, web, and mobile applications from
a standard Apache+PHP web hosting.
Try a live demo at: http://tileserver.maptiler.com/
It is a free and open-source project implementing OGC WMTS standard for
pre-rendered map tiles made with [MapTiler](http://www.maptiler.com/), GDAL2Tiles,
or available as MBTiles files.
@@ -13,9 +17,9 @@ It is the easiest and cheapest way how to serve zoomable maps in a
standardized way - practically from any ordinary web hosting.
It is easy to install - just copy the project files to a PHP-enabled
directory along with your map data containing metadata.json file.
directory along with your map data.
It comes with an online interface showing the list of the maps and step-by-step guides for desktop GIS software:
It comes with an online interface showing the list of the maps and step-by-step guides for online mapping libraries (Google Maps API, Leaflet, OpenLayers, OL3, MapBox JS, ArcGIS JS) and various desktop GIS software:
![tileserver-screenshot](https://f.cloud.github.com/assets/59284/1041807/a040160c-0fdb-11e3-8941-ab367b2a648d.png)
@@ -27,21 +31,24 @@ web hostings.
Tiles are served directly by Apache with mod_rewrite rules as static files
and therefore are very fast and with correct HTTP caching headers.
Only XML metadata are delivered via PHP.
MBTiles are served via PHP, unless they are unpacked with mbutil.
MBTiles are served via PHP, and are therfore slower, unless they are unpacked with mbutil.
[MapTiler](http://www.maptiler.com/) can render GeoTIFF, ECW, MrSID, GeoPDF into compatible map tiles. JPEG, PNG, GIF and TIFF with scanned maps or images without geolocation can be turned into standard map layers with the visual georeferencing functionality (http://youtu.be/eJxdCe9CNYg).
[![MapTiler - mapping tiles](https://cloud.githubusercontent.com/assets/59284/3037911/583d7810-e0c6-11e3-877c-6a7747b80dd3.jpg)](http://www.maptiler.com/)
Requirements:
-------------
- Apache webserver (with mod_rewrite / .htaccess supported)
- PHP 5.2+
- PHP 5.2+ with SQLite module (php5-sqlite)
(or anther webserver implementing mod_rewrite rules and PHP)
(or another webserver implementing mod_rewrite rules and PHP)
Installation:
-------------
Download the project files as a zip archive or source code from GitHub and
unpack it into a web-hosting of your choice.
Download the project files as a [zip archive](https://github.com/klokantech/tileserver-php/archive/master.zip) or source code from GitHub and unpack it into a web-hosting of your choice.
If you access the web address relevant to the installation directory,
the TileServer.php Server should display you a welcome message and further
@@ -52,14 +59,12 @@ tiles rendered with [MapTiler](http://www.maptiler.com/).
Tiles produced by open-source GDAL2Tiles or MapTiler and tiles in .mbtiles
files can be easily converted to required structure (XYZ with top-left origin
and metadata.json file).
The OpenSource utility mbutil (https://github.com/mapbox/mbutil) produces
and metadata.json file). The open-source utility [mbutil](https://github.com/mapbox/mbutil) produces
exactly the required format.
Direct reading of .mbtiles files is supported, but with decreased performance
compared to the static files in a directory. Therefore the data management,
especially upload over FTP or similar protocols, is easier.
compared to the static files in a directory. The advantage is easier data management,
especially upload over FTP or similar protocols.
Supported protocols:
--------------------
@@ -109,15 +114,11 @@ Supported protocols:
Exposed at http://[...]/layer/z/x/y.grid.json
To use the OGC WMTS services point your client (desktop or web) to the URL
To use the OGC WMTS standard point your client (desktop or web) to the URL
of 'directory' where you installed tileserver.php project with suffix "wmts".
For example: http://www.example.com/directory/wmts
You can also install the project into a root directory of a virtual server:
Then the address is: http://www.example.com/wmts
Similarly for another end points.
If you have installed the project into a root directory of a domain, then the address is: http://www.example.com/wmts
The supported WMTS requests includes:
@@ -131,7 +132,7 @@ GetTile RESTful/KVP:
http://[...]/layer/[ANYTHING-OPTIONAL][z]/[x]/[y].[ext]
http://[...]?service=wmts&request=getTile&layer=[layer]&tilematrix=[z]&tilerow=[y]&tilecol=[y]&format=[ext]
Another example requests are mentioned in the .htaccess.
Other example requests are mentioned in the .htaccess.
Performance from the web clients
--------------------------------
@@ -178,10 +179,10 @@ Password protection
HTTP Simple Authentication can be easily added to the server.
Edit the .htaccess and add these lines:
AuthUserFile /full/path/to/.htpasswd
AuthType Basic
AuthName "Secure WMTS"
Require valid-user
AuthUserFile /full/path/to/.htpasswd
AuthType Basic
AuthName "Secure WMTS"
Require valid-user
Create a file called .htpasswd with user:password format.
You can use a command-line utility:
@@ -212,9 +213,10 @@ Credits / Contributors
Project developed initially by Klokan Technologies GmbH, Switzerland in
cooperation with National Oceanic and Atmospheric Administration - NOAA, USA.
Petr Pridal - Klokan Technologies GmbH <petr.pridal@klokantech.com>
Jason Woolard - NOAA <jason.woolard@noaa.gov>
Jon Sellars - NOAA <jon.sellars@noaa.gov>
- Petr Pridal - Klokan Technologies GmbH <petr.pridal@klokantech.com>
- Jason Woolard - NOAA <jason.woolard@noaa.gov>
- Jon Sellars - NOAA <jon.sellars@noaa.gov>
- Dalibor Janak - Klokan Technologies GmbH <dalibor.janak@klokantech.com>
Tested WMTS/TMS clients
-----------------------
@@ -223,18 +225,21 @@ Tested WMTS/TMS clients
http://www.qgis.org/
- ESRI ArcGIS Desktop 10.1+ - native WMTS implementation supported
http://www.esri.com/software/arcgis/arcgis-for-desktop
- ESRI ArcGIS Online - loading via WMTS protocol
http://www.arcgis.com/
- ArcBruTiles plugin for ArcGIS 9.3+ - via TMS endpoint
http://arcbrutile.codeplex.com/
- OpenLayers WMTS Layer - including parsing GetCapabilities
http://www.openlayers.org/
- GAIA - native WMTS (issues with 3857 to be fixed)
http://www.thecarbonproject.com/gaia.php
- MapBox.js - the loading of maps via TileJSON
- MapBox.js - the loading of maps via TileJSON, interaction layer supported
https://www.mapbox.com/mapbox.js
BSD License
-----------
Copyright (C) 2012 Klokan Technologies GmbH
Copyright (C) 2015 Klokan Technologies GmbH (http://www.klokantech.com/)
All rights reserved.
Redistribution and use in source and binary forms, with or without

File diff suppressed because it is too large Load Diff