{"id":624,"date":"2026-09-14T11:16:17","date_gmt":"2026-09-14T09:16:17","guid":{"rendered":"https:\/\/www.elrebo.de\/?p=624"},"modified":"2026-09-14T11:16:27","modified_gmt":"2026-09-14T09:16:27","slug":"openstreetmap-on-an-m5stack-core2-soc","status":"publish","type":"post","link":"https:\/\/www.elrebo.de\/index.php\/2026\/09\/14\/openstreetmap-on-an-m5stack-core2-soc\/","title":{"rendered":"OpenStreetMap on an M5STACK CORE2 SoC"},"content":{"rendered":"\n<p>In my blog post <a href=\"https:\/\/www.elrebo.de\/index.php\/2026\/08\/14\/satellite-navigation-data-on-a-small-display\/\" data-type=\"post\" data-id=\"616\">Satellite Navigation Data on a Small Display<\/a> I presented how to display data from an LC76G Satellite receiver.<\/p>\n\n\n\n<p>In this post I show how the solution was extended to show the actual position on a map.<\/p>\n\n\n\n<p>The map data is taken from OpenStreetMap and it is stored on an SD card.<\/p>\n\n\n\n<p>For my development I used the german OpenstreetMap map tiles in zoom level 16 in the area from north west of Mannheim to south east of Munich. These map datasets use approx. 55 GB on the SD card. In addition I added other zoom levels from level 13 to 17 for a smaller region.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"806\" src=\"https:\/\/www.elrebo.de\/wp-content\/uploads\/2026\/09\/Bildschirmfoto-2026-08-29-um-13.27.47-1024x806.png\" alt=\"\" class=\"wp-image-627\" srcset=\"https:\/\/www.elrebo.de\/wp-content\/uploads\/2026\/09\/Bildschirmfoto-2026-08-29-um-13.27.47-1024x806.png 1024w, https:\/\/www.elrebo.de\/wp-content\/uploads\/2026\/09\/Bildschirmfoto-2026-08-29-um-13.27.47-300x236.png 300w, https:\/\/www.elrebo.de\/wp-content\/uploads\/2026\/09\/Bildschirmfoto-2026-08-29-um-13.27.47-768x604.png 768w, https:\/\/www.elrebo.de\/wp-content\/uploads\/2026\/09\/Bildschirmfoto-2026-08-29-um-13.27.47-1536x1209.png 1536w, https:\/\/www.elrebo.de\/wp-content\/uploads\/2026\/09\/Bildschirmfoto-2026-08-29-um-13.27.47.png 1848w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Convert Map Tiles from PNG to Binary<\/h2>\n\n\n\n<p>So the first step was <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>to fetch the tile data from the OpenStreetMap tile server, <\/li>\n\n\n\n<li>convert it to a binary format and <\/li>\n\n\n\n<li>store it on an SD card. <\/li>\n<\/ul>\n\n\n\n<p>This was done using my GitHub project <a href=\"https:\/\/github.com\/elrebo-de\/compile_binary_map_tiles\">elrebo-de\/compile_binary_map_tiles<\/a>. <\/p>\n\n\n\n<p>It uses a Python script to fetch PNG map tiles from an OpenStreetMap tile server, convert it to binary and store it in a local directory.<\/p>\n\n\n\n<p>Important: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You have to choose the right OpenStreetMap tile server to get he right layout for your purpose and <\/li>\n\n\n\n<li>you have to state your own mail address in parameter HEADERS, so that your requests to the OpenStreetMap tile server conform to the usage rules.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Show Map Tiles in an LVGL Widget<\/h2>\n\n\n\n<p>The second step is to load some of the map tiles into a map container and display it on the screen. <\/p>\n\n\n\n<p>I have extended my project <a href=\"https:\/\/www.elrebo.de\/index.php\/2026\/08\/14\/satellite-navigation-data-on-a-small-display\/\" data-type=\"post\" data-id=\"616\">Satellite Navigation Data on a Small Display<\/a> with a second tabview for the map data. The current version 1.1.8 shows the OpenStreetMap map data when it is available in the chosen zoom level for the current location on the SD card.<\/p>\n\n\n\n<p>I am using the ESP Board Support Package for the M5STACK CORE2 V1.1 SoC. With this esp-bsp component it is easy to use the LVGL library to present the OSM data.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my blog post Satellite Navigation Data on a Small Display I presented how to display data from an LC76G Satellite receiver. In this post I show how the solution was extended to show the actual position on a map. The map data is taken from OpenStreetMap and it is stored on an SD card. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":625,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,1,16],"tags":[12,80,79,81,77,78],"class_list":["post-624","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esp32_socs","category-oss","category-physical_computing","tag-esp-idf","tag-gnss-stellite-receiver","tag-lvgl","tag-m5stack-core2-v1-1","tag-openstreetmap","tag-osm"],"_links":{"self":[{"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/posts\/624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/comments?post=624"}],"version-history":[{"count":4,"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/posts\/624\/revisions"}],"predecessor-version":[{"id":630,"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/posts\/624\/revisions\/630"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/media\/625"}],"wp:attachment":[{"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/media?parent=624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/categories?post=624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/tags?post=624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}