Re: [Django] #11854: Add support of PostGIS's Azimuth function

18 views
Skip to first unread message

Django

unread,
Sep 16, 2011, 3:43:40 PM9/16/11
to django-...@googlegroups.com
#11854: Add support of PostGIS's Azimuth function
-------------------------------------+-------------------------------------
Reporter: ckarrie | Owner: nobody
Type: New | Status: new
feature | Component: GIS
Milestone: | Severity: Normal
Version: SVN | Keywords: azimuth, postgis
Resolution: | Has patch: 1
Triage Stage: Design | Needs tests: 1
decision needed | Easy pickings: 0
Needs documentation: 1 |
Patch needs improvement: 1 |
UI/UX: 0 |
-------------------------------------+-------------------------------------
Changes (by ckarrie):

* cc: ckarrie@… (added)
* needs_better_patch: 0 => 1
* needs_tests: 0 => 1
* version: 1.1 => SVN
* easy: => 0
* needs_docs: 0 => 1
* has_patch: 0 => 1
* ui_ux: => 0


Comment:

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

'''models.py'''
{{{#!python
class Project(models.Model):
name = models.CharField(max_length=100)
center = models.PointField()
objects = models.GeoManager()
}}}

'''Shell'''
{{{
>>> from karrie.django.ogna.models import Project
>>> mz = Project.objects.get(name="Mainz")
>>> a_dist = Project.objects.distance(mz.center)
>>> a_dist[0].distance
Distance(m=84958.0635775)
>>> a_azimuth = Project.objects.azimuth(mz.center)
>>> 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/query.py",
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/11854#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 17, 2011, 8:53:02 AM12/17/11
to django-...@googlegroups.com
#11854: Add support of PostGIS's Azimuth function
----------------------------------+------------------------------------
Reporter: ckarrie | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: SVN
Severity: Normal | Resolution:
Keywords: azimuth, postgis | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by aaugustin):

* stage: Design decision needed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/11854#comment:4>

Django

unread,
Nov 11, 2015, 2:58:57 AM11/11/15
to django-...@googlegroups.com
#11854: Add support of PostGIS's Azimuth function
----------------------------------+--------------------------------------
Reporter: ckarrie | Owner: sir-sigurd
Type: New feature | Status: assigned
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: azimuth, postgis | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by sir-sigurd):

* status: new => assigned
* owner: nobody => sir-sigurd


--
Ticket URL: <https://code.djangoproject.com/ticket/11854#comment:5>

Django

unread,
Apr 2, 2017, 7:48:53 AM4/2/17
to django-...@googlegroups.com
#11854: Add support of PostGIS's Azimuth function
-------------------------------------+-------------------------------------
Reporter: Christian Karrié | Owner: Sergey
| Fedoseev

Type: New feature | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: azimuth, postgis | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sergey Fedoseev):

* needs_better_patch: 1 => 0
* needs_tests: 1 => 0
* needs_docs: 1 => 0


Comment:

[https://github.com/django/django/pull/8286 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/11854#comment:6>

Django

unread,
Apr 2, 2017, 2:24:16 PM4/2/17
to django-...@googlegroups.com
#11854: Add support of PostGIS's Azimuth function
-------------------------------------+-------------------------------------
Reporter: Christian Karrié | Owner: Sergey
| Fedoseev
Type: New feature | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: azimuth, postgis | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"5e710cf4a5dba1fc30e3b6775b83c2218e57cd36" 5e710cf4]:
{{{
#!CommitTicketReference repository=""
revision="5e710cf4a5dba1fc30e3b6775b83c2218e57cd36"
Fixed #11854 -- Added Azimuth GIS function. (#8286)
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/11854#comment:7>

Reply all
Reply to author
Forward
0 new messages