![]() ![]() drwxrwxr-x 12 youruser youruser 4096 Nov 20 12:23. tilemaker/landcover$ ll insgesamt 20 drwxrwxr-x 5 youruser youruser 4096 Nov 24 19:25. rwxrwxrwx 1 youruser youruser 836 Nov 18 06:25 README.txt* -rwxrwxrwx 1 youruser youruser 6 Nov 18 04:43 water_polygons.cpg* -rwxrwxrwx 1 youruser youruser 1013349 Nov 18 04:43 water_polygons.dbf* -rwxrwxrwx 1 youruser youruser 145 Nov 18 04:40 water_polygons.prj* -rwxrwxrwx 1 youruser youruser 1131628636 Nov 18 04:43 water_polygons.shp* -rwxrwxrwx 1 youruser youruser 426732 Nov 18 04:43 water_polygons.shx*. You will only be told that the data is missing when you create the vector tiles./tilemaker/coastline$ ll insgesamt 1106544 drwxrwxr-x 2 youruser youruser 4096 Nov 19 19:20. If these data are important to you, then inside tilemaker now the following data have been added. Create a subdirectory named landcover and endpack the data here. Get the data for ne_10m_urban_areas, ne_10m_glaciated_areas, and ne_10m_antarctic_ice_shelves_polys here. National Earth offers download options through their website or Github. Openstreetmap provides the coastlines on the website. It is not relevant for Rhineland-Palatinate, but sometimes data from international waters and coastal areas or data from National Earth complement the output positively. $ sudo make install Using Lua 5.1 (include path is -I/usr/include/lua5.1, library path is -llua5.1) install -m 0755 -d /usr/local/bin/ install -m 0755 tilemaker /usr/local/bin/ install -d /usr/share/man/man1/ install docs/man/tilemaker.1 /usr/share/man/man1/ sudo apt install build-essential libboost-dev libboost-filesystem-dev libboost-iostreams-dev libboost-program-options-dev libboost-system-dev liblua5.1-0-dev libprotobuf-dev libshp-dev libsqlite3-dev protobuf-compiler rapidjson-devĪfter that I compile and install Tilemaker via make and sudo make install. 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. Create and use self-hosted maps and vector tiles with Tilemaker ![]()
0 Comments
Leave a Reply. |