GEOJson 介绍

发布时间: 更新时间: 总字数:182 阅读时间:1m 作者:IP:上海 网址

GeoJSON 是一种对各种地理数据结构进行编码的格式,基于 Javascript 对象表示法(JavaScript Object Notation, 简称 JSON)的地理空间信息数据交换格式

介绍

  • FeatureCollection 根节点
  • Point 点要素
  • MultiPoint 多点要素
  • LineString 线要素
  • MultiLineString 多线要素
  • Polygon 多边形要素
  • MultiPolygon 多个多边形
  • GeometryCollection 综合的地理要素集合

示例:

json
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "name": "名称",
        "id": "ID"
      },
      "geometry": {
        "type": "MultiPolygon",
        "coordinates": [
          [
            [
              [119.917345, 31.753843],
              [119.917345, 31.753843]
            ]
          ]
        ]
      }
    }
    ]
}
  • 图层是按照 json 文件从上倒下的顺序渲染的

编辑器