Metadata-Version: 2.4
Name: lunadem
Version: 0.2.2
Summary: Production-ready DEM generation toolkit for lunar and planetary imagery.
Project-URL: Homepage, https://github.com/Kartavya728/Generation-of-High-resolution-Digital-Elevation-Model-from-Lunar-Images-using-Photoclinometry
Project-URL: Repository, https://github.com/Kartavya728/Generation-of-High-resolution-Digital-Elevation-Model-from-Lunar-Images-using-Photoclinometry
Project-URL: Documentation, https://github.com/Kartavya728/Generation-of-High-resolution-Digital-Elevation-Model-from-Lunar-Images-using-Photoclinometry/tree/main/docs
Project-URL: Issues, https://github.com/Kartavya728/Generation-of-High-resolution-Digital-Elevation-Model-from-Lunar-Images-using-Photoclinometry/issues
Author-email: kartavya suryawanshi <kartavya.xenon@gmail.com>
License: MIT License
        
        Copyright (c) 2026 LunarDEM Contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: dem,geospatial,lunar,photoclinometry,planetary,shape-from-shading
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: >=3.8
Requires-Dist: imageio-ffmpeg>=0.5
Requires-Dist: imageio>=2.34
Requires-Dist: matplotlib>=3.8
Requires-Dist: numpy>=1.24
Requires-Dist: pydantic>=2.8
Requires-Dist: pygame>=2.6
Requires-Dist: pyyaml>=6.0
Requires-Dist: rasterio>=1.3
Requires-Dist: scipy>=1.10
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.2; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Requires-Dist: twine>=5.1; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
Requires-Dist: wheel>=0.45; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
Requires-Dist: mkdocs>=1.6; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.25; extra == 'docs'
Provides-Extra: ml
Requires-Dist: torch>=2.2; extra == 'ml'
Provides-Extra: pds
Requires-Dist: pvl>=1.3; extra == 'pds'
Provides-Extra: viz
Requires-Dist: matplotlib>=3.8; extra == 'viz'
Description-Content-Type: text/markdown

# lunadem

`lunadem` is a Python library for generating and analyzing Digital Elevation Models (DEM) from lunar and planetary images.

PyPI project page:

https://pypi.org/project/lunadem/

## Install

```bash
pip install lunadem
```

Note: in code, the module import is `lunardem`.

CLI commands are available as both `lunadem` and `lunardem`.

## Main Capabilities

- DEM generation from image input (PNG, JPG, TIFF, GeoTIFF)
- Multiple methods: `sfs`, `multiscale_sfs`, `ml`, `hybrid`
- Terrain analytics: slope, roughness, curvature, elevation statistics, histogram summaries
- Landing suitability: safe/unsafe masks, hazard filtering, score and safe-area summary
- Exports: GeoTIFF DEM, OBJ/PLY mesh, visualization images, JSON run manifest

## Core Functions (Python API)

- `generate_dem(input_data, method, config) -> DEMResult`
- `analyze_dem(dem_or_path, analysis_config) -> TerrainMetrics`
- `assess_landing(dem_or_path, landing_config) -> LandingReport`

## Quick API Example

```python
from lunardem import ReconstructionConfig, generate_dem

cfg = ReconstructionConfig(
    output={"output_dir": "output", "base_name": "moon_run"},
)
result = generate_dem("data/moon1.png", method="multiscale_sfs", config=cfg)
print(result.exports)
print(result.metrics.stats)
```

## CLI Usage

```bash
lunadem generate data/moon1.png --method sfs --output output
lunadem analyze output/reconstructed_dem.tif
lunadem landing output/reconstructed_dem.tif --spacecraft examples/configs/landing.yaml
```

## Web App Usage

Web app is provided as a demo in:

`examples/webapp/app.py`

Run:

```bash
python examples/webapp/app.py
```

Then open:

`http://127.0.0.1:5000/`

Endpoints:

- `GET /` health message
- `POST /generate` image upload + DEM generation response

## Optional Extras

```bash
pip install "lunadem[viz]"
pip install "lunadem[ml]"
pip install "lunadem[pds]"
pip install "lunadem[docs]"
pip install "lunadem[dev]"
```

## License

MIT License. See [LICENSE](LICENSE).
