可以通过一下地址验证
https://geojson.io/#map=11.2/38.2756/116.7917
一个面数据的情况,
features是一个数组,geometry 的type=Polygon表示一个面数据,可以存放多个面数据,以下就存放了一个面
{ "type": "FeatureCollection", "features": [{ "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": { "prop0": "value0", "prop1": { "this": "that" } } }] }
geometry 的type=Polygon,存放多个面
{ "type": "FeatureCollection", "features": [{ "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": { "prop0": "roger" } },{ "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [ [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ] ] }, "properties": { "prop0": "james" } }] }
geometry 的type=MultiPolygon,存放多个面
{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ] ], [ [ [100.2, 0.2], [100.2, 0.8], [100.8, 0.8], [100.8, 0.2], [100.2, 0.2] ] ] ] }, "properties": { "prop0": "value0", "prop1": { "this": "that" } } },{ "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": { "prop0": "roger" } }] }
标签:1.0,Polygon,geometry,0.0,geojson,type,格式,100.0,数据 From: https://www.cnblogs.com/james-roger/p/17428370.html