# GeoJSON

GeoJSON is a format for encoding a variety of geographic data structures.

GeoJSON supports the following geometry types: Point, LineString, Polygon, MultiPoint, MultiLineString, and MultiPolygon. Geometric objects with additional properties are Feature objects. Sets of features are contained by FeatureCollection objects.

geojson.io

Point

1
2
3
4
{
"type": "Point",
"coordinates": [-105, 39]
}

LineString

1
2
3
4
5
6
7
{
"type": "LineString",
"coordinates": [
[-105, 39],
[-107, 38]
]
}

Polygon

1
2
3
4
5
6
7
8
9
10
11
12
{
"type": "Polygon",
"coordinates": [
[
[30, 0],
[31, 0],
[31, 5],
[30, 5],
[30, 0]
]
]
}

GeometryCollection

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"type": "GeometryCollection",
"geometries": [
{
"type": "Point",
"coordinates": [-105, 39]
},
{
"type": "LineString",
"coordinates": [
[-105, 39],
[-107, 38]
]
}
]
}

Feature

1
2
3
4
5
6
7
8
9
10
{
"type": "Feature",
"properties": {
"name": "北京"
},
"geometry": {
"type": "Point",
"coordinates": [116.3671875, 39.977120098439634]
}
}
Edited on