问题描述
我正在尝试使用 GeoAlchemy 和 PostGres 传递来自名为 db.session.query(func.ST_AsGeoJSON(self.geometry)).first() 的函数的 GeoJson 响应。打印时显示:
('{"type":"polygon","coordinates":[[[-38.4105,-12.9232],[-38.4205,[-38.4305,[-38.4505,[-38.4105,-12.9232]]]}',)
但是当我尝试将其添加到其他 Json 时,就像这样:
geojson = {
'geometry': db.session.query(func.ST_AsGeoJSON(self.geometry)).first(),'type': 'Feature','properties': {
'Nome': 'Default','Qualidade': 'Default'
},}
进入网站的响应充满反斜杠:
我需要正确地将几何响应传递给 geojson。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)