【问题标题】:GeoDjango admin map draws point at wrong locationGeoDjango 管理地图在错误的位置绘制点
【发布时间】:2020-08-22 21:48:41
【问题描述】:

我有一个类似的模型

from django.contrib.gis.db import models
class Letter(models.Model):
    """Letter Model"""

    class Meta:
        db_table = 'Letter'
    center = models.PointField(geography=True)

模型有如下数据:

a = models.Letter.objects.get(id='699c49db-1db7-41cf-90a9-a173f9352805')
print(a.center)
SRID=4326;POINT (-74 40.718)

有什么原因和解决方法吗?

有人可以帮我找出原因和解决办法吗?

【问题讨论】:

  • 你使用的是什么版本的GDAL?

标签: django django-rest-framework geometry geodjango


【解决方案1】:

你是说纽约吗?如果是这样,那么您传递的 lat 和 lng 顺序错误。

查看here

【讨论】:

    猜你喜欢
    • 2016-08-05
    • 1970-01-01
    • 1970-01-01
    • 2013-04-10
    • 1970-01-01
    • 2015-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多