angular - 无法在 Leaflet-geotiff 上绘制 geotiff
问题描述
我正在尝试将我的 geotiff NDVI 数据绘制到传单上作为热图;但我无法呈现数据。似乎什么都没有显示。我的 geotiff 在 EPSG:4326 - 这是 geotiff;我正在尝试两个-
https://brian-transcription-test.s3.amazonaws.com/RGB_masked.tif
我的代码是这样的-
const map = L.map('devTestingDemo').setView([ 18.5286120,73.9715862], 30);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 10,
attribution:
'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);
const windSpeed = LeafletGeotiff.leafletGeotiff(
'https://brian-transcription-test.s3.amazonaws.com/NDVINew4.tiff',
{
band: 0,
name: 'Wind speed',
renderer: new LeafletGeotiff.LeafletGeotiff.Plotty({
displayMin: 0,
displayMax: 30,
arrowSize: 20,
clampLow: false,
clampHigh: true,
colorScale: 'rainbow'
})
}
).addTo(map);
const windDirection = LeafletGeotiff.leafletGeotiff(
'https://brian-transcription-test.s3.amazonaws.com/NDVINew4.tiff',
{
band: 0,
name: 'Wind direction',
renderer: new LeafletGeotiff.LeafletGeotiff.VectorArrows({
arrowSize: 20,
displayMin: 0,
displayMax: 6,
})
}
).addTo(map);
}```
解决方案
I would try changing LeafletGeotiff to L. For example:
const windSpeed = L.leafletGeotiff(
'https://brian-transcription-test.s3.amazonaws.com/NDVINew4.tiff',
{
band: 0,
name: 'Wind speed',
renderer: new LeafletGeotiff.LeafletGeotiff.Plotty({
displayMin: 0,
displayMax: 30,
arrowSize: 20,
clampLow: false,
clampHigh: true,
colorScale: 'rainbow'
})
}
).addTo(map);
I am unsure about this part "new LeafletGeotiff.LeafletGeotiff.Plotty" you will need to experiment.
推荐阅读
- java - ListView 重叠折叠工具栏
- r - 尝试用特定年份填充缺失的数据并按顺序填充。
- hadoop - Hadoop 3.1.1 仅显示一个活动数据节点
- node.js - 如何使用 Node express 读取文本文件并将其写入 HTML 标签?
- html - 在 Github 上创建网页
- linux - 设置 ACL 权限后用户无法访问文件夹
- python-3.x - 如何在 python 循环中更新 matpplotlib 库图,该图位于 Jupyter 笔记本中的同一位置?
- c# - 如何在所有区域上拖动无边框表单?如何调整无边框表格的大小?
- javascript - 带有 react-navigation 和 redux 的 onesignal:打开通知时我无法导航到屏幕
- javascript - Javascript链接在selenium excel vba中没有响应