https://github.com/mierune/convert_fgd_dem_cli
基盤地図情報のDEM(xml)をGeoTiffやTerrain RGBに変換するCLIツール
https://github.com/mierune/convert_fgd_dem_cli
geotiff python terrain-rgb
Last synced: 2 months ago
JSON representation
基盤地図情報のDEM(xml)をGeoTiffやTerrain RGBに変換するCLIツール
- Host: GitHub
- URL: https://github.com/mierune/convert_fgd_dem_cli
- Owner: MIERUNE
- License: mit
- Created: 2021-03-03T08:14:48.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-30T02:26:52.000Z (almost 4 years ago)
- Last Synced: 2025-03-05T17:49:08.463Z (3 months ago)
- Topics: geotiff, python, terrain-rgb
- Language: Python
- Homepage: https://mierune.co.jp/
- Size: 81.1 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# convert_fgd_dem
## Overview
You can get the DEM data in xml format for any location from the following site.
[https://fgd.gsi.go.jp/download](https://fgd.gsi.go.jp/download)Run the tool with downloaded "xml" or "directory containing .xml" or ".zip containing .xml" to generate GeoTiff and Terrain RGB (Tiff).
## Installation
### for macOS
```shell
% brew install gdal
% pipenv sync
```## Usage
```shell
% pipenv run python -m convert_fgd_dem
```If it doesn't work, reinstall.
```shell
% brew install gdal
% pipenv install
% pipenv uninstall gdal
% pipenv install numpy
% pipenv run pip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="-I/usr/include/gdal"
```### for developers
- execute the following additional commands.
```shell
pipenv install -d
```## help
```shell
% pipenv run python -m convert_fgd_dem --help
Usage: __main__.py [OPTIONS]Options:
--import_path TEXT 変換対象のパスを指定(「xml」「.xmlが格納されたディレクトリ」「.xmlが格納された.zip」が対象です。
) default=./DEM/FG-GML-6441-32-DEM5A.zip--output_path TEXT GeoTiffを格納するディレクトリ default=./GeoTiff
--output_epsg TEXT 書き出すGeoTiffのEPSGコード default=EPSG:4326
--rgbify BOOLEAN terrain rgbを作成するか選択 default=False--help Show this message and exit.
```## sample
- Search of `644132` from `数値標高モデル` with [https://fgd.gsi.go.jp/download](https://fgd.gsi.go.jp/download)
- Download `FG-GML-6441-32-DEM5A.zip`
- Make directory `DEM`
- Store `FG-GML-6441-32-DEM5A.zip` in `DEM`
- Run `pipenv run python -m convert_fgd_dem`