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
af5983e4
Kaydet (Commit)
af5983e4
authored
Ara 17, 2016
tarafından
Sergey Fedoseev
Kaydeden (comit)
Tim Graham
Ara 17, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed unneeded SpatiaLite workarounds in GIS tests.
üst
17a9e0cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
test_functions.py
tests/gis_tests/geoapp/test_functions.py
+5
-11
No files found.
tests/gis_tests/geoapp/test_functions.py
Dosyayı görüntüle @
af5983e4
...
...
@@ -177,8 +177,8 @@ class GISFunctionsTests(TestCase):
def
test_difference
(
self
):
geom
=
Point
(
5
,
23
,
srid
=
4326
)
qs
=
Country
.
objects
.
annotate
(
diff
=
functions
.
Difference
(
'mpoly'
,
geom
))
#
SpatiaLite and Oracle do
something screwy with the Texas geometry.
if
spatialite
or
oracle
:
#
Oracle does
something screwy with the Texas geometry.
if
oracle
:
qs
=
qs
.
exclude
(
name
=
'Texas'
)
for
c
in
qs
:
...
...
@@ -189,8 +189,8 @@ class GISFunctionsTests(TestCase):
"""Testing with mixed SRID (Country has default 4326)."""
geom
=
Point
(
556597.4
,
2632018.6
,
srid
=
3857
)
# Spherical mercator
qs
=
Country
.
objects
.
annotate
(
difference
=
functions
.
Difference
(
'mpoly'
,
geom
))
#
SpatiaLite and Oracle do
something screwy with the Texas geometry.
if
spatialite
or
oracle
:
#
Oracle does
something screwy with the Texas geometry.
if
oracle
:
qs
=
qs
.
exclude
(
name
=
'Texas'
)
for
c
in
qs
:
self
.
assertTrue
(
c
.
mpoly
.
difference
(
geom
)
.
equals
(
c
.
difference
))
...
...
@@ -468,15 +468,9 @@ class GISFunctionsTests(TestCase):
difference
=
functions
.
Difference
(
'mpoly'
,
geom
),
sym_difference
=
functions
.
SymDifference
(
'mpoly'
,
geom
),
union
=
functions
.
Union
(
'mpoly'
,
geom
),
intersection
=
functions
.
Intersection
(
'mpoly'
,
geom
),
)
# For some reason SpatiaLite does something screwy with the Texas geometry here.
# Also, it doesn't like the null intersection.
if
spatialite
:
qs
=
qs
.
exclude
(
name
=
'Texas'
)
else
:
qs
=
qs
.
annotate
(
intersection
=
functions
.
Intersection
(
'mpoly'
,
geom
))
if
oracle
:
# Should be able to execute the queries; however, they won't be the same
# as GEOS (because Oracle doesn't use GEOS internally like PostGIS or
...
...
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