https://github.com/jetelain/mapkit
Simple Map Toolkit
https://github.com/jetelain/mapkit
aw3d30 digital-elevation-model srtm topographic-maps
Last synced: 5 months ago
JSON representation
Simple Map Toolkit
- Host: GitHub
- URL: https://github.com/jetelain/mapkit
- Owner: jetelain
- License: mit
- Created: 2022-08-13T14:07:48.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2026-01-13T21:39:38.000Z (5 months ago)
- Last Synced: 2026-01-13T23:56:04.861Z (5 months ago)
- Topics: aw3d30, digital-elevation-model, srtm, topographic-maps
- Language: C#
- Homepage:
- Size: 421 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pmad.Cartography
## Pmad.Cartography
A simple and read-to-use Digital Elevation Model for everyone based on Open Data with minimalist credits
### Digital Elevation Model sources
| Source | Resolution | License | URL | Credits |
| ------ | ------------- | ------------- | --- | --- |
| SRTM1 | 1 arc second | Public Domain | https://cdn.dem.pmad.net/SRTM1/ | NASA |
| SRTM15+| 15 arc second | Public Domain | https://cdn.dem.pmad.net/SRTM15Plus/ | Tozer, B. , D. T. Sandwell, W. H. F. Smith, C. Olson, J. R. Beale, and P. Wessel |
| AW3D30 | 1 arc second | [See terms](https://cdn.dem.pmad.net/README.txt) | https://cdn.dem.pmad.net/AW3D30/ | � JAXA |
```csharp
var database = WellKnownDatabases.GetSRTM1();
// Singe point
var elevation = await database.GetElevationAsync(new Coordinates(51.509865, -0.118092), DefaultInterpolation.Instance);
// Area
var area = await demDatabase.CreateView(new Coordinates(51, -1), new Coordinates(52, 0));
```
### Elevation contours
```csharp
var contour = new ContourGraph();
contour.Add(area, new ContourLevelGenerator(10, 10)); // 10 meters elevation interval from 10
```
### Hillshading
```csharp
var img = new HillshaderFast(new Vector2D(10, 10)) // Assume each pixel of area is 10x10 meters
.GetPixelsAlphaBelowFlat(area);
```
### File formats
#### Supported data formats
| Format | Read | Write | Remarks |
| ---------- | ---- | ----- | ----------------------------------- |
| ESRI ASCII | Yes | Yes | float only |
| DDC | Yes | Yes | Format specific to Pmad.Cartography |
| GeoTIFF | Yes | No | WSG84 projection Only |
| SRTM | Yes | No | 3 and 1 arc second |
#### Supported compression formats
Most DEM files requires a lot of disk space. To reduce the size of the files, the following compression formats are supported:
| Format | Read | Write | Remarks |
| ---------- | ---- | ----- | ----------------------------------- |
| ZSTD | Yes | Yes | Best compromise storage/CPU cost |
| GZIP | Yes | Yes | Lowest CPU cost |
| Brotli | Yes | Yes | Best compression |
| Zip | Yes | No | Zip must contains only one file |
## Pmad.Cartography.Drawing
A simple topographic map rendering toolkit.
Drawing API is still in development, it may change in the future.