Opened 9 years ago

Closed 23 months ago

#11854 closed New feature (fixed)

Add support of PostGIS's Azimuth function

Reported by: Christian Karrié Owned by: Sergey Fedoseev
Component: GIS Version: master
Severity: Normal Keywords: azimuth, postgis
Cc: ckarrie@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Hi, I would like to see the azimuth function in the gis component.

Thank you very much.

Attachments (2)

azimuth_verbose.txt (1.7 KB) - added by Christian Karrié 7 years ago.
some verbose infos
django-trunk-rev16840-azimuth-version1.diff (2.6 KB) - added by Christian Karrié 7 years ago.
first diff, THIS is just a proof of concept

Download all attachments as: .zip

Change History (9)

comment:1 Changed 9 years ago by Jacob

Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 8 years ago by Peter Baumgartner

Severity: Normal
Type: New feature

comment:3 Changed 7 years ago by Christian Karrié

Cc: ckarrie@… added
Easy pickings: unset
Has patch: set
Needs documentation: set
Needs tests: set
Patch needs improvement: set
UI/UX: unset
Version: 1.1SVN

Here is my first try, but it doesn't work:

class Project(models.Model):
    name = models.CharField(max_length=100)
    center = models.PointField()
    objects = models.GeoManager()


>>> from karrie.django.ogna.models import Project
>>> mz = Project.objects.get(name="Mainz")
>>> a_dist = Project.objects.distance(
>>> a_dist[0].distance
>>> a_azimuth = Project.objects.azimuth(
>>> a_azimuth[0].azimuth
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/", line 189, in __getitem__
    return list(qs)[0]
IndexError: list index out of range

Could somebody point me in the right direction? I plan to implement more spatial functions (mainly PostGIS) into GeoDjango.

I added a patch and a file with some more verbose infos.

Changed 7 years ago by Christian Karrié

Attachment: azimuth_verbose.txt added

some verbose infos

Changed 7 years ago by Christian Karrié

first diff, THIS is just a proof of concept

comment:4 Changed 7 years ago by Aymeric Augustin

Triage Stage: Design decision neededAccepted

comment:5 Changed 3 years ago by Sergey Fedoseev

Owner: changed from nobody to Sergey Fedoseev
Status: newassigned

comment:6 Changed 23 months ago by Sergey Fedoseev

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

comment:7 Changed 23 months ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 5e710cf4:

Fixed #11854 -- Added Azimuth GIS function. (#8286)

Note: See TracTickets for help on using tickets.
Back to Top