openlayers:实现不同投影的两个Sentinel 2 COG
两个Sentinel 2 COG,每个都有可见红、绿色和蓝色波段以及近红外波段的光源。 相邻区域位于其各自UTM区域的边缘,因此必须重新投影至少一个COG才能在同一地图上显示。
main.js
import GeoTIFF from 'ol/source/GeoTIFF.js';
import Map from 'ol/Map.js';
import TileLayer from 'ol/layer/WebGLTile.js';
import proj4 from 'proj4';
import {createEmpty, extend, getCenter} from 'ol/extent.js';
import {register} from 'ol/proj/proj4.js';
import {transformExtent} from 'ol/proj.js';
proj4.defs('EPSG:32631', '+proj=utm +zone=31 +datum=WGS84 +units=m +no_defs');
proj4.defs('EPSG:32632', '+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs');
register(proj4);
const channels = ['red', 'green', 'blue'];
for (const channel of channels) {
const selector = document.getElementById(channel);
selector.addEventListener('change', upda
本文介绍了如何利用OpenLayers在JavaScript前端实现不同投影的Sentinel 2 COG图像处理。通过分析`main.js`、`index.html`和`package.json`文件,展示了完整的源码示例,帮助读者理解Sentinel 2卫星数据在Web地图中的应用。
订阅专栏 解锁全文
275

被折叠的 条评论
为什么被折叠?



