GeoJSON数据demo
时间: 2024-06-08 19:05:32 浏览: 157
一个json格式的demo
以下是一个简单的GeoJSON数据示例:
```json
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [102.0, 0.5]
},
"properties": {
"name": "My Point"
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[102.0, 0.0],
[103.0, 1.0],
[104.0, 0.0],
[105.0, 1.0]
]
},
"properties": {
"name": "My Line"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[100.0, 0.0],
[101.0, 0.0],
[101.0, 1.0],
[100.0, 1.0],
[100.0, 0.0]
]
]
},
"properties": {
"name": "My Polygon"
}
}
]
}
```
该示例包含一个FeatureCollection,其中包含三个要素:一个点、一条线和一个多边形。每个要素都有一个geometry属性和一个properties属性。geometry属性描述了要素的形状和位置,properties属性包含要素的其他相关信息,例如名称或ID。
阅读全文