Skip to content

Commit e2c3365

Browse files
committed
[docs/chores] Minor adjustments
1 parent 9b5879f commit e2c3365

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

README.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,18 @@ methods for GeoJSON input/output.
8181

8282
This field takes three optional arguments:
8383

84-
``precision``: Passes coordinates through Python's builtin ``round()`` function (`docs
85-
<https://docs.python.org/3/library/functions.html#round>`_), rounding values to
86-
the provided level of precision. E.g. A Point with lat/lng of
87-
``[51.0486, -114.0708]`` passed through a ``GeometryField(precision=2)``
88-
would return a Point with a lat/lng of ``[51.05, -114.07]``.
89-
90-
``remove_duplicates``: Remove sequential duplicate coordinates from line and
91-
polygon geometries. This is particularly useful when used with the ``precision``
92-
argument, as the likelihood of duplicate coordinates increase as precision of
93-
coordinates are reduced.
94-
95-
``auto_bbox``: If True, the GeoJSON object will include a `bounding box <https://datatracker.ietf.org/doc/html/rfc7946#section-5>`_, which is the smallest possible rectangle enclosing the geometry.
84+
- ``precision``: Passes coordinates through Python's builtin ``round()`` function (`docs
85+
<https://docs.python.org/3/library/functions.html#round>`_), rounding values to
86+
the provided level of precision. E.g. A Point with lat/lng of
87+
``[51.0486, -114.0708]`` passed through a ``GeometryField(precision=2)``
88+
would return a Point with a lat/lng of ``[51.05, -114.07]``.
89+
- ``remove_duplicates``: Remove sequential duplicate coordinates from line and
90+
polygon geometries. This is particularly useful when used with the ``precision``
91+
argument, as the likelihood of duplicate coordinates increase as precision of
92+
coordinates are reduced.
93+
- ``auto_bbox``: If ``True``, the GeoJSON object will include
94+
a `bounding box <https://datatracker.ietf.org/doc/html/rfc7946#section-5>`_,
95+
which is the smallest possible rectangle enclosing the geometry.
9696

9797
**Note:** While ``precision`` and ``remove_duplicates`` are designed to reduce the
9898
byte size of the API response, they will also increase the processing time

rest_framework_gis/fields.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def to_representation(self, value):
5151
geometry['coordinates'] = self._rm_redundant_points(
5252
geometry['coordinates'], geometry['type']
5353
)
54-
5554
if self.auto_bbox:
5655
geojson["bbox"] = value.extent
5756
return geojson

0 commit comments

Comments
 (0)