A collection of utilities for the Plateau project
Project description
This is a collection of utilities for the Plateau project.
>>> from shapely.geometry import Point
>>> from plateauutils.mesh_geocorder.geo_to_mesh import point_to_meshcode
>>> point = Point(139.71475, 35.70078)
>>> mesh_code = point_to_meshcode(point, "2/1")
>>> mesh_code
'533945471'
>>> from shapely import from_wkt
>>> from plateauutils.parser.city_gml_parser import CityGMLParser
>>> target_polygon = from_wkt("POLYGON ((130.41249721501615 33.224722548534864, 130.41249721501615 33.22506264293093, 130.41621606802997 33.22506264293093, 130.41621606802997 33.224722548534864, 130.41249721501615 33.224722548534864))")
>>> parser = CityGMLParser(target_polygon)
>>> result = parser.download_and_parse("https://assets.cms.plateau.reearth.io/assets/d6/70821e-7f58-4f69-bc34-341875704e78/40203_kurume-shi_2020_citygml_3_op.zip", "/tmp")
>>> result
[{'gid': 'bldg_383f1804-aa34-4634-949f-f769e09fa92d', 'center': [130.41263587199947, 33.22489181671553], 'min_height': 3.805999994277954, 'measured_height': 9.3, 'building_structure_type': '610'}, {'gid': 'bldg_877dea60-35d0-4fd9-8b02-852e39c75d81', 'center': [130.41619367090038, 33.22492719812357], 'min_height': 4.454999923706055, 'measured_height': 3.0, 'building_structure_type': '610'},...]
How to develop
python3.9 -m venv venv
./venv/bin/activate
pip install -U pip
pip install -r dev-requirements.txt
pytest --cov=plateauutils --cov-report=html --cov-fail-under=90
How to install
pip install plateauutils
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
plateauutils-0.0.2.tar.gz
(20.7 kB
view details)
Built Distribution
File details
Details for the file plateauutils-0.0.2.tar.gz
.
File metadata
- Download URL: plateauutils-0.0.2.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7072927833a0391f8df0b4479c724fa91fe059e3234cc6be07d7f8be1db53273 |
|
MD5 | cf03627a8024db57024a7e3028bc111c |
|
BLAKE2b-256 | 76d0b8406d3c4945207c5c243aead4c6db23ef8eb98d09e564940d3c0872d490 |
File details
Details for the file plateauutils-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: plateauutils-0.0.2-py3-none-any.whl
- Upload date:
- Size: 26.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | daebc12f4746d5d50ee93b921ceebf89fbae1fb9ef0e334480ec69daee8b7df6 |
|
MD5 | 4d06ae424e572fbd4091072d3a86b400 |
|
BLAKE2b-256 | be5d5ca3ecbde34447981b978bf80a2e4e10559b0282a3d5adcb6fb411a04aa5 |