.geojson
Data
GeoJSON(地理 JSON)
GeoJSON 是一种基于 JSON 的格式,用于编码地理特征 — 点、线、多边形以及带有关联属性的几何集合。它是 Web 地图、地理空间 API 和应用间地理数据共享的标准。
MIME 类型
application/geo+json
类型
文本
压缩
无损
优点
- + Human-readable JSON format — easy to debug and edit
- + Universal support in web mapping libraries and GIS tools
- + Simple specification that is easy to generate and consume
- + Standardized as RFC 7946
缺点
- − Verbose for large datasets — consider GeoParquet or TopoJSON
- − No built-in support for coordinate reference systems beyond WGS84
- − Topology is not preserved — no shared boundaries
何时使用 .GEOJSON
在 Web 地图、地理空间 API 响应以及地图应用间交换地理数据时使用 GeoJSON。
技术细节
GeoJSON 使用包含 Feature 对象的 FeatureCollection,每个 Feature 带有一个几何体(Point、LineString、Polygon、Multi*)和属性对象。坐标使用 WGS84(经度、纬度)十进制度数。
历史
GeoJSON 由开发者社区于 2008 年创建,并于 2016 年正式化为 RFC 7946。它受到 Mapbox、Leaflet、Google Maps、QGIS、PostGIS 以及几乎所有地图平台的支持。