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
4df3a3e0
Kaydet (Commit)
4df3a3e0
authored
Ara 01, 2014
tarafından
Daniel Wiesmann
Kaydeden (comit)
Claude Paroz
Ara 02, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added GDAL prototypes for raster support
Refs #23804.
üst
bba54534
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
2 deletions
+60
-2
AUTHORS
AUTHORS
+1
-0
generation.py
django/contrib/gis/gdal/prototypes/generation.py
+3
-2
raster.py
django/contrib/gis/gdal/prototypes/raster.py
+56
-0
No files found.
AUTHORS
Dosyayı görüntüle @
4df3a3e0
...
@@ -168,6 +168,7 @@ answer newbie questions, and generally made Django that much better:
...
@@ -168,6 +168,7 @@ answer newbie questions, and generally made Django that much better:
Daniel Poelzleithner <http://poelzi.org/>
Daniel Poelzleithner <http://poelzi.org/>
Daniel Pyrathon <pirosb3@gmail.com>
Daniel Pyrathon <pirosb3@gmail.com>
Daniel Roseman <http://roseman.org.uk/>
Daniel Roseman <http://roseman.org.uk/>
Daniel Wiesmann <daniel.wiesmann@gmail.com>
Danilo Bargen
Danilo Bargen
Dan Johnson <danj.py@gmail.com>
Dan Johnson <danj.py@gmail.com>
Dan Poirier <poirier@pobox.com>
Dan Poirier <poirier@pobox.com>
...
...
django/contrib/gis/gdal/prototypes/generation.py
Dosyayı görüntüle @
4df3a3e0
...
@@ -130,9 +130,10 @@ def void_output(func, argtypes, errcheck=True):
...
@@ -130,9 +130,10 @@ def void_output(func, argtypes, errcheck=True):
return
func
return
func
def
voidptr_output
(
func
,
argtypes
):
def
voidptr_output
(
func
,
argtypes
,
errcheck
=
True
):
"For functions that return c_void_p."
"For functions that return c_void_p."
func
.
argtypes
=
argtypes
func
.
argtypes
=
argtypes
func
.
restype
=
c_void_p
func
.
restype
=
c_void_p
func
.
errcheck
=
check_pointer
if
errcheck
:
func
.
errcheck
=
check_pointer
return
func
return
func
django/contrib/gis/gdal/prototypes/raster.py
0 → 100644
Dosyayı görüntüle @
4df3a3e0
"""
This module houses the ctypes function prototypes for GDAL DataSource (raster)
related data structures.
"""
from
ctypes
import
c_char_p
,
c_double
,
c_int
,
c_void_p
,
POINTER
from
django.contrib.gis.gdal.libgdal
import
lgdal
from
django.contrib.gis.gdal.prototypes.generation
import
(
const_string_output
,
double_output
,
int_output
,
void_output
,
voidptr_output
)
# For more detail about c function names and definitions see
# http://gdal.org/gdal_8h.html
# http://gdal.org/gdalwarper_8h.html
### Raster Driver Routines ###
register_all
=
void_output
(
lgdal
.
GDALAllRegister
,
[])
get_driver
=
voidptr_output
(
lgdal
.
GDALGetDriver
,
[
c_int
])
get_driver_by_name
=
voidptr_output
(
lgdal
.
GDALGetDriverByName
,
[
c_char_p
],
errcheck
=
False
)
get_driver_count
=
int_output
(
lgdal
.
GDALGetDriverCount
,
[])
get_driver_description
=
const_string_output
(
lgdal
.
GDALGetDescription
,
[
c_void_p
])
### Raster Data Source Routines ###
create_ds
=
voidptr_output
(
lgdal
.
GDALCreate
,
[
c_void_p
,
c_char_p
,
c_int
,
c_int
,
c_int
,
c_int
])
open_ds
=
voidptr_output
(
lgdal
.
GDALOpen
,
[
c_char_p
,
c_int
])
close_ds
=
void_output
(
lgdal
.
GDALClose
,
[
c_void_p
])
copy_ds
=
voidptr_output
(
lgdal
.
GDALCreateCopy
,
[
c_void_p
,
c_char_p
,
c_void_p
,
c_int
,
POINTER
(
c_char_p
),
c_void_p
,
c_void_p
])
add_band_ds
=
void_output
(
lgdal
.
GDALAddBand
,
[
c_void_p
,
c_int
])
get_ds_description
=
const_string_output
(
lgdal
.
GDALGetDescription
,
[])
get_ds_driver
=
voidptr_output
(
lgdal
.
GDALGetDatasetDriver
,
[
c_void_p
])
get_ds_xsize
=
int_output
(
lgdal
.
GDALGetRasterXSize
,
[
c_void_p
])
get_ds_ysize
=
int_output
(
lgdal
.
GDALGetRasterYSize
,
[
c_void_p
])
get_ds_raster_count
=
int_output
(
lgdal
.
GDALGetRasterCount
,
[
c_void_p
])
get_ds_raster_band
=
voidptr_output
(
lgdal
.
GDALGetRasterBand
,
[
c_void_p
,
c_int
])
get_ds_projection_ref
=
const_string_output
(
lgdal
.
GDALGetProjectionRef
,
[
c_void_p
])
set_ds_projection_ref
=
void_output
(
lgdal
.
GDALSetProjection
,
[
c_void_p
,
c_char_p
])
get_ds_geotransform
=
void_output
(
lgdal
.
GDALGetGeoTransform
,
[
c_void_p
,
POINTER
(
c_double
*
6
)],
errcheck
=
False
)
set_ds_geotransform
=
void_output
(
lgdal
.
GDALSetGeoTransform
,
[
c_void_p
,
POINTER
(
c_double
*
6
)])
### Raster Band Routines ###
band_io
=
void_output
(
lgdal
.
GDALRasterIO
,
[
c_void_p
,
c_int
,
c_int
,
c_int
,
c_int
,
c_int
,
c_void_p
,
c_int
,
c_int
,
c_int
,
c_int
,
c_int
])
get_band_xsize
=
int_output
(
lgdal
.
GDALGetRasterBandXSize
,
[
c_void_p
])
get_band_ysize
=
int_output
(
lgdal
.
GDALGetRasterBandYSize
,
[
c_void_p
])
get_band_index
=
int_output
(
lgdal
.
GDALGetBandNumber
,
[
c_void_p
])
get_band_description
=
const_string_output
(
lgdal
.
GDALGetDescription
,
[
c_void_p
])
get_band_ds
=
voidptr_output
(
lgdal
.
GDALGetBandDataset
,
[
c_void_p
])
get_band_datatype
=
int_output
(
lgdal
.
GDALGetRasterDataType
,
[
c_void_p
])
get_band_nodata_value
=
double_output
(
lgdal
.
GDALGetRasterNoDataValue
,
[
c_void_p
,
POINTER
(
c_int
)])
set_band_nodata_value
=
void_output
(
lgdal
.
GDALSetRasterNoDataValue
,
[
c_void_p
,
c_double
])
get_band_minimum
=
double_output
(
lgdal
.
GDALGetRasterMinimum
,
[
c_void_p
])
get_band_maximum
=
double_output
(
lgdal
.
GDALGetRasterMaximum
,
[
c_void_p
])
### Reprojection routine ###
reproject_image
=
void_output
(
lgdal
.
GDALReprojectImage
,
[
c_void_p
,
c_char_p
,
c_void_p
,
c_char_p
,
c_int
,
c_double
,
c_double
,
c_void_p
,
c_void_p
,
c_void_p
])
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