-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b8ca3c5
Showing
44 changed files
with
5,326 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 5a20730a096fd05426fdb39f2fb9397f | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
.. plateauutils documentation master file, created by | ||
sphinx-quickstart on Fri Jun 2 14:34:17 2023. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Welcome to plateauutils's documentation! | ||
======================================== | ||
|
||
This is a collection of utilities for the `Plateau <https://www.mlit.go.jp/plateau/>`_ project. | ||
|
||
Source code available at `GitHub <https://github.com/eukarya-inc/plateauutils>`_. | ||
|
||
How to develop | ||
-------------- | ||
|
||
.. code:: bash | ||
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 | ||
-------------- | ||
|
||
.. code:: bash | ||
pip install plateauutils | ||
Usage | ||
----- | ||
|
||
CityGML and MvtTile parsers. | ||
|
||
.. code:: python | ||
>>> 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': '非木造'}, {'gid': 'bldg_877dea60-35d0-4fd9-8b02-852e39c75d81', 'center': [130.41619367090038, 33.22492719812357], 'min_height': 4.454999923706055, 'measured_height': 3.0, 'building_structure_type': '非木造'},...] | ||
>>> from plateauutils.parser.mvt_tile_parser import MvtTileParser | ||
>>> target_polygon = from_wkt("POLYGON ((130.525689 33.323966, 130.522728 33.314069, 130.511441 33.308653, 130.501013 33.30937, 130.492516 33.318516, 130.493717 33.325831, 130.504618 33.332249, 130.512857 33.332213, 130.525689 33.323966))") | ||
>>> parser = MvtTileParser(target_polygon) | ||
>>> result = parser.download_and_parse("https://assets.cms.plateau.reearth.io/assets/43/53a0e1-cc14-4228-a5ef-19333a23596d/40203_kurume-shi_2020_3dtiles-mvt_3_op.zip", "/tmp") | ||
>>> result | ||
['/tmp/40203_kurume-shi_2020_3dtiles-mvt_3_op/luse/15/28254/13174.mvt'] | ||
Flood converter. | ||
|
||
.. code:: python | ||
>>> from plateauutils.flood_converter.flood_to_3dtiles import FloodTo3dtiles | ||
>>> f = FloodTo3dtiles() | ||
>>> f.convert('/tmp/floodmap_depth', '/tmp/depth_3dtiles') | ||
>>> from plateauutils.flood_converter.flood_to_png import FloodToPng | ||
>>> p = FloodToPng('/tmp/floodmap_depth') | ||
>>> p.parse('/tmp/depth_png') | ||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
modules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
plateauutils | ||
============ | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
plateauutils | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
plateauutils.citygmlfinder パッケージ | ||
====================================== | ||
|
||
plateauutils.citygmlfinder.from_reearth_cms モジュール | ||
------------------------------------------------------- | ||
|
||
.. automodule:: plateauutils.citygmlfinder.from_reearth_cms | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
plateauutils.flood_converter パッケージ | ||
=============================================================== | ||
|
||
plateauutils.flood_converter.flood_to_xyz モジュール | ||
--------------------------------------------------------------- | ||
|
||
.. automodule:: plateauutils.flood_converter.flood_to_xyz | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
plateauutils.flood_converter.flood_to_3dtiles モジュール | ||
--------------------------------------------------------------- | ||
|
||
.. automodule:: plateauutils.flood_converter.flood_to_3dtiles | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
plateauutils.flood_converter.flood_to_png モジュール | ||
--------------------------------------------------------------- | ||
|
||
.. automodule:: plateauutils.flood_converter.flood_to_png | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
plateauutils.mesh_geocorder パッケージ | ||
====================================== | ||
|
||
plateauutils.mesh_geocorder.geo_to_mesh モジュール | ||
-------------------------------------------------- | ||
|
||
.. automodule:: plateauutils.mesh_geocorder.geo_to_mesh | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
plateauutils.mesh_geocorder.polygon_to_meshcode_list モジュール | ||
--------------------------------------------------------------- | ||
|
||
.. automodule:: plateauutils.mesh_geocorder.polygon_to_meshcode_list | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
plateauutils.parser パッケージ | ||
====================================== | ||
|
||
plateauutils.parser.city_gml_parser モジュール | ||
-------------------------------------------------- | ||
|
||
.. automodule:: plateauutils.parser.city_gml_parser | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
.. automodule:: plateauutils.parser.mvt_tile_parser | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
plateauutils パッケージ | ||
======================= | ||
|
||
.. toctree:: | ||
|
||
plateauutils.mesh_geocorder | ||
plateauutils.tile_list | ||
plateauutils.parser | ||
plateauutils.citygmlfinder | ||
plateauutils.flood_converter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
plateauutils.tile_list パッケージ | ||
====================================== | ||
|
||
plateauutils.tile_list.geo_to_tile モジュール | ||
-------------------------------------------------- | ||
|
||
.. automodule:: plateauutils.tile_list.geo_to_tile | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
plateauutils.tile_list.polygon_to_tile_list モジュール | ||
--------------------------------------------------------------- | ||
|
||
.. automodule:: plateauutils.tile_list.polygon_to_tile_list | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
Oops, something went wrong.