当前位置:网站首页>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边栏推荐
- LeetCode 最大矩形,最大正方形系列 84. 85. 221. 1277. 1725. (单调栈,动态规划)
- 数据库问题,如何优化Oracle SQL查询语句更快,效率更高
- Looking for high school student developers with similar interests
- QT write custom control - self drawn battery
- excel可视化
- 【考研高数 自用】高数第一章基础阶段思维导图
- My experience from technology to product manager
- How to transmit and share 4GB large files remotely in real time?
- Advanced cross platform application development (II): uni app practice
- Diagramme dynamique Excel
猜你喜欢

Infinite horizontal marble game

Dear pie users, I want to confess to you!

OpenGL es: (5) basic concepts of OpenGL, the process of OpenGL es generating pictures on the screen, and OpenGL pipeline

Thesis learning record essay multi label lift

解决麒麟V10上传文件乱码问题

excel高级绘图技巧100讲(一)-用甘特图来展示项目进度情况

TiDB单机模拟部署生产环境集群(闭坑实践,亲测有效)

On the first day of the new year, 3000 Apache servers went down

Fixed height of the first column in El table dynamic header rendering

el-table 动态表头渲染 固定第一列 高度问题
随机推荐
excel高级绘图技巧100讲(一)-用甘特图来展示项目进度情况
Bat operation FTP upload and download command
Why use huluer pie disk instead of U disk?
OpenGL ES: (1) OpenGL ES的由来 (转)
SystemVerilog学习-10-验证量化和覆盖率
PLA不粘貼在床上:6個簡單的解决方案
2022第八届中国国际“互联网+”大学生创新创业大赛产业命题赛道开启报名!
关于一道01背包问题的·拓展题的思考
Advanced drawing skills of Excel lecture 100 (1) - use Gantt chart to show the progress of the project
Pla ne colle pas sur le lit: 6 solutions simples
基于LabVIEW的计时器
Send you through the data cloud
OpenGL ES: (2) OpenGL ES 与 EGL、GLSL的关系
excel可视化
3D打印机穿线:5种简单的解决方案
On the first day of the new year, 3000 Apache servers went down
TIDB数据库特性总结
TiDB单机模拟部署生产环境集群(闭坑实践,亲测有效)
论文学习记录随笔 多标签之LSML
【考研高数 自用】高数第一章基础阶段思维导图