Tile server for .NET5/.NET8 platform with MBTiles, Filesystem, GeoTIFF, HTTP sources and XYZ, TMS, WMTS, WMS endpoints (protocols support) and various output formats
Simple and lightweight implementation of tile server basic features for .NET 5 / .NET 8 platforms. Provides access to tiles stored in several source types and serving them using various protocols.
Source type | EPSG:3857 | EPSG:4326 | Notes |
---|---|---|---|
Local file system | ✓ | ✓ | Each tile in separate file in Z/X/Y.ext folder structure |
MBTiles (SQLite) | ✓ | — | MBTiles 1.3 Specification |
GeoTIFF local file | ✓ | ✓ | GeoTIFF basic support with EPSG:3857 or EPSG:4326 source image SRS only |
XYZ tile service | ✓ | ✓ | XYZ with local cache for EPSG:3857 SRS |
TMS tile service | ✓ | ✓ | TMS with local cache for EPSG:3857 SRS |
WMTS tile service | ✓ | ✓ | WMTS with local cache for EPSG:3857 SRS |
WMS service | ✓ | — | WMS, versions 1.1.1 and 1.3.0, cache for EPSG:3857 SRS |
PostGIS database | ✓ | — | Mapbox Vector Tiles from geometry column with EPSG:3857 SRS only |
Endpoint | EPSG:3857 | EPSG:4326 | Endpoint Url | Formats | Notes |
---|---|---|---|---|---|
XYZ (Tiled web map) | ✓ | ✓ | /xyz |
png, jpeg, webp, mvt | Can be REST style url (/{z}/{x}/{y}.ext) or url with parameters (&x={x}&y={y}&z={z}) |
TMS (Tile Map Service) | ✓ | ✓ | /tms |
png, jpeg, webp, mvt | |
WMTS (Web Map Tile Service) | ✓ | — | /wmts |
png, jpeg, webp, mvt | Support both RESTful and KVP GetTile url syntax |
WMS (Web Map Service) | ✓ | — | /wms |
png, jpeg, tiff (geotiff) | WMS versions 1.1.1 and 1.3.0 |
EPSG:4326
.PNG
, JPEG
, WEBP
) 256×256 pixels tiles, basic support of TIFF
output and PBF
/ MVT
(vector tiles).mbtiles
format database file, EPSG:3857
only), with blank tiles detection support./api
endpoint (local requests only).There are two separate solutions and corresponding projects, sharing the same source code files:
Property | .NET 5 | .NET 8 |
---|---|---|
SDK | .NET 5.0 | .NET 8.0 |
MS Visual Studio | 2019 | 2022 (17.8.3) |
Status | Legacy | Active |
Using
Tile sources are defined in appsettings.json configuration file.
Check if .NET 5 or .NET 8 runtime is installed on target system:
dotnet --info
The Microsoft.AspNetCore.App 5.0.3
/ 8.0.0
(or later versions) should present in list.
There is known issue for .NET 5 and libssl 3.x compatibility on Linux systems, use .NET 8 in this case.
Run the application using command:
dotnet tms.dll
After start, it will listen on default TCP port 5000 (using in-process Kestrel
web server)
and tile service with demo page will be available on http://localhost:5000/
address; to enable remote calls allow connections to this port in firewall settings.
Some improvements can be made for better using this application in real environment:
nginx
and configure it as reverse proxy server for Kestrel server.systemd
service manager.All external tile sources (services) in the provided appsettings.json
file are only for development / testing, not for production use.