/osmsc

This repo created an easy-to-use Python package, named OSMsc, to improve the availability, consistency and generalizability of urban semantic data.

Primary LanguagePythonMIT LicenseMIT

OSMsc

python PyPI PyPI - Wheel PyPI - Implementation GitHub repo size GitHub repo file count PyPI - License

Updated Mar 23, 2024

This repo develops an easy-to-use Python package, named OSMsc, to improve the availability, consistency and generalizability of urban semantic data.

OSMsc v0.2.0 is coming!

Photo by Abigail Keenan on Unsplash

The main contributions of OSMsc:

  • Construct semantic city objects based on the public dataset (OpenStreetMap), and apply geometric operations to build more complete city objects;
  • Fuse 3D and tag information from multiple data sources through the spatial analysis between OSMsc layers and other non-OSM data layers;
  • Propose the semantic connector(UrbanTile), and supplement the spatial semantics;
  • Output the CityJSON-formatted semantic city models.

OSMsc的主要功能:

  • 内部集成了OSM数据的自动化下载,仅需几行简单的代码,即可完成城市对象的构建;
  • 轻松融合外部3D或者文本数据,丰富OSM城市对象的信息;
  • 城市模型内部的对象可以添加空间语义,彼此之间的空间关系可以查询或者推测出来;
  • 可以输出CityJSON或者html的可视化文件,CityJSON格式文件可以由https://ninja.cityjson.org 查看.

workflow

OSMsc workflow

Semantic city model generated by OSMsc

Installation

Install from Github

git clone https://github.com/ruirzma/osmsc.git

cd osmsc/

pip install . or python setup.py install

Install from PyPi

pip install osmsc

Note:

  • OSMnx should be installed before OSMsc, installation errors of OSMnx could be resolved in the latest OSMnx documentation.

  • If installing OSMnx manually, pls download the Python extension packages (Rtree, GDAL, Fiona, rasterio, etc.) from here for Windows and Homebrew🍺 for MacOS.

Examples

OSMsc demonstration notebooks

Citation

If you use OSMsc in scientific work, I kindly ask you to cite it:

@article{doi:10.1080/13658816.2023.2266824,
author = {Rui Ma, Jiayu Chen, Chendi Yang and Xin Li},
title = {OSMsc: a framework for semantic 3D city modeling using OpenStreetMap},
journal = {International Journal of Geographical Information Science},
volume = {0},
number = {0},
pages = {1-26},
year = {2023},
publisher = {Taylor & Francis},
doi = {10.1080/13658816.2023.2266824},
URL = {https://doi.org/10.1080/13658816.2023.2266824},
eprint = {https://doi.org/10.1080/13658816.2023.2266824}}

Reference

1. Geoff Boeing, OSMnx, https://github.com/gboeing/osmnx
2. Nick Bristow, OSMuf, https://github.com/AtelierLibre/osmuf
3. Joris Van den Bossche, GeoPandas, https://github.com/geopandas/geopandas