当前位置:网站首页>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边栏推荐
- Advanced cross platform application development (II): uni app practice
- 3D printer threading: five simple solutions
- Fixed height of the first column in El table dynamic header rendering
- 1034 Head of a Gang
- [QT] QT after addition, subtraction, multiplication and division, two decimal places are reserved
- 【笔记】电商订单数据分析实战
- 加密狗资料搜集
- My experience from technology to product manager
- 扩展点系列之SmartInstantiationAwareBeanPostProcessor确定执行哪一个构造方法 - 第432篇
- TIDB数据库特性总结
猜你喜欢

He struggled day and night to protect his data

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

论文学习记录随笔 多标签之LSML

Why use huluer pie disk instead of U disk?

Advanced cross platform application development (II): uni app practice

穿越派·派盘 + Mountain Duck = 数据本地管理

千万不要把笔记视频乱放!

It's not that you have a bad mind, but that you haven't found the right tool

穿越派 你的数据云行

Brief description of activation function
随机推荐
数据库er图组成要素
2022第八届中国国际“互联网+”大学生创新创业大赛产业命题赛道开启报名!
Chip, an empire built on sand!
穿越派·派盘 + Mountain Duck = 数据本地管理
表格中el-tooltip 实现换行展示
为了保护自己的数据,他奋斗了一天一夜
OpenGL ES: (3) EGL、EGL绘图的基本步骤、EGLSurface、ANativeWindow
Seven major technical updates that developers should pay most attention to on build 2022
Continuous breakthrough and steady progress -- Review and Prospect of cross platform development technology of mobile terminal
Fragment upload and breakpoint resume
【知识点总结】卡方分布,t分布,F分布
Code shoe set - mt3114 · interesting balance - explain it with examples
1034 Head of a Gang
el-table 动态表头渲染 固定第一列 高度问题
MySQL converts milliseconds to time string
Oracle sequence + trigger
MySQL数据迁移遇到的一些错误
SystemVerilog学习-10-验证量化和覆盖率
论文学习记录随笔 多标签之GLOCAL
Qt编写自定义控件-自绘电池