Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
a799dc51
Kaydet (Commit)
a799dc51
authored
Haz 21, 2018
tarafından
Sergey Fedoseev
Kaydeden (comit)
Tim Graham
Haz 21, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #29509 -- Added SpatiaLite support for covers and coveredby lookups.
üst
12018cef
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
4 deletions
+21
-4
operations.py
django/contrib/gis/db/backends/spatialite/operations.py
+2
-0
db-api.txt
docs/ref/contrib/gis/db-api.txt
+2
-2
geoquerysets.txt
docs/ref/contrib/gis/geoquerysets.txt
+12
-2
2.2.txt
docs/releases/2.2.txt
+3
-0
tests.py
tests/gis_tests/geoapp/tests.py
+2
-0
No files found.
django/contrib/gis/db/backends/spatialite/operations.py
Dosyayı görüntüle @
a799dc51
...
...
@@ -47,6 +47,8 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations):
'contains'
:
SpatialiteNullCheckOperator
(
func
=
'Contains'
),
'intersects'
:
SpatialiteNullCheckOperator
(
func
=
'Intersects'
),
'relate'
:
SpatialiteNullCheckOperator
(
func
=
'Relate'
),
'coveredby'
:
SpatialiteNullCheckOperator
(
func
=
'CoveredBy'
),
'covers'
:
SpatialiteNullCheckOperator
(
func
=
'Covers'
),
# Returns true if B's bounding box completely contains A's bounding box.
'contained'
:
SpatialOperator
(
func
=
'MbrWithin'
),
# Returns true if A's bounding box completely contains B's bounding box.
...
...
docs/ref/contrib/gis/db-api.txt
Dosyayı görüntüle @
a799dc51
...
...
@@ -329,8 +329,8 @@ Lookup Type PostGIS Oracle MySQL [#]_ SpatiaLite
:lookup:`contained` X X X N
:lookup:`contains <gis-contains>` X X X X B
:lookup:`contains_properly` X B
:lookup:`coveredby` X X
B
:lookup:`covers` X X
B
:lookup:`coveredby` X X
X
B
:lookup:`covers` X X
X
B
:lookup:`crosses` X X C
:lookup:`disjoint` X X X X B
:lookup:`distance_gt` X X X N
...
...
docs/ref/contrib/gis/geoquerysets.txt
Dosyayı görüntüle @
a799dc51
...
...
@@ -179,7 +179,7 @@ PostGIS ``ST_ContainsProperly(poly, geom)``
-------------
*Availability*: `PostGIS <https://postgis.net/docs/ST_CoveredBy.html>`__,
Oracle, PGRaster (Bilateral)
Oracle, PGRaster (Bilateral)
, SpatiaLite
Tests if no point in the geometry field is outside the lookup geometry.
[#fncovers]_
...
...
@@ -188,11 +188,16 @@ Example::
Zipcode.objects.filter(poly__coveredby=geom)
.. versionchanged:: 2.2
SpatiaLite support was added.
========== =============================
Backend SQL Equivalent
========== =============================
PostGIS ``ST_CoveredBy(poly, geom)``
Oracle ``SDO_COVEREDBY(poly, geom)``
SpatiaLite ``CoveredBy(poly, geom)``
========== =============================
.. fieldlookup:: covers
...
...
@@ -201,7 +206,7 @@ Oracle ``SDO_COVEREDBY(poly, geom)``
----------
*Availability*: `PostGIS <https://postgis.net/docs/ST_Covers.html>`__,
Oracle, PGRaster (Bilateral)
Oracle, PGRaster (Bilateral)
, SpatiaLite
Tests if no point in the lookup geometry is outside the geometry field.
[#fncovers]_
...
...
@@ -210,11 +215,16 @@ Example::
Zipcode.objects.filter(poly__covers=geom)
.. versionchanged:: 2.2
SpatiaLite support was added.
========== ==========================
Backend SQL Equivalent
========== ==========================
PostGIS ``ST_Covers(poly, geom)``
Oracle ``SDO_COVERS(poly, geom)``
SpatiaLite ``Covers(poly, geom)``
========== ==========================
.. fieldlookup:: crosses
...
...
docs/releases/2.2.txt
Dosyayı görüntüle @
a799dc51
...
...
@@ -59,6 +59,9 @@ Minor features
* Added Oracle support for the
:class:`~django.contrib.gis.db.models.functions.Envelope` function.
* Added SpatiaLite support for the :lookup:`coveredby` and :lookup:`covers`
lookups.
:mod:`django.contrib.messages`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
tests/gis_tests/geoapp/tests.py
Dosyayı görüntüle @
a799dc51
...
...
@@ -421,6 +421,8 @@ class GeoLookupTest(TestCase):
(
'relate'
,
(
Point
(
1
,
1
),
'T*T***FF*'
)),
(
'same_as'
,
Point
(
1
,
1
)),
(
'exact'
,
Point
(
1
,
1
)),
(
'coveredby'
,
Point
(
1
,
1
)),
(
'covers'
,
Point
(
1
,
1
)),
]
for
lookup
,
geom
in
queries
:
with
self
.
subTest
(
lookup
=
lookup
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment