[Django] #35705: Add rotate geographic database function

46 views
Skip to first unread message

Django

unread,
Aug 23, 2024, 11:39:40 AM8/23/24
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: enprava | Type: New
| feature
Status: new | Component: GIS
Version: 5.1 | Severity: Normal
Keywords: Geodjango Database | Triage Stage:
Functions Rotate | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Currently, Django’s GIS module supports translating and scaling geometries
using Translate and Scale functions, but it lacks a Rotate function
equivalent to PostGIS’s ST_Rotate. Adding a Rotate function would enhance
the module's capabilities, allowing users to rotate geometries directly
within Django ORM without resorting to raw SQL.

This function could accept an angle in radians (or optionally degrees) and
support rotation around the origin (or optionally a specified point).

Relevant links:

-
https://docs.djangoproject.com/en/dev/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Reverse
- https://postgis.net/docs/ST_Rotate.html
--
Ticket URL: <https://code.djangoproject.com/ticket/35705>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 23, 2024, 2:11:13 PM8/23/24
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: enprava | Owner: (none)
Type: New feature | Status: new
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: Geodjango Database | Triage Stage: Accepted
Functions Rotate |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* stage: Unreviewed => Accepted
* version: 5.1 => dev

Comment:

Even if we don't plan to support the entire range of PostGIS functions, as
it's rather easy to create your own `GeomOutputGeoFunc` subclass (without
resorting to raw SQL), I would rather be positive about adding this one.
Patch welcome.
--
Ticket URL: <https://code.djangoproject.com/ticket/35705#comment:1>

Django

unread,
Aug 24, 2024, 2:55:03 AM8/24/24
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: enprava | Owner: enprava
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: Geodjango Database | Triage Stage: Accepted
Functions Rotate |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by enprava):

* owner: (none) => enprava
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/35705#comment:2>

Django

unread,
Sep 8, 2024, 12:48:08 PM9/8/24
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: Enrique Prada | Owner: Enrique
Vázquez | Prada Vázquez
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: Geodjango Database | Triage Stage: Accepted
Functions Rotate |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Enrique Prada Vázquez):

* has_patch: 0 => 1

Comment:

I have created a PR. https://github.com/django/django/pull/18553
--
Ticket URL: <https://code.djangoproject.com/ticket/35705#comment:3>

Django

unread,
Sep 9, 2024, 4:27:14 PM9/9/24
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: Enrique Prada | Owner: Enrique
Vázquez | Prada Vázquez
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: Geodjango Database | Triage Stage: Accepted
Functions Rotate |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* needs_better_patch: 0 => 1

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

Django

unread,
Nov 21, 2024, 4:12:03 PM11/21/24
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: Enrique Prada | Owner: Enrique
Vázquez | Prada Vázquez
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: Geodjango Database | Triage Stage: Accepted
Functions Rotate |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Enrique Prada Vázquez):

* needs_better_patch: 1 => 0

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

Django

unread,
Dec 18, 2024, 2:32:08 PM12/18/24
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: Enrique Prada | Owner: Enrique
Vázquez | Prada Vázquez
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: Geodjango Database | Triage Stage: Accepted
Functions Rotate |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* needs_better_patch: 0 => 1

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

Django

unread,
Jan 12, 2025, 8:53:15 AM1/12/25
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: Enrique Prada | Owner: Enrique
Vázquez | Prada Vázquez
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: Geodjango Database | Triage Stage: Accepted
Functions Rotate |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Enrique Prada Vázquez):

* needs_better_patch: 1 => 0

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

Django

unread,
Jan 13, 2025, 12:11:06 PM1/13/25
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: Enrique Prada | Owner: Enrique
Vázquez | Prada Vázquez
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: Geodjango Database | Triage Stage: Accepted
Functions Rotate |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35705#comment:8>

Django

unread,
Jan 13, 2025, 5:54:15 PM1/13/25
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: Enrique Prada | Owner: Enrique
Vázquez | Prada Vázquez
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: Geodjango Database | Triage Stage: Accepted
Functions Rotate |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Enrique Prada Vázquez):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/35705#comment:9>

Django

unread,
Jan 14, 2025, 6:01:22 AM1/14/25
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: Enrique Prada | Owner: Enrique
Vázquez | Prada Vázquez
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: Geodjango Database | Triage Stage: Accepted
Functions Rotate |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* needs_tests: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35705#comment:10>

Django

unread,
Jan 14, 2025, 9:38:19 AM1/14/25
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: Enrique Prada | Owner: Enrique
Vázquez | Prada Vázquez
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: Geodjango Database | Triage Stage: Accepted
Functions Rotate |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Enrique Prada Vázquez):

* needs_tests: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/35705#comment:11>

Django

unread,
Feb 19, 2025, 2:39:20 PM2/19/25
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: Enrique Prada | Owner: Enrique
Vázquez | Prada Vázquez
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: Geodjango Database | Triage Stage: Accepted
Functions Rotate |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Enrique Prada Vázquez):

Hi guys.

Do i need to do something else in order to get this branch merged?
--
Ticket URL: <https://code.djangoproject.com/ticket/35705#comment:12>

Django

unread,
Feb 23, 2025, 6:58:41 AM2/23/25
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: Enrique Prada | Owner: Enrique
Vázquez | Prada Vázquez
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: Geodjango Database | Triage Stage: Ready for
Functions Rotate | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/35705#comment:13>

Django

unread,
Feb 23, 2025, 10:22:49 AM2/23/25
to django-...@googlegroups.com
#35705: Add rotate geographic database function
-------------------------------------+-------------------------------------
Reporter: Enrique Prada | Owner: Enrique
Vázquez | Prada Vázquez
Type: New feature | Status: closed
Component: GIS | Version: dev
Severity: Normal | Resolution: fixed
Keywords: Geodjango Database | Triage Stage: Ready for
Functions Rotate | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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

Comment:

In [changeset:"51cab4ad51616f8fdb050631be5c710b93685ec3" 51cab4a]:
{{{#!CommitTicketReference repository=""
revision="51cab4ad51616f8fdb050631be5c710b93685ec3"
Fixed #35705 -- Added Rotate GIS database function to rotate geometries.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35705#comment:14>
Reply all
Reply to author
Forward
0 new messages