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
a4fbdcdf
Kaydet (Commit)
a4fbdcdf
authored
Ock 22, 2014
tarafından
Oliver George
Kaydeden (comit)
Claude Paroz
Ock 22, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #21850 -- Made GeometryField.geodetic case insensitive
üst
088cb711
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
fields.py
django/contrib/gis/db/models/fields.py
+2
-2
query.py
django/contrib/gis/db/models/query.py
+1
-1
No files found.
django/contrib/gis/db/models/fields.py
Dosyayı görüntüle @
a4fbdcdf
...
...
@@ -51,7 +51,7 @@ class GeometryField(Field):
form_class
=
forms
.
GeometryField
# Geodetic units.
geodetic_units
=
(
'
Decimal D
egree'
,
'degree'
)
geodetic_units
=
(
'
decimal d
egree'
,
'degree'
)
description
=
_
(
"The base GIS field -- maps to the OpenGIS Specification Geometry type."
)
...
...
@@ -147,7 +147,7 @@ class GeometryField(Field):
Returns true if this field's SRID corresponds with a coordinate
system that uses non-projected units (e.g., latitude/longitude).
"""
return
self
.
units_name
(
connection
)
in
self
.
geodetic_units
return
self
.
units_name
(
connection
)
.
lower
()
in
self
.
geodetic_units
def
get_distance
(
self
,
value
,
lookup_type
,
connection
):
"""
...
...
django/contrib/gis/db/models/query.py
Dosyayı görüntüle @
a4fbdcdf
...
...
@@ -646,7 +646,7 @@ class GeoQuerySet(QuerySet):
# been transformed via the `transform` GeoQuerySet method.
if
self
.
query
.
transformed_srid
:
u
,
unit_name
,
s
=
get_srid_info
(
self
.
query
.
transformed_srid
,
connection
)
geodetic
=
unit_name
in
geo_field
.
geodetic_units
geodetic
=
unit_name
.
lower
()
in
geo_field
.
geodetic_units
if
backend
.
spatialite
and
geodetic
:
raise
ValueError
(
'SQLite does not support linear distance calculations on geodetic coordinate systems.'
)
...
...
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