#18919: GEOSGeometry transform method is dropping Z attribute on 3D geometries ---------------------------+------------------------------------ Reporter: luizvital | Owner: nobody Type: Bug | Status: new Component: GIS | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 ---------------------------+------------------------------------
Comment (by georger.silva@…): Hi Claude, I don't think the patch needs to be too invasive. I did not test this (yet - I'll let you know in a few), but I think the solution is as simple as: 1) identify if the geometry has a z coordinate; 2) copy the points z coordinates; 3) set the z coordinates after the conversion is done; PostGIS does not touch Z values: {{{!python SELECT ST_AsEWKT(ST_Transform(ST_GeomFromText('POLYGON((0 0 10,0 1 10,1 1 10,1 0 10,0 0 10))',4326),31981)) "SRID=31981;POLYGON((8234117.01325455 10000000 10,8231607.63895047 10201616.0688736 10,8432755.23239255 10206800.1025772 10,8435402.30459162 10000000 10,8234117.01325455 10000000 10))" }}} Nevertheless, I'll test your most welcome patch. I'll let you know soon. -- Ticket URL: <https://code.djangoproject.com/ticket/18919#comment:10> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.