当前位置:网站首页>Highmap gejson data format conversion script
Highmap gejson data format conversion script
2022-07-01 06:02:00 【Chengfeng XS】
highmap data source :
Download it from the website above geojson Formatted data , Then use the following script to convert .
#!/usr/bin/env node
const fs = require('fs');
const proj4 = require('proj4');
const argvArr = process.argv; // Parameters
const origialPath = argvArr[2]; // The first parameter passed in , Read the file
const outPath = argvArr[3]; // The second parameter passed in , Save the file
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边栏推荐
- QT write custom control - self drawn battery
- π disk, turning your computer into a personal private cloud
- Ucosiii --- engineering transplantation
- excel初级应用案例——杜邦分析仪
- Leetcode Max rectangle, Max square series 84 85. 221. 1277. 1725. (monotonic stack, dynamic programming)
- 【文件系统】如何在ubi之上运行squashfs
- 这才是大学生必备软件 | 知识管理
- Thoughts on a "01 knapsack problem" expansion problem
- Talking from mlperf: how to lead the next wave of AI accelerator
- My experience from technology to product manager
猜你喜欢

69 cesium code datasource loading geojson

【文件系统】如何在ubi之上运行squashfs

excel可视化

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

我从技术到产品经理的几点体会

excel初级应用案例——杜邦分析仪

QT write custom control - self drawn battery

Dear pie users, I want to confess to you!

LED lighting used in health lighting

PLA不粘贴在床上:6个简单的解决方案
随机推荐
PLA not pasted on the bed: 6 simple solutions
亲爱的派盘用户,我要向您表白!
Small guide for rapid completion of mechanical arm (VI): stepping motor driver
What if the data in the cloud disk is harmonious?
码蹄集 - MT3114 · 有趣的平衡 - 用样例通俗地讲解
解决麒麟V10上传文件乱码问题
69 Cesium代码datasource加载geojson
Essay learning record essay multi label Global
excel動態圖錶
基于LabVIEW的计时器
SystemVerilog学习-10-验证量化和覆盖率
Dear pie users, I want to confess to you!
Stack Title: parsing Boolean expressions
It's not that you have a bad mind, but that you haven't found the right tool
MinIO纠错码、分布式MinIO集群搭建及启动
69 cesium code datasource loading geojson
68 cesium code datasource loading czml
Debug details under pycharm
freeswitch拨打分机号
葫芦儿 APP 使用帮助