Opened 11 years ago
Last modified 11 years ago
#23579 closed New feature
Default Geometry representation from WKT to EWKT — at Initial Version
| 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
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 loaddata output, which is welcome in my opinion.
Comments welcome.