Opened 11 years ago
Closed 11 years ago
#23579 closed New feature (fixed)
Default Geometry representation from WKT to EWKT
| Reported by: | Claude Paroz | Owned by: | nobody |
|---|---|---|---|
| Component: | GIS | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Currently, the default __str__ representation of a GEOSGeometry object is its WKT representation (e.g. "POINT (1 2)").
I'd like to suggest moving to the EWKT representation which includes the SRID information (e.g. "SRID=4326;POINT (1 2)").
For me, coordinates without SRID is like an encoded string without knowing its encoding, or a datetime object without the timezone.
The change is trivial. There is a small backwards compatibility issue, essentially for people testing the output of str(geom), and it also means that the SRID will also appear in dumpdata output, which is welcome in my opinion.
Comments welcome.
Change History (4)
comment:1 by , 11 years ago
| Has patch: | set |
|---|
comment:2 by , 11 years ago
| Description: | modified (diff) |
|---|
comment:3 by , 11 years ago
| Triage Stage: | Unreviewed → Ready for checkin |
|---|
comment:4 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
https://github.com/django/django/pull/3344