当前位置:网站首页>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
边栏推荐
- Codeforces Round #803 (Div. 2)vp
- 3D printer threading: five simple solutions
- Know the future of "edge computing" from the Nobel prize!
- 扩展点系列之SmartInstantiationAwareBeanPostProcessor确定执行哪一个构造方法 - 第432篇
- 利用百度地图查询全国地铁线路
- Continuous breakthrough and steady progress -- Review and Prospect of cross platform development technology of mobile terminal
- Infinite horizontal marble game
- 不是你脑子不好用,而是因为你没有找到对的工具
- Servlet
- It's not that you have a bad mind, but that you haven't found the right tool
猜你喜欢
健康照明中应用的LED照明灯
ArcServer密码重置(账号不可以重置)
Cjc8988 Low Power Stereo codec with 2 stereo headphone drivers
skywalking集成nacos动态配置
Leetcode Max rectangle, Max square series 84 85. 221. 1277. 1725. (monotonic stack, dynamic programming)
TiDB单机模拟部署生产环境集群(闭坑实践,亲测有效)
论文学习记录随笔 多标签之LSML
Arcserver password reset (account cannot be reset)
el-table 动态表头渲染 固定第一列 高度问题
[note] e-commerce order data analysis practice
随机推荐
Geoffrey Hinton: my 50 years of in-depth study and Research on mental skills
葫芦儿 APP 使用帮助
SOE空间分析服务器 MySQL以及PostGres的地理空间库PostGIS防注入攻击
kotlin位运算的坑(bytes[i] and 0xff 报错)
OpenGL es: (4) detailed explanation of EGL API (Continued)
OpenGL ES: (2) OpenGL ES 与 EGL、GLSL的关系
three.js小结
Continue to learn MySQL
3D打印机穿线:5种简单的解决方案
DHT11 温湿度传感器
My experience from technology to product manager
从诺奖知“边缘计算”的未来!
In win10 and win11, the scroll direction of Elan touch panel is reversed, and "double finger click to open the right-click menu" and "double finger scroll" are started“
亲爱的派盘用户,我要向您表白!
srpingboot security demo
π disk, turning your computer into a personal private cloud
excel可视化
On the first day of the new year, 3000 Apache servers went down
PLA not pasted on the bed: 6 simple solutions
Fixed height of the first column in El table dynamic header rendering