Files
openlayers/examples/interpolation.html
2021-12-27 15:30:48 -07:00

39 lines
1.2 KiB
HTML

---
layout: example.html
title: Interpolation
shortdesc: Example of data interpolation
docs: >
Example of data resampling when using raster DEM (digital elevation model) data.
The <code>interpolate: false</code> setting is used to disable interpolation of data values during
reprojection and rendering. Elevation data is
calculated from the pixel value returned by <b>forEachLayerAtPixel</b>. For comparison a second map
with interpolation enabled returns inaccuate elevations which are very noticeable close to 3107 meters
due to how elevation is calculated from the pixel value.
tags: "disable image interpolation, xyz, maptiler, reprojection"
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value: Get your own API key at https://www.maptiler.com/cloud/
---
<div class="wrapper">
<div class="half">
<h4>Not Interpolated</h4>
<div id="map1" class="map"></div>
<div>
<label>
Elevation
<span id="info1">0.0</span> meters
</label>
</div>
</div>
<div class="half">
<h4>Interpolated</h4>
<div id="map2" class="map"></div>
<div>
<label>
Elevation
<span id="info2">0.0</span> meters
</label>
</div>
</div>
</div>