当前位置:网站首页>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边栏推荐
- 无限水平大理石游戏
- C语言初阶——牛客网精选好题
- 2022 年面向初学者的 10 大免费 3D 建模软件
- 【考研高数 自用】高数第一章基础阶段思维导图
- What if the data in the cloud disk is harmonious?
- srpingboot security demo
- Fixed height of the first column in El table dynamic header rendering
- Codeforces Round #803 (Div. 2)vp
- Preliminary level of C language -- selected good questions on niuke.com
- 3D printer threading: five simple solutions
猜你喜欢

excel動態圖錶

Smartinstantiationawarebeanpostprocessor of the extension point series determines which construction method to execute - Chapter 432

OpenGL es: (3) EGL, basic steps of EGL drawing, eglsurface, anativewindow

OpenGL ES: (3) EGL、EGL绘图的基本步骤、EGLSurface、ANativeWindow

HCM 初学 ( 一 ) - 简介

C语言初阶——实现扫雷游戏

ONEFLOW source code parsing: automatic inference of operator signature

Dear pie users, I want to confess to you!

为什么用葫芦儿派盘取代U盘?

健康照明中应用的LED照明灯
随机推荐
不是你脑子不好用,而是因为你没有找到对的工具
穿越派 你的数据云行
excel动态图表
OpenGL es: (5) basic concepts of OpenGL, the process of OpenGL es generating pictures on the screen, and OpenGL pipeline
Small guide for rapid completion of mechanical arm (VI): stepping motor driver
[note] e-commerce order data analysis practice
Qt编写自定义控件-自绘电池
从诺奖知“边缘计算”的未来!
El tooltip in the table realizes line breaking display
ONEFLOW source code parsing: automatic inference of operator signature
Oracle sequence + trigger
jdbc-连接池
Seven major technical updates that developers should pay most attention to on build 2022
srpingboot security demo
excel高级绘图技巧100讲(一)-用甘特图来展示项目进度情况
Talking from mlperf: how to lead the next wave of AI accelerator
OpenGL es: (1) origin of OpenGL es (transfer)
On the first day of the new year, 3000 Apache servers went down
Dear pie users, I want to confess to you!
CJC8988带2个立体声耳机驱动器的低功率立体声编解码器