Code Monkey home page Code Monkey logo

tile-map-service's Introduction

Tile Map Service for .NET 5 / .NET 8

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.

Demo page

Demo page

Features

  • Supported tile sources:
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
  • Supported protocols (service endpoints) for serving tiles:
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
  • Coordinate system / tile grid support: Web Mercator / Spherical Mercator / EPSG:3857, basic support for geodetic EPSG:4326.
  • Tile image formats: raster (PNG, JPEG, WEBP) 256×256 pixels tiles, basic support of TIFF output and PBF / MVT (vector tiles).
  • Local cache for tiles from external tile services sources (modified mbtiles format database file, EPSG:3857 only), with blank tiles detection support.
  • Configuration in JSON file.
  • Reading sources configuration using /api endpoint (local requests only).

Technologies

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

Configuration file

Tile sources are defined in appsettings.json configuration file.

Running framework-dependent deployment

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.

Further improvements on Linux

Some improvements can be made for better using this application in real environment:

  • Install nginx and configure it as reverse proxy server for Kestrel server.
  • Configure application to run as a service, using systemd service manager.

TODOs

  • Support for more formats (image formats, vector tiles) and coordinate systems (tile grids).
  • Flexible settings of tile sources.
  • Configuration Web API / Web UI with authentication.
  • WMS client in Web UI.
  • Compare with reference implementations (servers and clients).
  • Using metatiles for better tiles quality.
  • Include test dataset(s) created from free data.
  • Extended diagnostics, error handling and logging.
  • Performance tests.
  • Live demo.

Some MBTiles sample datasets

All external tile sources (services) in the provided appsettings.json file are only for development / testing, not for production use.

References

tile-map-service's People

Contributors

apdevelop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

tile-map-service's Issues

I found 2 bugs

1.RasterTileSource
When I use the tif generated by arcgis, it enters an infinite loop,The problem occurs in the default of line 330, and there is no self-increment of keyIndex, so the loop cannot be escaped
image

2.Also RasterTileSource
If the image has 4 bands, the wms service will be gray and white, no longer a color map
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.