当前位置:网站首页>highmap gejson数据格式转换脚本
highmap gejson数据格式转换脚本
2022-07-01 05:56:00 【乘风xs】
highmap数据源:
从上面的网址下载geojson格式的数据,然后使用下面的脚本进行转换。
#!/usr/bin/env node
const fs = require('fs');
const proj4 = require('proj4');
const argvArr = process.argv; //参数
const origialPath = argvArr[2]; // 传入的第一个参数,读取文件
const outPath = argvArr[3]; // 传入的第二个参数,保存文件
fs.readFile(origialPath,"utf-8", (err, data) => {
if(err) {
return console.error("read error: ", err);
}
const originalData = JSON.parse(data);
const transform = originalData["hc-transform"].default;
try{
originalData.features.forEach(feature => {
feature.geometry.coordinates.forEach(coord => {
swap(coord, transform);
})
feature.properties = {
name: feature.properties.n边栏推荐
- 码蹄集 - MT3114 · 有趣的平衡 - 用样例通俗地讲解
- libpng12.so.0: cannot open shared object file: No such file or directory 亲测有效
- Dear pie users, I want to confess to you!
- Primary application case of Excel DuPont analyzer
- 关于一道01背包问题的·拓展题的思考
- 穿越派·派盘 + 思源笔记 = 私人笔记本
- Small guide for rapid completion of mechanical arm (VI): stepping motor driver
- PLA not pasted on the bed: 6 simple solutions
- HCM 初学 ( 一 ) - 简介
- Geoffrey Hinton: my 50 years of in-depth study and Research on mental skills
猜你喜欢
随机推荐
论文学习记录随笔 多标签之GLOCAL
win10、win11中Elan触摸板滚动方向反转、启动“双指点击打开右键菜单“、“双指滚动“
Small guide for rapid completion of mechanical arm (VI): stepping motor driver
libpng12.so.0: cannot open shared object file: No such file or directory 亲测有效
4GB大文件,如何实时远程传输和共享?
ONEFLOW source code parsing: automatic inference of operator signature
bat操作ftp上传下载命令
表格中el-tooltip 实现换行展示
Enter an expression (expressed as a string) and find the value of this expression.
Timer based on LabVIEW
分片上传与断点续传
Preliminary level of C language -- selected good questions on niuke.com
OpenGL ES: (3) EGL、EGL绘图的基本步骤、EGLSurface、ANativeWindow
Brief description of activation function
MinIO纠错码、分布式MinIO集群搭建及启动
[medical segmentation] u2net
葫芦儿 APP 使用帮助
In win10 and win11, the scroll direction of Elan touch panel is reversed, and "double finger click to open the right-click menu" and "double finger scroll" are started“
Oracle create user + Role
Call us special providers of personal cloud services for College Students








