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
860903b2
Unverified
Kaydet (Commit)
860903b2
authored
Haz 11, 2018
tarafından
Tim Graham
Kaydeden (comit)
GitHub
Haz 11, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Dropped support for GDAL 1.9 and 1.10.
üst
e8531cc8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
51 deletions
+35
-51
libgdal.py
django/contrib/gis/gdal/libgdal.py
+2
-2
raster.py
django/contrib/gis/gdal/prototypes/raster.py
+1
-4
base.py
django/contrib/gis/gdal/raster/base.py
+0
-3
geolibs.txt
docs/ref/contrib/gis/install/geolibs.txt
+1
-3
2.2.txt
docs/releases/2.2.txt
+1
-1
test_raster.py
tests/gis_tests/gdal_tests/test_raster.py
+30
-38
No files found.
django/contrib/gis/gdal/libgdal.py
Dosyayı görüntüle @
860903b2
...
...
@@ -21,10 +21,10 @@ if lib_path:
lib_names
=
None
elif
os
.
name
==
'nt'
:
# Windows NT shared libraries
lib_names
=
[
'gdal202'
,
'gdal201'
,
'gdal20'
,
'gdal111'
,
'gdal110'
,
'gdal19'
]
lib_names
=
[
'gdal202'
,
'gdal201'
,
'gdal20'
,
'gdal111'
]
elif
os
.
name
==
'posix'
:
# *NIX library names.
lib_names
=
[
'gdal'
,
'GDAL'
,
'gdal2.2.0'
,
'gdal2.1.0'
,
'gdal2.0.0'
,
'gdal1.11.0'
,
'gdal1.10.0'
,
'gdal1.9.0'
]
lib_names
=
[
'gdal'
,
'GDAL'
,
'gdal2.2.0'
,
'gdal2.1.0'
,
'gdal2.0.0'
,
'gdal1.11.0'
]
else
:
raise
ImproperlyConfigured
(
'GDAL is unsupported on OS "
%
s".'
%
os
.
name
)
...
...
django/contrib/gis/gdal/prototypes/raster.py
Dosyayı görüntüle @
860903b2
...
...
@@ -51,10 +51,7 @@ set_ds_geotransform = void_output(std_call('GDALSetGeoTransform'), [c_void_p, PO
get_ds_metadata
=
chararray_output
(
std_call
(
'GDALGetMetadata'
),
[
c_void_p
,
c_char_p
],
errcheck
=
False
)
set_ds_metadata
=
void_output
(
std_call
(
'GDALSetMetadata'
),
[
c_void_p
,
POINTER
(
c_char_p
),
c_char_p
])
if
GDAL_VERSION
>=
(
1
,
11
):
get_ds_metadata_domain_list
=
chararray_output
(
std_call
(
'GDALGetMetadataDomainList'
),
[
c_void_p
],
errcheck
=
False
)
else
:
get_ds_metadata_domain_list
=
None
get_ds_metadata_domain_list
=
chararray_output
(
std_call
(
'GDALGetMetadataDomainList'
),
[
c_void_p
],
errcheck
=
False
)
get_ds_metadata_item
=
const_string_output
(
std_call
(
'GDALGetMetadataItem'
),
[
c_void_p
,
c_char_p
,
c_char_p
])
set_ds_metadata_item
=
const_string_output
(
std_call
(
'GDALSetMetadataItem'
),
[
c_void_p
,
c_char_p
,
c_char_p
,
c_char_p
])
free_dsl
=
void_output
(
std_call
(
'CSLDestroy'
),
[
POINTER
(
c_char_p
)],
errcheck
=
False
)
...
...
django/contrib/gis/gdal/raster/base.py
Dosyayı görüntüle @
860903b2
...
...
@@ -13,9 +13,6 @@ class GDALRasterBase(GDALBase):
nested dictionary, where the first-level key is the metadata domain and
the second-level is the metadata item names and values for that domain.
"""
if
not
capi
.
get_ds_metadata_domain_list
:
raise
ValueError
(
'GDAL ≥ 1.11 is required for using the metadata property.'
)
# The initial metadata domain list contains the default domain.
# The default is returned if domain name is None.
domain_list
=
[
'DEFAULT'
]
...
...
docs/ref/contrib/gis/install/geolibs.txt
Dosyayı görüntüle @
860903b2
...
...
@@ -10,7 +10,7 @@ Program Description Required
======================== ==================================== ================================ ===================================
:doc:`GEOS <../geos>` Geometry Engine Open Source Yes 3.6, 3.5, 3.4
`PROJ.4`_ Cartographic Projections library Yes (PostgreSQL and SQLite only) 4.9, 4.8, 4.7, 4.6, 4.5, 4.4
:doc:`GDAL <../gdal>` Geospatial Data Abstraction Library Yes 2.2, 2.1, 2.0, 1.11
, 1.10, 1.9
:doc:`GDAL <../gdal>` Geospatial Data Abstraction Library Yes 2.2, 2.1, 2.0, 1.11
:doc:`GeoIP <../geoip2>` IP-based geolocation library No 2
`PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 2.4, 2.3, 2.2, 2.1
`SpatiaLite`__ Spatial extensions for SQLite Yes (SQLite only) 4.3, 4.2, 4.1
...
...
@@ -24,8 +24,6 @@ totally fine with GeoDjango. Your mileage may vary.
GEOS 3.4.0 2013-08-11
GEOS 3.5.0 2015-08-15
GEOS 3.6.0 2016-10-25
GDAL 1.9.0 2012-01-03
GDAL 1.10.0 2013-04-29
GDAL 1.11.0 2014-04-25
GDAL 2.0.0 2015-06
GDAL 2.1.0 2016-04
...
...
docs/releases/2.2.txt
Dosyayı görüntüle @
860903b2
...
...
@@ -207,7 +207,7 @@ Database backend API
:mod:`django.contrib.gis`
-------------------------
*
..
.
*
Support for GDAL 1.9 and 1.10 is dropped
.
Miscellaneous
-------------
...
...
tests/gis_tests/gdal_tests/test_raster.py
Dosyayı görüntüle @
860903b2
...
...
@@ -277,13 +277,6 @@ class GDALRasterTests(SimpleTestCase):
self
.
assertEqual
(
result
,
[
0
]
*
4
)
def
test_raster_metadata_property
(
self
):
# Check for required gdal version.
if
GDAL_VERSION
<
(
1
,
11
):
msg
=
'GDAL ≥ 1.11 is required for using the metadata property.'
with
self
.
assertRaisesMessage
(
ValueError
,
msg
):
self
.
rs
.
metadata
return
data
=
self
.
rs
.
metadata
self
.
assertEqual
(
data
[
'DEFAULT'
],
{
'AREA_OR_POINT'
:
'Area'
})
self
.
assertEqual
(
data
[
'IMAGE_STRUCTURE'
],
{
'INTERLEAVE'
:
'BAND'
})
...
...
@@ -378,37 +371,36 @@ class GDALRasterTests(SimpleTestCase):
compressed
=
self
.
rs
.
warp
({
'papsz_options'
:
{
'compress'
:
'packbits'
},
'name'
:
rstfile
.
name
})
# Check physically if compression worked.
self
.
assertLess
(
os
.
path
.
getsize
(
compressed
.
name
),
os
.
path
.
getsize
(
self
.
rs
.
name
))
if
GDAL_VERSION
>
(
1
,
11
):
# Create file-based raster with options from scratch.
compressed
=
GDALRaster
({
'datatype'
:
1
,
'driver'
:
'tif'
,
'name'
:
rstfile
.
name
,
'width'
:
40
,
'height'
:
40
,
'srid'
:
3086
,
'origin'
:
(
500000
,
400000
),
'scale'
:
(
100
,
-
100
),
'skew'
:
(
0
,
0
),
'bands'
:
[{
'data'
:
range
(
40
^
2
),
'nodata_value'
:
255
,
}],
'papsz_options'
:
{
'compress'
:
'packbits'
,
'pixeltype'
:
'signedbyte'
,
'blockxsize'
:
23
,
'blockysize'
:
23
,
}
})
# Check if options used on creation are stored in metadata.
# Reopening the raster ensures that all metadata has been written
# to the file.
compressed
=
GDALRaster
(
compressed
.
name
)
self
.
assertEqual
(
compressed
.
metadata
[
'IMAGE_STRUCTURE'
][
'COMPRESSION'
],
'PACKBITS'
,)
self
.
assertEqual
(
compressed
.
bands
[
0
]
.
metadata
[
'IMAGE_STRUCTURE'
][
'PIXELTYPE'
],
'SIGNEDBYTE'
)
if
GDAL_VERSION
>=
(
2
,
1
):
self
.
assertIn
(
'Block=40x23'
,
compressed
.
info
)
# Create file-based raster with options from scratch.
compressed
=
GDALRaster
({
'datatype'
:
1
,
'driver'
:
'tif'
,
'name'
:
rstfile
.
name
,
'width'
:
40
,
'height'
:
40
,
'srid'
:
3086
,
'origin'
:
(
500000
,
400000
),
'scale'
:
(
100
,
-
100
),
'skew'
:
(
0
,
0
),
'bands'
:
[{
'data'
:
range
(
40
^
2
),
'nodata_value'
:
255
,
}],
'papsz_options'
:
{
'compress'
:
'packbits'
,
'pixeltype'
:
'signedbyte'
,
'blockxsize'
:
23
,
'blockysize'
:
23
,
}
})
# Check if options used on creation are stored in metadata.
# Reopening the raster ensures that all metadata has been written
# to the file.
compressed
=
GDALRaster
(
compressed
.
name
)
self
.
assertEqual
(
compressed
.
metadata
[
'IMAGE_STRUCTURE'
][
'COMPRESSION'
],
'PACKBITS'
,)
self
.
assertEqual
(
compressed
.
bands
[
0
]
.
metadata
[
'IMAGE_STRUCTURE'
][
'PIXELTYPE'
],
'SIGNEDBYTE'
)
if
GDAL_VERSION
>=
(
2
,
1
):
self
.
assertIn
(
'Block=40x23'
,
compressed
.
info
)
def
test_raster_warp
(
self
):
# Create in memory raster
...
...
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