Opened 3 months ago
Last modified 2 months 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: | yes |
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 (4)
comment:1 by , 3 months ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Version: | 5.1 → dev |
comment:2 by , 3 months ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:3 by , 2 months ago
Has patch: | set |
---|
I have created a PR. https://github.com/django/django/pull/18553
comment:4 by , 2 months ago
Patch needs improvement: | set |
---|
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.