Giter Club home page Giter Club logo

wgii's Introduction

WGII

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

1. 太长不看版 -- QuickStart

  • GeoJSON 数据均在 /dist 目录下,按照国家编码分目录存储
    • *仍然缺失部分国家 GeoJSON 数据,具体见 /resource/original/noSuchCountries.json
  • 国家基础信息在 /dist/countries.info.json

目录

2. 说明

2.1. 项目说明

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

  • 国名
    • 中文名称,包括官方名称、联合国名称、缩写名称
    • 英文名称,包括官方名称、联合国名称、缩写名称
  • 国家代码
  • 简称
  • 首都

2.2. GeoJSON

GeoJSON

2.3. 坐标系

  • WGS84:为一种大地坐标系,也是目前广泛使用的 GPS 全球卫星定位系统使用的坐标系。
  • GCJ02:又称火星坐标系,是由**国家测绘局制定的地理坐标系统,是由 WGS84 加密后得到的坐标系。
  • BD09:为百度坐标系,在 GCJ02 坐标系基础上再次加密。其中 bd09ll 表示百度经纬度坐标,bd09mc 表示百度墨卡托米制坐标。
  • 坐标系转换方法,参见wandergis/coordtransform
  • 法律法规
    • 根据《中华人民共和国测绘法》 第十条、第十一条、第三十八条、第五十二条、第六十二条 之规定
      • 在中华人民共和国境内必须使用基于 GCJ02 的坐标系;而 BD09 坐标系为基于 GCJ02 加密的坐标系,亦可以直接使用
      • 在中华人民共和国境内使用地图相关服务,请务必遵循国家法律法规,否则带来的一切问题,本项目贡献者不承担任何责任!

2.4. 行政区划

  • 仅处理被“中华人民共和国”承认的主权国家和地区
  • 关于“中华人民共和国”有争议地区
    • “**”,大陆和**同属一个**,**是**领土不可分割的一部分。
    • “南沙群岛”,**对南沙群岛及其附近海域拥有无可争辩的主权。
    • “藏南地区”,藏南地区是是中华人民共和国固有的主权领土。百度百科 - 藏南地区
  • 主权国家(截至2017年),共计198个
    • 联合国会员国:193个,具体名单参见 United Nations » Member States
    • 联合国观察员国:2个
      • 梵蒂冈 🇻🇦 ,联合国称其为(罗马)教廷
      • 巴勒斯坦 🇵🇸 ,法定首都为耶路撒冷,实际控制首都为拉姆安拉;采用拉姆安拉(Ramallah)
    • 国际普遍承认:3个,
      • 纽埃
      • 库克群岛
      • 马耳他骑士团
  • *地区,?个,暂未处理
  • 国家政体

2.5. 数据修正

  • 修改部分国家中文名称
    • 南朝鲜 > 韩国

2.6. 数据结构

数据字典

3. 目录结构

3.1. 说明

  • 数据包含基础信息和GEO数据
    • 标记为*.info.json 为 基础信息(国家名称、编码、首都信息等)
    • 标记为*.geo.json 为 结构化GEO数据,具体字段见说明数据字典
    • 标记为*.all.json 为 基于geo.json数据格式,整合info.json数据的结构化数据体
    • 标记为*.dist.json 为 常用可直接使用的结构化数据,基本满足构建地图及其他需要

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

  • 整理数据来源
  • 整理国内省份和城市对应关系,及中英文对照
  • 对比ISO3166整理国家和地区信息
  • 测试对比wandergis/coordtransform提供转换和百度官方转换结果偏差量

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的开源引用

  • GeoLite2

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. 高德开放平台

wgii's People

Contributors

occultskyrong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.