![]() The next step is to create vector tiles from the regional export. This I can further process for self hosting. Then I create the regional export for the German state of Rhineland-Palatinate: $ osmium extract -bbox=6.1173598760,48.9662745077,8.5084754437,50.9404435711 -set-bounds -strategy=smart -output Īt the end I have a rectangular section of the data of the region I wish in the file. Under Ubuntu I install the tool Osmium via: $ sudo apt-get install osmium-tool The next step is to determine the bounding box of the region we want to extract.īecause Rhineland-Palatinate is on the western edge of Germany, I have to choose Europe as the larger data source so that it is actually rectangular. So, we first download the data for the surrounding area from GeoFabrik. I create the section with the Osmium tool. We can generate a rectangular section from a larger region, for example, Germany. So we want to export a German state, Rhineland-Palatinate. And then it is not uncommon that the area you want to display is not available as an export. The Geofabrik exports will be extracted around the borders of the region, and the adjacent areas will appear as gray areas when we display the map on a rectangular area. So we also want to include some parts around the border. Note though that when we want to export a region, we actually want a rectangular export. Various vendors, always provide up-to-date pre-built exports. We need an export of the data of the region we want to host. ![]() If we want to display a limited area, it is not necessary to download the data from the whole planet. A handy tool to determine the bounding box coordinates is boundingbox or calc.įirst of all, we need the data to create the map. Creating a regional openstreetmap data export I am currently working under Ubuntu 22.04. In this post, I show how I created a map using data from OpenStreetmap and Tilemaker for the German state of Rhineland-Palatinate on my local machine. ![]() Hosting the whole planet requires significant amounts of storage. But mostly it is not necessary to include the whole world in the map. The only problem in my eyes is the amount of data. Freely available data from OpenStreetmap and open source tools help to create individual vector tiles for a website. It is not that complicated to create maps yourself and host them on your own web space. However, for many applications this is not necessary. When a digital map is shown in a web application, web developers usually use online services. In addition to using the component as MapLibre GL or Leaflet Control it is also possible to use it stand-alone in Svelte projects with or without MapLibre GL or Leaflet integration.Ĭomponent API matches API described above where options and events are exposed as component properties and methods are callable on the component reference.Create and use self-hosted maps and vector tiles with Tilemaker Import * as L from "leaflet" import Svelte component ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |