occultskyrong / wgii

Geographic Information Integration of World,世界地理信息集成
MIT License
53 stars 10 forks source link

WGII

Geographic Information Integration of World,世界地理信息集成

searchKeys: 世界各国GEO数据,Geo data of countries around the world

1. 太长不看版 -- QuickStart

目录

2. 说明

2.1. 项目说明

整合世界主要国家或地区的地理信息,包括但不限于以下内容:

2.2. GeoJSON

GeoJSON

2.3. 坐标系

  • WGS84:为一种大地坐标系,也是目前广泛使用的 GPS 全球卫星定位系统使用的坐标系。
  • GCJ02:又称火星坐标系,是由中国国家测绘局制定的地理坐标系统,是由 WGS84 加密后得到的坐标系。
  • BD09:为百度坐标系,在 GCJ02 坐标系基础上再次加密。其中 bd09ll 表示百度经纬度坐标,bd09mc 表示百度墨卡托米制坐标。

2.4. 行政区划

2.5. 数据修正

2.6. 数据结构

数据字典

3. 目录结构

3.1. 说明

3.2. 生成

tree -a -L 2 -I "node_modules|*.json|.*|.vscode|LICENSE|logs"

3.3. 目录树

.
├── README.md                                           # 说明文档
├── build                                               # 构建脚本
│   ├── index.js                                            # 执行文件
│   └── sparse.js                                           # 抽稀脚本
├── config                                              # 配置文件
├── dist                                                # 输出结果
│   └── CHN                                                 # 国家数据,按照国家编码按文件夹组织
├── resource                                            # 源数据
│   ├── gaode                                               # 来源于高德地图API的原始数据,未加工
│   ├── original                                            # 原始数据,已加工
│   ├── raw                                                 # 原始数据,未加工
│   └── sql                                                 # SQL数据
├── src                                                 # 源码
│   ├── common
│   ├── crawler
│   ├── index.js
│   ├── model.js
│   ├── models
│   └── sync.js
├── test
└── yarn.lock

3.4. /dist 目录结构

3.4.1. /dist/CHN 目录结构

.
├── country.bd09.geo.json                                   # BD09坐标系 - 原始数据,来源于坐标系转换,适配百度地图
├── country.bd09.sparse.1.geo.json                          # BD09坐标系 - 按1km抽稀后结果数据
├── country.bd09.sparse.10.geo.json                         # 同上,10km抽稀
├── country.bd09.sparse.2.geo.json                          # 同上,2km抽稀
├── country.bd09.sparse.20.geo.json                         # 同上,20km抽稀
├── country.bd09.sparse.5.geo.json                          # 同上,5km抽稀
├── country.gcj02.geo.json                                  # GCJ02坐标系 - 原始数据,来源于高德开放平台,适配高德、腾讯等国内主流地图
├── country.gcj02.sparse.1.geo.json                         # GCJ02坐标系 - 按1km抽稀后结果数据
├── country.gcj02.sparse.10.geo.json
├── country.gcj02.sparse.2.geo.json
├── country.gcj02.sparse.20.geo.json
├── country.gcj02.sparse.5.geo.json
├── country.wgs84.geo.json                                  # WGS84坐标系 - 原始数据,来源于坐标系转换,适配Google地图
├── country.wgs84.sparse.1.geo.json                         # WGS84坐标系 - 按1km抽稀后结果数据
├── country.wgs84.sparse.10.geo.json
├── country.wgs84.sparse.2.geo.json
├── country.wgs84.sparse.20.geo.json
├── country.wgs84.sparse.5.geo.json
└── region                                                  # 省份数据
    └── region.info.json

3.4.2. /dist 其他国家目录结构

.
├── country.resource.geo.json                               # 该国家原始数据,具体数据来源见下 数据来源
└── country.wgs84.geo.json                                  # WGS84坐标系 - 适配Google地图

4. 开发者相关

4.1. Build

# 下载项目
git clone https://github.com/occultskyrong/wgii.git
# 安装依赖
yarn install

# 自动生成数据
npm run build

# 【暂不可用】使用sequelize-auto导出model
sequelize-auto -o './models' -h localhost -p 3306 -u root -x root -d test

4.2. Changes

version date desc
0.0.1 2018-12-09 完成联合国会员国国家信息数据整理
0.0.1 2018-12-13 完成中华人民共和国国家GeoJSON数据整理
0.0.1 2019-01-11 完成联合国会员国国家信息数据输出,见dist/countries_info.json
0.0.1 2019-01-14 完成中华人民共和国省级信息数据整理
0.0.1 2019-01-22 完成世界国家数据与ISO3316-1的交叉比对
0.0.1 2019-01-29 完成与 world.geo.json 项目的数据合并

4.3. Todo list

4.4. Contributions

fork https://github.com/occultskyrong/wgii
git clone <your own repository>
git branches <your own branch>
git checkout <your own branch>
yarn install -D
# ... something change
eslint --fix .
# ... fix something do not eslint autofix
git cz
# ... step by step add commit with message
git push
# ... there will be eslint check pre-commit
pull request

5. 参考

5.1. 基于LICENSE的开源引用

This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com.

5.2. 参考文档

5.2.1. 算法

  • DouglasPeucker 道格拉斯-普克算法,是将曲线近似表示为一系列点,并减少点的数量的一种算法

5.3. 工具

  • geojson.io 一个可以测试边界在Google地图展示效果的在线应用
  • wandergis/coordtransform 提供了百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换

5.4. 数据来源

5.4.1. Geo.json数据源

5.4.2. 高德开放平台