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
546412e6
Kaydet (Commit)
546412e6
authored
Agu 14, 2017
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #28495 -- Converted GDAL Feature.fields to strings
üst
41640760
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
feature.py
django/contrib/gis/gdal/feature.py
+7
-2
test_ds.py
tests/gis_tests/gdal_tests/test_ds.py
+1
-0
No files found.
django/contrib/gis/gdal/feature.py
Dosyayı görüntüle @
546412e6
...
...
@@ -82,8 +82,13 @@ class Feature(GDALBase):
@property
def
fields
(
self
):
"Return a list of fields in the Feature."
return
[
capi
.
get_field_name
(
capi
.
get_field_defn
(
self
.
_layer
.
_ldefn
,
i
))
for
i
in
range
(
self
.
num_fields
)]
return
[
force_text
(
capi
.
get_field_name
(
capi
.
get_field_defn
(
self
.
_layer
.
_ldefn
,
i
)),
self
.
encoding
,
strings_only
=
True
)
for
i
in
range
(
self
.
num_fields
)
]
@property
def
geom
(
self
):
...
...
tests/gis_tests/gdal_tests/test_ds.py
Dosyayı görüntüle @
546412e6
...
...
@@ -195,6 +195,7 @@ class DataSourceTest(unittest.TestCase):
# Making sure we get the proper OGR Field instance, using
# a string value index for the feature.
self
.
assertIsInstance
(
feat
[
k
],
v
)
self
.
assertIsInstance
(
feat
.
fields
[
0
],
str
)
# Testing Feature.__iter__
for
fld
in
feat
:
...
...
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