|
@@ -27,9 +27,9 @@ Measurement Relationships Operations Edi
|
|
|
:class:`Distance` :class:`BoundingCircle` :class:`Intersection` :class:`MakeValid` :class:`AsGML` :class:`MemSize`
|
|
|
:class:`GeometryDistance` :class:`Centroid` :class:`SymDifference` :class:`Reverse` :class:`AsKML` :class:`NumGeometries`
|
|
|
:class:`Length` :class:`Envelope` :class:`Union` :class:`Scale` :class:`AsSVG` :class:`NumPoints`
|
|
|
-:class:`Perimeter` :class:`LineLocatePoint` :class:`SnapToGrid` :class:`GeoHash`
|
|
|
-.. :class:`PointOnSurface` :class:`Transform`
|
|
|
-.. :class:`Translate`
|
|
|
+:class:`Perimeter` :class:`LineLocatePoint` :class:`SnapToGrid` :class:`AsWKB`
|
|
|
+.. :class:`PointOnSurface` :class:`Transform` :class:`AsWKT`
|
|
|
+.. :class:`Translate` :class:`GeoHash`
|
|
|
========================= ======================== ====================== ======================= ================== =====================
|
|
|
|
|
|
``Area``
|
|
@@ -168,6 +168,48 @@ Keyword Argument Description
|
|
|
|
|
|
__ https://www.w3.org/Graphics/SVG/
|
|
|
|
|
|
+``AsWKB``
|
|
|
+=========
|
|
|
+
|
|
|
+.. class:: AsWKB(expression, **extra)
|
|
|
+
|
|
|
+.. versionadded:: 3.1
|
|
|
+
|
|
|
+*Availability*: MariaDB, `MySQL
|
|
|
+<https://dev.mysql.com/doc/refman/en/gis-format-conversion-functions.html#function_st-asbinary>`__,
|
|
|
+Oracle, `PostGIS <https://postgis.net/docs/ST_AsBinary.html>`__, SpatiaLite
|
|
|
+
|
|
|
+Accepts a single geographic field or expression and returns a `Well-known
|
|
|
+binary (WKB)`__ representation of the geometry.
|
|
|
+
|
|
|
+Example::
|
|
|
+
|
|
|
+ >>> bytes(City.objects.annotate(wkb=AsWKB('point')).get(name='Chelyabinsk').wkb)
|
|
|
+ b'\x01\x01\x00\x00\x00]3\xf9f\x9b\x91K@\x00X\x1d9\xd2\xb9N@'
|
|
|
+
|
|
|
+__ https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary
|
|
|
+
|
|
|
+``AsWKT``
|
|
|
+=========
|
|
|
+
|
|
|
+.. class:: AsWKT(expression, **extra)
|
|
|
+
|
|
|
+.. versionadded:: 3.1
|
|
|
+
|
|
|
+*Availability*: MariaDB, `MySQL
|
|
|
+<https://dev.mysql.com/doc/refman/en/gis-format-conversion-functions.html#function_st-astext>`__,
|
|
|
+Oracle, `PostGIS <https://postgis.net/docs/ST_AsText.html>`__, SpatiaLite
|
|
|
+
|
|
|
+Accepts a single geographic field or expression and returns a `Well-known text
|
|
|
+(WKT)`__ representation of the geometry.
|
|
|
+
|
|
|
+Example::
|
|
|
+
|
|
|
+ >>> City.objects.annotate(wkt=AsWKT('point')).get(name='Chelyabinsk').wkt
|
|
|
+ 'POINT (55.137555 61.451728)'
|
|
|
+
|
|
|
+__ https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry
|
|
|
+
|
|
|
``Azimuth``
|
|
|
===========
|
|
|
|