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
6f913c03
Kaydet (Commit)
6f913c03
authored
Mar 13, 2017
tarafından
Sergey Fedoseev
Kaydeden (comit)
Tim Graham
Mar 13, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #27788 -- Removed Oracle 11 workarounds in GIS tests.
üst
bf0dff4b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
19 deletions
+4
-19
tests.py
tests/gis_tests/distapp/tests.py
+4
-19
No files found.
tests/gis_tests/distapp/tests.py
Dosyayı görüntüle @
6f913c03
...
...
@@ -104,20 +104,10 @@ class DistanceTest(TestCase):
# Retrieving the cities within a 20km 'donut' w/a 7km radius 'hole'
# (thus, Houston and Southside place will be excluded as tested in
# the `test02_dwithin` above).
qs1
=
SouthTexasCity
.
objects
.
filter
(
point__distance_gte
=
(
self
.
stx_pnt
,
D
(
km
=
7
)))
.
filter
(
point__distance_lte
=
(
self
.
stx_pnt
,
D
(
km
=
20
)),
)
# Oracle 11 incorrectly thinks it is not projected.
if
oracle
:
dist_qs
=
(
qs1
,)
else
:
qs2
=
SouthTexasCityFt
.
objects
.
filter
(
point__distance_gte
=
(
self
.
stx_pnt
,
D
(
km
=
7
)))
.
filter
(
for
model
in
[
SouthTexasCity
,
SouthTexasCityFt
]:
qs
=
model
.
objects
.
filter
(
point__distance_gte
=
(
self
.
stx_pnt
,
D
(
km
=
7
)))
.
filter
(
point__distance_lte
=
(
self
.
stx_pnt
,
D
(
km
=
20
)),
)
dist_qs
=
(
qs1
,
qs2
)
for
qs
in
dist_qs
:
cities
=
self
.
get_names
(
qs
)
self
.
assertEqual
(
cities
,
[
'Bellaire'
,
'Pearland'
,
'West University Place'
])
...
...
@@ -293,8 +283,6 @@ class DistanceFunctionsTests(TestCase):
70870.188967
,
165337.758878
,
139196.085105
]
# SELECT ST_Distance(point, ST_Transform(ST_GeomFromText('POINT(-96.876369 29.905320)', 4326), 2278))
# FROM distapp_southtexascityft;
# Oracle 11 thinks this is not a projected coordinate system, so it's
# not tested.
ft_distances
=
[
482528.79154625
,
458103.408123001
,
462231.860397575
,
455411.438904354
,
519386.252102563
,
696139.009211594
,
232513.278304279
,
542445.630586414
,
456679.155883207
]
...
...
@@ -302,11 +290,8 @@ class DistanceFunctionsTests(TestCase):
# Testing using different variations of parameters and using models
# with different projected coordinate systems.
dist1
=
SouthTexasCity
.
objects
.
annotate
(
distance
=
Distance
(
'point'
,
lagrange
))
.
order_by
(
'id'
)
if
oracle
:
dist_qs
=
[
dist1
]
else
:
dist2
=
SouthTexasCityFt
.
objects
.
annotate
(
distance
=
Distance
(
'point'
,
lagrange
))
.
order_by
(
'id'
)
dist_qs
=
[
dist1
,
dist2
]
dist2
=
SouthTexasCityFt
.
objects
.
annotate
(
distance
=
Distance
(
'point'
,
lagrange
))
.
order_by
(
'id'
)
dist_qs
=
[
dist1
,
dist2
]
# Original query done on PostGIS, have to adjust AlmostEqual tolerance
# for Oracle.
...
...
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