当前位置:网站首页>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边栏推荐
- HCM 初学 ( 四 ) - 时间
- Pla ne colle pas sur le lit: 6 solutions simples
- 为什么用葫芦儿派盘取代U盘?
- FPGA - 7系列 FPGA内部结构之Clocking -02- 时钟布线资源
- libpng12.so.0: cannot open shared object file: No such file or directory 亲测有效
- srpingboot security demo
- Scope data export mat
- scope 数据导出mat
- Know the future of "edge computing" from the Nobel prize!
- SQL必会题之留存率
猜你喜欢

Why use huluer pie disk instead of U disk?

scope 数据导出mat

Brief description of activation function

4GB大文件,如何实时远程传输和共享?

Continuous breakthrough and steady progress -- Review and Prospect of cross platform development technology of mobile terminal

π盘,让您电脑变成个人的私有云

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

ONEFLOW source code parsing: automatic inference of operator signature

【考研高数 自用】高数第一章基础阶段思维导图

为什么用葫芦儿派盘取代U盘?
随机推荐
MinIO纠错码、分布式MinIO集群搭建及启动
LED lighting used in health lighting
C language beginner level - realize the minesweeping game
我从技术到产品经理的几点体会
Crossing pie · pie pan + Mountain duck = local data management
栈题目:解析布尔表达式
Essay learning record essay multi label Global
jdbc-连接池
Oracle sequence + trigger
Thesis learning record essay multi label lift
Looking for high school student developers with similar interests
It's not that you have a bad mind, but that you haven't found the right tool
Xuanyi maintenance manual
This is the necessary software for college students 𞓜 knowledge management
Ucosiii --- engineering transplantation
穿越派·派盘 + 思源笔记 = 私人笔记本
OpenGL es: (4) detailed explanation of EGL API (Continued)
Huluer app help
Codeforces Round #803 (Div. 2)vp
从MLPerf谈起:如何引领AI加速器的下一波浪潮