1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Added SpatialFeatures.unsupported_geojson_options.

This commit is contained in:
Tim Graham
2020-11-11 01:39:15 -05:00
committed by GitHub
parent f90fcc222b
commit c9e8544321
4 changed files with 8 additions and 4 deletions

View File

@@ -44,14 +44,13 @@ class GISFunctionsTests(FuncTestMixin, TestCase):
'{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},'
'"bbox":[-87.65018,41.85039,-87.65018,41.85039],"coordinates":[-87.65018,41.85039]}'
)
# MySQL and Oracle ignore the crs option.
if mysql or oracle:
if 'crs' in connection.features.unsupported_geojson_options:
del houston_json['crs']
del chicago_json['crs']
# Oracle ignores also the bbox and precision options.
if oracle:
if 'bbox' in connection.features.unsupported_geojson_options:
del chicago_json['bbox']
del victoria_json['bbox']
if 'precision' in connection.features.unsupported_geojson_options:
chicago_json['coordinates'] = [-87.650175, 41.850385]
# Precision argument should only be an integer