mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #18919 -- Stopped dropping Z attribute when transforming geometries
Previously, the wkb of geometries was dropping the Z attribute. Thanks luizvital for the report and tests and georger.silva@gmail.com for the tests.
This commit is contained in:
parent
82a74dce24
commit
ffdd6595ea
6 changed files with 61 additions and 50 deletions
|
@ -273,14 +273,18 @@ Essentially the SRID is prepended to the WKT representation, for example
|
|||
.. attribute:: GEOSGeometry.hex
|
||||
|
||||
Returns the WKB of this Geometry in hexadecimal form. Please note
|
||||
that the SRID and Z values are not included in this representation
|
||||
that the SRID value is not included in this representation
|
||||
because it is not a part of the OGC specification (use the
|
||||
:attr:`GEOSGeometry.hexewkb` property instead).
|
||||
|
||||
.. versionchanged:: 1.5
|
||||
|
||||
Prior to Django 1.5, the Z value of the geometry was dropped.
|
||||
|
||||
.. attribute:: GEOSGeometry.hexewkb
|
||||
|
||||
Returns the EWKB of this Geometry in hexadecimal form. This is an
|
||||
extension of the WKB specification that includes SRID and Z values
|
||||
extension of the WKB specification that includes the SRID value
|
||||
that are a part of this geometry.
|
||||
|
||||
.. note::
|
||||
|
@ -319,16 +323,20 @@ correspondg to the GEOS geometry.
|
|||
.. attribute:: GEOSGeometry.wkb
|
||||
|
||||
Returns the WKB (Well-Known Binary) representation of this Geometry
|
||||
as a Python buffer. SRID and Z values are not included, use the
|
||||
as a Python buffer. SRID value is not included, use the
|
||||
:attr:`GEOSGeometry.ewkb` property instead.
|
||||
|
||||
.. versionchanged:: 1.5
|
||||
|
||||
Prior to Django 1.5, the Z value of the geometry was dropped.
|
||||
|
||||
.. _ewkb:
|
||||
|
||||
.. attribute:: GEOSGeometry.ewkb
|
||||
|
||||
Return the EWKB representation of this Geometry as a Python buffer.
|
||||
This is an extension of the WKB specification that includes any SRID
|
||||
and Z values that are a part of this geometry.
|
||||
value that are a part of this geometry.
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -822,7 +830,7 @@ Writer Objects
|
|||
All writer objects have a ``write(geom)`` method that returns either the
|
||||
WKB or WKT of the given geometry. In addition, :class:`WKBWriter` objects
|
||||
also have properties that may be used to change the byte order, and or
|
||||
include the SRID and 3D values (in other words, EWKB).
|
||||
include the SRID value (in other words, EWKB).
|
||||
|
||||
.. class:: WKBWriter
|
||||
|
||||
|
@ -884,7 +892,7 @@ so that the Z value is included in the WKB.
|
|||
Outdim Value Description
|
||||
============ ===========================
|
||||
2 The default, output 2D WKB.
|
||||
3 Output 3D EWKB.
|
||||
3 Output 3D WKB.
|
||||
============ ===========================
|
||||
|
||||
Example::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue