Opened 16 years ago
Closed 9 years ago
#11854 closed New feature (fixed)
Add support of PostGIS's Azimuth function
| Reported by: | Christian Karrié | Owned by: | Sergey Fedoseev |
|---|---|---|---|
| Component: | GIS | Version: | dev |
| 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 |
Description
Hi, I would like to see the azimuth function in the gis component.
Thank you very much.
Attachments (2)
Change History (9)
comment:1 by , 16 years ago
| Triage Stage: | Unreviewed → Design decision needed |
|---|
comment:2 by , 15 years ago
| Severity: | → Normal |
|---|---|
| Type: | → New feature |
comment:3 by , 14 years ago
| Cc: | added |
|---|---|
| Easy pickings: | unset |
| Has patch: | set |
| Needs documentation: | set |
| Needs tests: | set |
| Patch needs improvement: | set |
| UI/UX: | unset |
| Version: | 1.1 → SVN |
by , 14 years ago
| Attachment: | django-trunk-rev16840-azimuth-version1.diff added |
|---|
first diff, THIS is just a proof of concept
comment:4 by , 14 years ago
| Triage Stage: | Design decision needed → Accepted |
|---|
comment:5 by , 10 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:6 by , 9 years ago
| Needs documentation: | unset |
|---|---|
| Needs tests: | unset |
| Patch needs improvement: | unset |
Note:
See TracTickets
for help on using tickets.
Here is my first try, but it doesn't work:
models.py
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.