Skip to main content

No project description provided

Project description

csmap-py

![GitHub Release](https://img.shields.io/github/v/release/MIERUNE/csmap-py?label=pip install csmap-py) GitHub Actions Workflow Status

module to process CSMap, based on https://www.rinya.maff.go.jp/j/seibi/sagyoudo/attach/pdf/romou-12.pdf

usage: csmap [-h] [--chunk_size CHUNK_SIZE] [--max_workers MAX_WORKERS] [--gf_size GF_SIZE]
                   [--gf_sigma GF_SIGMA] [--curvature_size CURVATURE_SIZE]
                   [--height_scale HEIGHT_SCALE HEIGHT_SCALE]
                   [--slope_scale SLOPE_SCALE SLOPE_SCALE]
                   [--curvature_scale CURVATURE_SCALE CURVATURE_SCALE]
                   input_dem_path output_path

positional arguments:
  input_dem_path        input DEM path
  output_path           output path

options:
  -h, --help            show this help message and exit
  --chunk_size CHUNK_SIZE
                        chunk size as pixel, default to 1024
  --max_workers MAX_WORKERS
                        max workers for multiprocessing, default to 1
  --gf_size GF_SIZE     gaussian filter size, default to 12
  --gf_sigma GF_SIGMA   gaussian filter sigma, default to 3
  --curvature_size CURVATURE_SIZE
                        curvature filter size, default to 1
  --height_scale HEIGHT_SCALE HEIGHT_SCALE
                        height scale, min max, default to 0.0 1000.0
  --slope_scale SLOPE_SCALE SLOPE_SCALE
                        slope scale, min max, default to 0.0 1.5
  --curvature_scale CURVATURE_SCALE CURVATURE_SCALE
                        curvature scale, min max, default to -0.1 0.1

usage

Command Line Interface

pip install csmap-py
csmap dem.tif csmap.tif
csmap dem.vrt csmap.tif # you can use virtual raster or other gdal supported format
csmap dem.tif csmap.tif --chunk_size 256 --max_workers 4 # you can use multiprocessing
csmap dem.tif csmap.tif --gf_size 3 --gf_sigma 1.0 --curvature_size 1 # you can change filter size
csmap dem.tif csmap.tif --height_scale 0 500 --slope_scale 0 1 --curvature_scale -0.2 0.2 # you can change scale

Python API

from csmap.process import process, CsmapParams

params = CsmapParams() # use default params

# convert dem to csmap
process(
    input_dem_path,
    output_path,
    chunk_size=1024,
    params
)

processing image

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

csmap_py-0.1.4.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

csmap_py-0.1.4-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file csmap_py-0.1.4.tar.gz.

File metadata

  • Download URL: csmap_py-0.1.4.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for csmap_py-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6110bb611fe4d7306f48c5a1387d1386a88b124c311debc543875625a3d43322
MD5 f4656a2687014b3a39cd5bf3b7b9755c
BLAKE2b-256 ba79ee86658d1a099973d46a1881f97e54dd783ddc0e132164aeee27313313b9

See more details on using hashes here.

File details

Details for the file csmap_py-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: csmap_py-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for csmap_py-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 95bf1eb153cde4e5393a58a8d531211ca81dc6880fa122d5f6917a7b750e7317
MD5 4f4a9f91a80dd5846c5c6ff49f0392be
BLAKE2b-256 e85a571243197ac0c75063d4006368aec8bf6a0c87fe0cb09481701ed66c6fc9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page