标签: geojson

错误:无效的 GeoJson 表示

GeoJSON 规范展示,

{
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [125.6, 10.1]
  },
  "properties": {
    "name": "Dinagat Islands"
  }
}
Run Code Online (Sandbox Code Playgroud)

但是当我把它包装在一个调用中时ST_GeomFromGeoJSON,像这样,

SELECT ST_GeomFromGeoJSON($${                                                                                                                          
  "type": "Feature",                                                                                                                                   
  "geometry": {                                                                                                                                        
    "type": "Point",                                                                                                                                   
    "coordinates": [125.6, 10.1]                                                                                                                       
  },                                                                                                                                                   
  "properties": {                                                                                                                                      
    "name": "Dinagat Islands"                                                                                                                          
  }                                                                                                                                                    
}$$);
Run Code Online (Sandbox Code Playgroud)

我得到错误,

错误:无效的 GeoJson 表示

postgresql spatial postgis json geojson

2
推荐指数
1
解决办法
1685
查看次数

标签 统计

geojson ×1

json ×1

postgis ×1

postgresql ×1

spatial ×1