在使用 django.core.serializers 的serialize函数将数据库里的数据转为geojson格式时,遇见了source and target must be of type SpatialReference的报错。
将model.py中你所使用的表的 geom = models.PointField(srid=0, blank=True, null=True) 中的 srid 改为工程中需要的srid(我这里是4326)即可。
在使用 django.core.serializers 的serialize函数将数据库里的数据转为geojson格式时,遇见了source and target must be of type SpatialReference的报错。
将model.py中你所使用的表的 geom = models.PointField(srid=0, blank=True, null=True) 中的 srid 改为工程中需要的srid(我这里是4326)即可。
本文标题:geoDjango中‘source and target mus
本文链接:https://www.haomeiwen.com/subject/asnjoftx.html
网友评论