{"id":20915999,"url":"https://github.com/indico/indico-maps","last_synced_at":"2026-04-06T04:33:10.947Z","repository":{"id":137958354,"uuid":"141548875","full_name":"indico/indico-maps","owner":"indico","description":"Tileserver microservice for Indico Maps (Room Booking)","archived":false,"fork":false,"pushed_at":"2023-04-25T14:42:26.000Z","size":17,"stargazers_count":3,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-12-31T22:42:58.066Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/indico.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-19T08:32:10.000Z","updated_at":"2023-04-25T14:42:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"0b6391d3-cae0-475a-8744-18d8848a617e","html_url":"https://github.com/indico/indico-maps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/indico/indico-maps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indico%2Findico-maps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indico%2Findico-maps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indico%2Findico-maps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indico%2Findico-maps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indico","download_url":"https://codeload.github.com/indico/indico-maps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indico%2Findico-maps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31460103,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T16:19:16.378Z","updated_at":"2026-04-06T04:33:10.929Z","avatar_url":"https://github.com/indico.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Indico Tile Server (CERN)\n\nThis is a simple tile server microservice that we are publishing in hopes of being helpful to others who want to use the \nmap functionality in [Indico 2.2](https://github.com/indico/indico) without a commercial provider.\n\n\n## Introduction\n\nThe Indico Tile Server is based on the [TileServer GL](https://github.com/klokantech/tileserver-gl) application. Tiles are\nthe map pieces that are served to the client through HTTP. They are stored in a file\nthat can be built with the [tilemaker](ttps://github.com/systemed/tilemaker/blob/master/CONFIGURATION.md) application.\n\n`tilemaker` is using [OpenStreetMap](https://www.openstreetmap.org) (OSM) maps as input and\napplies some rendering instructions (style) to the input map, using the [Lua](https://www.lua.org)\nscripting language. The rendering definition can be based on shapes, typically polygons, that\ndefine areas of the map that must be rendered specifically (for example to highlight the\nbuildings of your laboratory in a campus). Shapes must be built with a tool like\n[QGIS](https://www.qgis.org) and stored in a [shapefile](https://wiki.openstreetmap.org/wiki/Shapefiles).\n\nEven though it is not mandatory, the tile server as provided in this repository is intended to \nbe run as a Docker container.  For this reason, this repository provides, in\n addition to configuration files for `tileserver` and `tilemaker`, a Dockerfile to build\nthe container.\nAll these files are based on CERN configuration and can be used as templates to build your own\nconfiguration. The documentation below describes the main parameters that need to be customized.\n\n## Building the tileserver container\n\n### Dockerfile\n\nThe Dockerfile is made up of two stages: each stage produces a different container.\n\n* the first one downloads the [OpenStreetMap data](https://planet.osm.ch/), crops it to a bounding box and generates an \n`*.mbtiles` file containing relevant data;\n  * Relies on [osmconvert](https://wiki.openstreetmap.org/wiki/Osmconvert) tool to extract the region\nof interest from an OSM map.\n* the second one sets up a lightweight tileserver-gl using the data generated above;\n\nThe Dockerfile must be customized to use the proper GPS coordinates and the configuration files you will create in\nthe next steps, in particular:\n\n* the shapefile passed as a `tilemaker` argument\n* the tile file name you want to use for your site, used as the output for the `osmconvert` command and as an argument\nto `tilemaker`\n\n### Shapefile\n\nTo build a shapefile, you need to use [QGIS](https://www.qgis.org) or a similar tool. See links below for the QGIS\ndocumentation.\n\nThe basic steps to create a shapefile are (based on QGIS 3.8):\n\n1. Extract the OSM map of your site. Look at the Dockerfile to see how to do it: it typically involves downloading your OSM region\nmap from [Geofabrik](https://download.geofabrik.de) and running `osmconvert` to extract the region of interest. Be aware\nthat loading a region map into QGIS generally doesn't work because it is too big.\n1. Open QGIS and create a new project if one was already open\n1. Use menu `Layer` -\u003e `Add a layer` -\u003e `Add a vector layer...`. In the `Source` pane, select the file containing your \nOSM site map (extracted during first step) and click the `Add` button: the new layer should appear in the\nbottom left pane of the QGIS window.  Click the `Close` button.\n1. Use menu `Layer` -\u003e `Create a layer` -\u003e `Create a new shapefile...`. Enter the shapefile file name (it must match\nthe parameter passed to `tilemaker` in the Dockerfile) and for the\ngeometry type, select `Polygon`. Accept all other defaults. Click the `Add` button: the shapefile layer should appear in\nthe bottom left pane of the QGIS window. Click `Close` button.\n1. With the shapefile layer selected in the bottom left pane of the QGIS window, click on the pencil icon and then\non the `Add a polygon` button, to the right of the pencil button.\n1. On your map, draw a polygon around your site or laboratory buildings, clicking at the position of each vertex. Once\nyou are done with the polygon, do a right click and accept the default ID (`null`).\n1. Repeating the previous step, draw a polygon around each set of buildings you want to identify as part of your\nsite/laboratory.\n1. Once you are done, click again on the pencil button: you should be asked a confirmation that you want to save your\nshapefile modifications.\n1. Copy the files with `.shq`, `.shx` and `.dbf` extensions to the `shapes` directory of the repository checkout.\n\n### tilemaker configuration\n\n`tilemaker` is using 2 files to drive the tile file creation, located in the `tilemaker` directory:\n\n* tiles.json: defines the different layers (building, roads, waterway...) to add to the tile file. It is important\nthat each type of object in the map is associated with the proper layer for the rendering customization (styles) to work\nas it is based on layers rather than object types. In the CERN `tiles.json`, a layer called \"cern_buildings\" is created\nwhere all the buildings inside the shapefile polygons are placed. In the `settings` part of this file, you need to\ncustomize the `name` and `description`.\n* process.lua: a [Lua](https://www.lua.org) script with a function, `way function()` called for each object in the map.\nThis function is responsible for defining the attributes of the object that must be displayed. Its main feature is\nthe selection of whether a building belongs to the site (e.g. CERN) or not. Site-specific buildings are added to a\nspecific layer (\"cern_buildings\" in the CERN configuration) and others to the layer \"buildings\". Also, in the CERN\nconfiguration, only the CERN buildings have their names displayed: it can be easily changed by moving the following\nlines out of the \"if way:Intersects(\"cern_sites\") then\":\n\n```\n            if name ~= \"\" then\n                way:LayerAsCentroid(\"building_names\")\n                way:Attribute(\"name\", name)\n            end\n```\n\nYou need to ensure that the name of the site-specific layer is the same in the `tiles.json` file and in the \n`process.lua` file.\n\n### Styles\n\nStyles define the rendering applied to the various elements. They are defined in a JSON file stored in the `styles`\ndirectory of the repository. To create your own style, start from the CERN style (`styles/cern.json`) and edit what\nis relevant. One of the CERN style features is that buildings are rendered differently depending on whether they\nare CERN buildings (buildings located inside the polygons that are part of the shapefile created before) or not.\nNormal buildings are rendered in grey whereas CERN buildings are rendered in green.\n\n### tileserver configuration\n\nThe `tileserver` configuration file is located in `tileserver/config.json` in the repository.\nIt contains 2 dictionaries which have normally one key each. The key must be the same in both\ndictionaries and will be your site name (used in the tile server URL configured in Indico).\n\nThe 2 dictionaries are:\n\n* `data`: it contains an entry `mbtiles` which is the name of the file that contains the map\ntiles. It must match the name of the file produced by `tilemaker`.\n* `styles`: this dictionary has 2 entries:\n  * `styles`: must reflect your style configuration, i.e. the JSON file relative path in the repository\n  (e.g. `styles/cern.json`).\n  * `tilejson/bounds`: an array of GPS coordinates of your site OSM map (processed by tilemaker)\n  for the south-west and the north-east corners with `latitude` the `longitude` for each one.\n\n### Build the container image\n\nAs for any Docker container image that you want to build from a Dockerfile, go into the directory\ncontaining the Dockerfile and run the following command:\n\n```\n$ docker build . -t indico-maps\n```\n\n''Note: `indico-maps` will be the tag of (name referring to) the image. You can use any\nname you prefer: nothing in the configuration refers to this name.`\n\n## Running the tile server\n\n### Starting the tileserver\n\nThe typical command to run the tileserver container built previously is:\n\n```\n$  docker run -dit --restart unless-stopped -p 8080:8080 indico-maps\n```\n\n*Note: if you used an image tag different from `indico-maps` when you built the container,\nuse it when starting the container.*\n\nThe command above runs the container as a daemon (`-d`) and ensures it is restarted when Docker\nstarts (for example after a reboot). If you want to see the tileserver output (logs), you must\nuse the command `docker attach` with the container ID returned by the `run` command. Type CTRL+C\nto exit `docker attach`.\n\n### Testing the tile server\n\nTo test your tile server, the easiest way is to use a browser and connect to `http://yourhost:8080`.\n\n### Configuring httpS access to the server\n\nSince your production Indico instance is running on HTTPS, you \nneed to use HTTPS for the tile server as well but `tileserver` doesn't support `HTTPS` natively. \nTo allow access to the tileserver through HTTPS,\nyou need to put a reverse proxy in front of it. In the proxy configuration, you need\nto ensure that you pass `Host`, `X-Forward-Host` and `X-Forwarded-Scheme` headers to the tileserver.\nWith nginx, this is done by adding the following lines to the host configuration:\n\n```\nproxy_pass_request_headers on;\nproxy_set_header Host $http_host;\nproxy_set_header X-Forwarded-Host $host;\nproxy_set_header X-Forwarded-Proto $scheme;\n```\n\n*Note: `HTTPS` is considered as a requirement otherwise otherwise you will have a mix of HTTP and HTTPS, which \nwill trigger a browser warning in the best-case scenario.*\n\n### Using from Indico\n\nTo use the tile server in Indico room booking, go to the room booking administration panel and\nin the tileserver URL field, enter something similar to:\n\n```\nhttps://your.tileserver.dom.ain/styles/\u003csitename\u003e/{z}/{x}/{y}.png\n```\n\n`\u003csitename\u003e` must be replaced by the key you used in the dictionaries of your tileserver \nconfiguration.\n\n## Useful documentation\n\n* tilemaker: see [project](https://github.com/systemed/tilemaker/blob/master/CONFIGURATION.md)\nhome page\n* tileserver: [documentation](https://tileserver.readthedocs.io/en/latest/)\n* QGIS: [documentation and tutorial](https://www.qgis.org/en/docs)\n\n## Credits\n\nThis was possible thanks to the [OpenStreetMap project](https://www.openstreetmap.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findico%2Findico-maps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findico%2Findico-maps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findico%2Findico-maps/lists"}