当前位置:网站首页>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边栏推荐
- DEV XPO对比之XAF BO
- FPGA - 7系列 FPGA内部结构之Clocking -02- 时钟布线资源
- Leetcode Max rectangle, Max square series 84 85. 221. 1277. 1725. (monotonic stack, dynamic programming)
- 2022第八届中国国际“互联网+”大学生创新创业大赛产业命题赛道开启报名!
- 穿越派与贸大合作,为大学生增添效率
- MySQL数据迁移遇到的一些错误
- Orcle创建用户+角色
- 2022.6.30-----leetcode. one thousand one hundred and seventy-five
- Vscode function annotation / file header annotation shortcut
- 千万不要把笔记视频乱放!
猜你喜欢

云盘里资料被和谐了,怎么办?

LED lighting used in health lighting

Qt编写自定义控件-自绘电池

Small guide for rapid completion of mechanical arm (VI): stepping motor driver

表格中el-tooltip 实现换行展示

LeetCode 最大矩形,最大正方形系列 84. 85. 221. 1277. 1725. (单调栈,动态规划)

Brief description of activation function

从MLPerf谈起:如何引领AI加速器的下一波浪潮

π disk, turning your computer into a personal private cloud

PLA not pasted on the bed: 6 simple solutions
随机推荐
[QT] QT after addition, subtraction, multiplication and division, two decimal places are reserved
论文学习记录随笔 多标签之LIFT
My experience from technology to product manager
3D printer threading: five simple solutions
LED lighting used in health lighting
OpenGL es: (5) basic concepts of OpenGL, the process of OpenGL es generating pictures on the screen, and OpenGL pipeline
Fixed height of the first column in El table dynamic header rendering
分片上传与断点续传
FPGA - 7系列 FPGA内部结构之Clocking -02- 时钟布线资源
SQL必会题之留存率
excel可视化
OpenGL es: (3) EGL, basic steps of EGL drawing, eglsurface, anativewindow
Vscode function annotation / file header annotation shortcut
Brief description of activation function
【知识点总结】卡方分布,t分布,F分布
OpenGL es: (4) detailed explanation of EGL API (Continued)
HCM 初学 ( 二 ) - 信息类型
π disk, turning your computer into a personal private cloud
Qt编写自定义控件-自绘电池
HCM 初学 ( 三 ) - 快速输入PA70、PA71 浏览员工信息PA10