Created
May 17, 2019 22:52
-
-
Save math77/ab9a7d722b62d045dd6c104f2a01de2c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location_user = Point(-6.291, -36.020, srid=4326) | |
Locais.objects.annotate(distance=Distance("location", location_user)).order_by('distance') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://stackoverflow.com/a/53074722
https://gis.stackexchange.com/a/94930
![image](https://user-images.githubusercontent.com/3301060/57975485-7b890a00-79b9-11e9-924e-47df94dc7901.png)
Achei esses comentário ai. Acredito que seja com relação ao tipo de point salvo no seu model (o srid no caso). Está sendo o mesmo srid do seu model esse criado ai?
Quando eu utilizei, não tive esse problema. Porém não achei meu código disso.