Opened 13 years ago
Closed 12 years ago
#16594 closed Bug (fixed)
Missing altitude (z) on Point on admin interface for geodjango
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | GIS | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | flavio.curella@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I am using a model with a 3d Point field, although in the database I can see correctly the z component in the admin section for the Point field I see only the x,y component i.e. POINT(x_value y_value ) instead of POINT(x_value y_value z_value).
Thanks!
Luca
Attachments (2)
Change History (7)
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 12 years ago
See also #18919.
The __str__()
method applied to a point object returns a coordinate-tuple with the z-component dropped. This seems directly related to the issue at hand.
comment:3 by , 12 years ago
Has patch: | set |
---|
I'd be interested to hear from tests with the attached patch. GEOS 3.3 is still required to have 3D WKTs.
by , 12 years ago
Attachment: | 16594-2.diff added |
---|
Updated now that geometries.json.gz test data is geometries.json
comment:4 by , 12 years ago
Cc: | added |
---|
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I can reproduce this with PostgreSQL and PostGIS.
I wrote a model that contains this field:
geom3 = django.contrib.gis.db.models.GeometryField(dim=3)
.I can create an object with the value
POINT(1 2 3)
in the admin. When I edit this object again, the field containsPOINT (1.0000000000000000 2.0000000000000000)
— no3.0000000000000000
. If I try to save the object, I get this traceback: