Opened 4 months ago
Last modified 4 weeks ago
#35705 assigned New feature
Add rotate geographic database function
Reported by: | Enrique Prada Vázquez | Owned by: | Enrique Prada Vázquez |
---|---|---|---|
Component: | GIS | Version: | dev |
Severity: | Normal | Keywords: | Geodjango Database Functions Rotate |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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:
Change History (5)
comment:1 by , 4 months ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Version: | 5.1 → dev |
comment:2 by , 4 months ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:3 by , 3 months ago
Has patch: | set |
---|
I have created a PR. https://github.com/django/django/pull/18553
comment:4 by , 3 months ago
Patch needs improvement: | set |
---|
comment:5 by , 4 weeks ago
Patch needs improvement: | unset |
---|
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.