Tile Map Service (TMS)

Basemap service in TMS format. Contains regularly updated data layers on roads (including their names and indexes), populated places, land use, hydrography, railroads, buildings, house numbers and names, and several types of points of interest, shown either as pictograms (as churches, hills, railway stations, airports) or as labels (governmental and municipal institutions, schools, supermarkets etc.). Data covers area of Estonia, Latvia and Lithuania. TMS suits perfectly to web map components for fast and dynamic map display and use.
Detailed descriptions of TMS is available here: Tile Map Service specification.

Process

Process chart

Name Type Explanation
Response message Message End The application creates response message according to "Response message" chapter
Request information from the database Action API queries the database with request parameters
Is the request valid? Gateway The application verifies request parameters
Error response Message End The application creates error response according to "Verification" chapter

Request parameters

Parameter Possible values Default value Required Description
apikey string - Yes Your authorization key
<Version> string - Yes The version of TMS protocol to be used. The available version is 1.0.0
<Layer> string - Yes Describes from which available layer the tile should be returned. Available layer and grid combinations can be seen by requesting the capabilities request of the tms service https://api.geodatahub.eu/tms/1.0.0/?apikey=[API_KEY]
<Grid> string - Yes Describes from which available grid the tile should be returned. Available layer and grid combinations can be seen by requesting the capabilities request of the TMS service https://api.geodatahub.eu/tms/1.0.0/?apikey=[API_KEY]
<ZoomLevel> integer - Yes Describes from which available zoom level the image tile is from. Available zoom levels can be seen by requesting the capabilities of the specific layer and grid combination e.g. https://api.geodatahub.eu/tms/1.0.0/GDHdefault/GLOBAL_WEBMERCATOR?apikey=[API_KEY]
<TileXIndex> integer - Yes Horizontal index of tiles, the index numbering starts from the tile grid origin
<TileYIndex> integer - Yes Vertical index of tiles, the index numbering starts from the tile grid origin

Request URL structure

TMS request URL is structured to adhere to REST interface in a way, that all the request parameters are present in the URL itself.

Typical TMS request URL matches the following structure:
https://api.geodatahub.eu/tms/<Version>/<Layer>/<Grid>/<ZoomLevel>/<TileXIndex>/<TileYIndex>.png?apikey=<API_KEY>

Sample TMS request URL:
https://api.geodatahub.eu/tms/1.0.0/GDHdefault/GLOBAL_WEBMERCATOR/14/18634/22760.png?apikey=[API_KEY]

Verification

Verification errorCode errorName errorDescription
Is API key in the request? 401 Unauthorized "No API key found in request"
Is API key correct in request? 403 Forbidden "Invalid authentication credentials"
Is API key active? 403 Forbidden "Invalid authentication credentials"
Is Version defined correctly in the request? 404 Not found "invalid request: (<provided request path>)"
Is Layer defined correctly in the request? 404 Not found "unknown layer: <provided Layer value>"
Is Grid defined correctly in the request? 404 Not found "unknown layer: <provided Layer value>"
Is ZoomLevel defined correctly in the request? 404 Not found The requested tile is outside the bounding box of the tile map.
Is TileXIndex/TileYIndex defined correctly in the request? 404 Not found "invalid request"

Scales by zoom levels

Zoom level Scale
1 1:279 541 132.01428574
2 1:139 770 566.00714287
3 1:69 885 283.00357144
4 1:34 942 641.50178572
5 1:17 471 320.75089286
6 1:8 735 660.375464285
7 1:4 367 830.187714286
8 1:2 183 915.093860714
9 1:1 091 957.546932143
10 1:545 978.7734642858
11 1:272 989.38673285715
12 1:136 494.69336642858
13 1:68 247.34668321429
14 1:34 123.673341607144
15 1:17 061.836670785713
16 1:8 530.918335392857
17 1:4 265.459167714285
18 1:2 132.7295838500004
19 1:1 066.3647919250002

Response

GetMap output examples

  • HTTP status = 200;
  • Body consists of the following values:
Output when layers=GDHdefault Output when layers=GDHdefault_bw
GDHdefault GDHdefault

GetCapabilities

Request example

https://api.geodatahub.eu/tms/1.0.0/?apikey=[API_KEY]

Response example

<?xml version="1.0"?>
<TileMapService version="1.0.0">
<Title>GeoDataHub WMS services</Title>
<Abstract>GeoDataHub WMS services</Abstract>
<TileMaps>
<TileMap title="GeoDataHub default basemap" srs="OSGEO:41001" profile="global-mercator" href="https://api.geodatahub.eu/tms/1.0.0/GDHdefault/GLOBAL_WEBMERCATOR"/>
<TileMap title="GeoDataHub default basemap in EPSG :3301 projection" srs="EPSG:3301" profile="local" href="https://api.geodatahub.eu/tms/1.0.0/GDHdefault_ee/ee_grid"/>
<TileMap title="GeoDataHub default basemap in grayscale color" srs="OSGEO:41001" profile="global-mercator" href="https://api.geodatahub.eu/tms/1.0.0/GDHdefault_bw/GLOBAL_WEBMERCATOR"/>
<TileMap title="GeoDataHub default basemap for TMS/WMTS in EPSG:3301 projection" srs="EPSG:3301" profile="local" href="https://api.geodatahub.eu/tms/1.0.0/GDHdefault_ee_tms_wmts/ee_grid"/>
<TileMap title="GeoDataHub default basemap for TMS/WMTS in EPSG:3059 projection" srs="EPSG:3059" profile="local" href="https://api.geodatahub.eu/tms/1.0.0/GDHdefault_lv_tms_wmts/lv_grid"/>
</TileMaps>
</TileMapService>

Data sources and updates

Area of Latvia and Lithuania is covered by Jāņa Sēta data. Area of Estonia is covered by Maa-amet (Estonian Land Board) and OpenStreetMap data.

The content is updated quarterly.