GeoJSON 💻

GeoJSON

Open Beta
.geojson · application/geo+json

GeoJSON 是一种基于 JSON 的开放地理数据格式。是 Web 开发者的标准方案,兼容 Leaflet、Mapbox、OpenLayers、D3.js 以及任意 GIS 软件。

立即导出 GeoJSON ✨ Open Beta — 免费无限制

主要特点

人类可读的 JSON 格式
要素属性(名称、类型)
WGS84 投影
浏览器原生支持
GeoJSON 格式导出示例(莫斯科中心,1x0.5 公里)
示例:莫斯科中心区,约 1x0.5 公里,中等详细度

关于 GeoJSON 格式

GeoJSON is an open geodata format (RFC 7946) in which geography is written as ordinary JSON: an array of features, each with a geometry and a set of properties. A human can read it in a text editor, any programming language parses it in one line, and practically all web cartography understands it — Leaflet, Mapbox GL, OpenLayers, D3.js — with no plugins or converters.

An OSM map is exported to GeoJSON when you need the features themselves rather than a picture: to attach a layer to a website, compute statistics for a district, filter the categories you need, load the data into PostGIS or run it through GeoPandas. It is also the most convenient intermediate format: from it, ogr2ogr or QGIS will make SHP, GeoPackage, KML — anything you like.

The output is a single UTF-8 file: one FeatureCollection gathering all the layers of the selected area. Every feature keeps its OpenStreetMap attributes (name, type, tags) and a service property _layer with the name of its source layer — one line of filtering takes the data apart again into roads, buildings, water, greenery and points of interest. Coordinates are WGS84 (EPSG:4326), as the specification requires; the recorded precision is six decimal places, about ten centimeters on the ground: the file drops into any GIS and any web framework with no reprojection.

打开 GeoJSON 文件的程序

以下程序可以打开、编辑和处理从 OSM2CDR 导出的 GeoJSON(.geojson)文件:

💻Leaflet 💻Mapbox 🌎QGIS 💻D3.js 💻Kepler.gl 💻GeoPandas

格式规格

谁在使用 GeoJSON 地图

🏗
网页开发
The native format for Leaflet, Mapbox and OpenLayers: the map is attached to a site with a couple of lines of code.
💻
交互式地图
Vector layers with attributes for clickable maps with tooltips and filters.
📊
数据可视化
A ready source for D3.js and dashboards: boundaries, POI and routes in standard JSON.
🎨
API 与服务
A lightweight geodata exchange format for REST APIs and microservices.
🗺
数据科学
Loading city geometry into GeoPandas and QGIS for spatial analysis.

如何导出 GeoJSON

1
选择区域
在 osm2cdr 的交互式地图上绘制矩形或多边形
2
选择 GeoJSON
从 127 种可用导出格式中选择 GeoJSON
3
导出
点击导出,1–5 分钟内收到您的 .geojson 文件
4
下载
下载完成的 GeoJSON 文件并在 Leaflet 中打开

导出后如何打开

GeoJSON 格式的热门地图

Free

导出 GeoJSON 地图

从 OpenStreetMap 下载专业的 GeoJSON 地图。即时生成,任意区域。

免费 / 导出
立即导出 GeoJSON →

常见问题

我能在浏览器中打开 GeoJSON 吗?
GeoJSON 是免费的吗?
我能把 GeoJSON 加载到 PostGIS 吗?
How do I split the export back into layers?
Which projection do the coordinates arrive in?
What should I do if the file turns out too big for a browser?

与其他格式比较

相关格式

经常一起导出

Related Articles