python - 如何验证 geojson 中的属性键

标签 python json postgis geojson

我想知道为什么下面发布的 geojson 格式无效。我试图将其数据可视化 http://geojson.io

但没有显示任何内容。

geojson

{
 "type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[[7.85563468082516,49.90287230375267],[7.855636808249913,49.902782379662085],[7.855776033932631,49.902783753651605],[7.855773906766568,49.902873677746555]]
]
]
},"properties": {"areaOfCoverage":"30"}},
}

最佳答案

试试这个:

{
  "type": "FeatureCollection",
  "features": [
    {
      "properties":{"areaOfCoverage":"30"},
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
               7.85563468082516,
              49.90287230375267
            ],
            [
              7.855636808249913,
              49.902782379662085
            ],
            [
              7.855776033932631,
              49.902783753651605
            ],
            [
              7.85563468082516,
              49.90287230375267
            ]
          ]
        ]
      }
    }
  ]
}

关于python - 如何验证 geojson 中的属性键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69188363/

相关文章:

python - 关于何时应该在函数中使用全局变量的经验法则

python - 如果远程服务器上的 python 脚本停止,如何重新启动它?

python if elif else 语句

javascript - 自动完成功能可按属性搜索 json 对象

ruby-on-rails - 必须是 super 用户才能创建此扩展

ruby-on-rails - 无法使用 PostGIS/RGeo 保存多边形

python - 谷歌应用引擎(python)混淆类 'object has no attribute'错误

PHP/MYSQLi SQL SELECT 在多个表上并将结果作为 json 对象返回

javascript - 在 javascript 对象内创建对象列表

postgresql - 检查postgis多边形数据的有效性(从shapefile导入)