Open Street Maps (OSM) for Machine Learning

Version 1.1 (1.06 MB) by Adam Campos
Using Matlab to process Open Street Maps data to produce features for ML projects
84 Downloads
Updated 23 Mar 2022

Open Street Maps for Machine Learning

Introduction

Open Street Map is an open-source community collaboration where anybody is free to contribute to building the map of the world. Several organizations donate satellite and aerial imagery to the project and users can overlay vector data onto the map in addition to explanatory tags. However, exporting the data and working with the traditional datatype associated with Open Street Maps ( .osm ) can be difficult - while there are specific tools in Python and QGIS that can help download the data in a format that you need, there are attributes lost in translation. The purpose of this project is to better understand the .osm file format and be able to parse the exact information needed for my own use case, which is building feature data for Machine Learning projects. Additionally, this does not rely on any plugins or dark-box applications, so all the code is accessible and modifiable for your use case.

Operations

Input: .osm files Output: Two separate datasets that contain a unique ID number, the date created, the primary and secondary category and the vector geometry (relies on Matlab Mapping Toolbox).

  • Buildings
  • Roads

Long Term Plan

Over time, I plan to build additional modules to extract certain features or items with relevant tags. Additionally, there are speed improvements / integration that I will make once this module has been tested more thoroughly. But for the moment, it suits my use case.

Cite As

Adam Campos (2024). Open Street Maps (OSM) for Machine Learning (https://github.com/ghidora77/Matlab-OpenStreetMaps-ML/releases/tag/1.1), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2022a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.