https://github.com/mierune/convert_fgd_dem
convert DEM ("xml" or "folder containing .xml" or ".zip containing .xml") to GeoTiff and Terrain RGB (Tiff).
https://github.com/mierune/convert_fgd_dem
geotiff python terrain-rgb
Last synced: 7 months ago
JSON representation
convert DEM ("xml" or "folder containing .xml" or ".zip containing .xml") to GeoTiff and Terrain RGB (Tiff).
- Host: GitHub
- URL: https://github.com/mierune/convert_fgd_dem
- Owner: MIERUNE
- License: mit
- Created: 2021-05-25T06:57:27.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-22T04:39:49.000Z (10 months ago)
- Last Synced: 2024-08-22T05:42:57.048Z (10 months ago)
- Topics: geotiff, python, terrain-rgb
- Language: Python
- Homepage: https://mierune.co.jp/
- Size: 94.7 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
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
- Install using pip.
```shell
% pip install git+https://github.com/MIERUNE/convert_fgd_dem#egg=convert_fgd_dem
```- using pipenv
```shell
% pipenv install git+https://github.com/MIERUNE/convert_fgd_dem#egg=convert_fgd_dem
```## usage
### download DEM
- Download from following link.
- https://fgd.gsi.go.jp/download/### write python script
```python
from pathlib import Pathfrom src.convert_fgd_dem import Dem
def main():
dem_path = Path("./data/FG-GML-6441-31-DEM5A.zip")
dem = Dem(dem_path)
print(dem.bounds_latlng)if __name__ == '__main__':
main()
```### run script
```bash
% pipenv run python main.py
{'lower_left': {'lat': 42.916666667, 'lon': 141.125}, 'upper_right': {'lat': 43.0, 'lon': 141.25}}
```