<commit_before>Leaflet-raw-DEM
===============

A first attempt at reading and visualizing raw elevation data with Leaflet using Canvas.

Supports reading zipped DEM (Digital Elevation Model) files in the [ESRI BIL](http://resources.arcgis.com/en/help/main/10.1/index.html#//009t00000010000000) (Band interleaved by line) raster format (single band only), e.g. as provided by [USGS EarthExplorer](http://earthexplorer.usgs.gov/) for SRTM 1 Arc-Second Global.

Renders the data as raster grid, similar (yet very basic) to what desktop GIS like QGIS and uDig do, but in the Browser. With elevation labels on high zooms.

File viewer:
* [index.html](http://nrenner.github.io/leaflet-raw-dem/)  
Open local zipped BIL files (*_bil.zip) using the file dialog or drag&drop

Examples:
* [example/mallorca.html](http://nrenner.github.io/leaflet-raw-dem/example/mallorca.html) - [detail](http://nrenner.github.io/leaflet-raw-dem/example/mallorca.html#zoom=18&lat=39.828352&lon=3.115423) (building)  
Two SRTM 1-arc v3 files (1.9 MB and 2.5 MB) as example, loading may takes a few seconds
* [example/clip.html](http://nrenner.github.io/leaflet-raw-dem/example/clip.html)  
Minimal example using a 6*3 grid sample file, no extra dependencies, for development

## Status

A work in progress on hold, known issues, needs validation and testing. Provided as is, not sure if continued or maintained (low priority).

[See also](#See-also) for alternatives.

## Limitations

* only single band BIL files supported
* assuming 16-bit signed integers and Little-endian (Intel) byte-order
* Spherical Mercator (EPSG 3857) only (?)
* only linear color scale supported right now
* ...

### Known issues

* border artefacts
* viewport not always fully covered at last row/column
* ...

## Usage

Convert other formats to BIL using ``gdal_translate`` with the [GDAL EHdr](http://www.gdal.org/frmt_various.html#EHdr) format, e.g.:

    mkdir tmp
    gdal_translate -of EHdr srtm_37_05/srtm_37_05.tif tmp/srtm_37_05.bil<commit_msg>fix anchor<commit_after>Leaflet-raw-DEM
===============

A first attempt at reading and visualizing raw elevation data with Leaflet using Canvas.

Supports reading zipped DEM (Digital Elevation Model) files in the [ESRI BIL](http://resources.arcgis.com/en/help/main/10.1/index.html#//009t00000010000000) (Band interleaved by line) raster format (single band only), e.g. as provided by [USGS EarthExplorer](http://earthexplorer.usgs.gov/) for SRTM 1 Arc-Second Global.

Renders the data as raster grid, similar (yet very basic) to what desktop GIS like QGIS and uDig do, but in the Browser. With elevation labels on high zooms.

File viewer:
* [index.html](http://nrenner.github.io/leaflet-raw-dem/)  
Open local zipped BIL files (*_bil.zip) using the file dialog or drag&drop

Examples:
* [example/mallorca.html](http://nrenner.github.io/leaflet-raw-dem/example/mallorca.html) - [detail](http://nrenner.github.io/leaflet-raw-dem/example/mallorca.html#zoom=18&lat=39.828352&lon=3.115423) (building)  
Two SRTM 1-arc v3 files (1.9 MB and 2.5 MB) as example, loading may takes a few seconds
* [example/clip.html](http://nrenner.github.io/leaflet-raw-dem/example/clip.html)  
Minimal example using a 6*3 grid sample file, no extra dependencies, for development

## Status

A work in progress on hold, known issues, needs validation and testing. Provided as is, not sure if continued or maintained (low priority).

[See also](#see-also) for alternatives.

## Limitations

* only single band BIL files supported
* assuming 16-bit signed integers and Little-endian (Intel) byte-order
* Spherical Mercator (EPSG 3857) only (?)
* only linear color scale supported right now
* ...

### Known issues

* border artefacts
* viewport not always fully covered at last row/column
* ...

## Usage

Convert other formats to BIL using ``gdal_translate`` with the [GDAL EHdr](http://www.gdal.org/frmt_various.html#EHdr) format, e.g.:

    mkdir tmp
    gdal_translate -of EHdr srtm_37_05/srtm_37_05.tif tmp/srtm_37_05.bil
{'fraction_non_alphanumeric': 0.11635455680399501, 'fraction_numerical': 0.031960049937578026, 'mean_word_length': 4.442934782608695, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1581236', 'n_tokens_mistral': 1434, 'n_tokens_neox': 1309, 'n_words': 430}