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
35504f74
Kaydet (Commit)
35504f74
authored
Tem 21, 2016
tarafından
Kevan Swanberg
Kaydeden (comit)
Tim Graham
Agu 31, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #26685 -- Added dwithin lookup support on SpatiaLite.
üst
0d792926
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
5 deletions
+11
-5
operations.py
django/contrib/gis/db/backends/spatialite/operations.py
+1
-0
db-api.txt
docs/ref/contrib/gis/db-api.txt
+1
-1
geoquerysets.txt
docs/ref/contrib/gis/geoquerysets.txt
+3
-2
1.11.txt
docs/releases/1.11.txt
+2
-0
tests.py
tests/gis_tests/distapp/tests.py
+4
-2
No files found.
django/contrib/gis/db/backends/spatialite/operations.py
Dosyayı görüntüle @
35504f74
...
...
@@ -58,6 +58,7 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations):
gis_operators
=
{
'equals'
:
SpatialOperator
(
func
=
'Equals'
),
'disjoint'
:
SpatialOperator
(
func
=
'Disjoint'
),
'dwithin'
:
SpatialOperator
(
func
=
'PtDistWithin'
),
'touches'
:
SpatialOperator
(
func
=
'Touches'
),
'crosses'
:
SpatialOperator
(
func
=
'Crosses'
),
'within'
:
SpatialOperator
(
func
=
'Within'
),
...
...
docs/ref/contrib/gis/db-api.txt
Dosyayı görüntüle @
35504f74
...
...
@@ -343,7 +343,7 @@ Lookup Type PostGIS Oracle MySQL [#]_ SpatiaLite
:lookup:`distance_gte` X X X N
:lookup:`distance_lt` X X X N
:lookup:`distance_lte` X X X N
:lookup:`dwithin` X X
B
:lookup:`dwithin` X X
X
B
:lookup:`equals` X X X X C
:lookup:`exact` X X X X B
:lookup:`intersects` X X X X B
...
...
docs/ref/contrib/gis/geoquerysets.txt
Dosyayı görüntüle @
35504f74
...
...
@@ -708,11 +708,12 @@ Backend SQL Equivalent
========== ======================================
PostGIS ``ST_DWithin(poly, geom, 5)``
Oracle ``SDO_WITHIN_DISTANCE(poly, geom, 5)``
SpatiaLite ``PtDistWithin(poly, geom, 5)``
========== ======================================
..
note::
..
versionchanged:: 1.11
This lookup is not available on SpatiaLite
.
SpatiaLite support was added
.
.. _geoqueryset-methods:
...
...
docs/releases/1.11.txt
Dosyayı görüntüle @
35504f74
...
...
@@ -114,6 +114,8 @@ Minor features
* The new :meth:`.GEOSGeometry.from_gml` and :meth:`.OGRGeometry.from_gml`
methods allow creating geometries from GML.
* Added support for the :lookup:`dwithin` lookup on SpatiaLite.
:mod:`django.contrib.messages`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
tests/gis_tests/distapp/tests.py
Dosyayı görüntüle @
35504f74
...
...
@@ -10,7 +10,7 @@ from django.db.models import F, Q
from
django.test
import
TestCase
,
ignore_warnings
,
skipUnlessDBFeature
from
django.utils.deprecation
import
RemovedInDjango20Warning
from
..utils
import
no_oracle
,
oracle
,
postgis
from
..utils
import
no_oracle
,
oracle
,
postgis
,
spatialite
from
.models
import
(
AustraliaCity
,
CensusZipcode
,
Interstate
,
SouthTexasCity
,
SouthTexasCityFt
,
SouthTexasInterstate
,
SouthTexasZipcode
,
...
...
@@ -82,9 +82,11 @@ class DistanceTest(TestCase):
type_error
=
False
if
isinstance
(
dist
,
tuple
):
if
oracle
:
if
oracle
or
spatialite
:
# Result in meters
dist
=
dist
[
1
]
else
:
# Result in units of the field
dist
=
dist
[
0
]
# Creating the query set.
...
...
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