eoxserver.processing.gdal package¶
Submodules¶
eoxserver.processing.gdal.reftools module¶
- class eoxserver.processing.gdal.reftools.GCP¶
Bases:
Structure
- dfGCPLine¶
Structure/Union member
- dfGCPPixel¶
Structure/Union member
- dfGCPX¶
Structure/Union member
- dfGCPY¶
Structure/Union member
- dfGCPZ¶
Structure/Union member
- pszId¶
Structure/Union member
- pszInfo¶
Structure/Union member
- class eoxserver.processing.gdal.reftools.WARP_OPTIONS¶
Bases:
Structure
- dfCutlineBlendDist¶
Structure/Union member
- dfWarpMemoryLimit¶
Structure/Union member
- eResampleAlg¶
Structure/Union member
- eWorkingDataType¶
Structure/Union member
- hCutline¶
Structure/Union member
- hDstDS¶
Structure/Union member
- hSrcDS¶
Structure/Union member
- nBandCount¶
Structure/Union member
- nDstAlphaBand¶
Structure/Union member
- nSrcAlphaBand¶
Structure/Union member
- pDstDensityMaskFuncArg¶
Structure/Union member
- pDstValidityMaskFuncArg¶
Structure/Union member
- pPostWarpProcessorArg¶
Structure/Union member
- pPreWarpProcessorArg¶
Structure/Union member
- pProgressArg¶
Structure/Union member
- pSrcDensityMaskFuncArg¶
Structure/Union member
- pSrcValidityMaskFuncArg¶
Structure/Union member
- pTransformerArg¶
Structure/Union member
- padfDstNoDataImag¶
Structure/Union member
- padfDstNoDataReal¶
Structure/Union member
- padfSrcNoDataImag¶
Structure/Union member
- padfSrcNoDataReal¶
Structure/Union member
- panDstBands¶
Structure/Union member
- panSrcBands¶
Structure/Union member
- papSrcPerBandValidityMaskFuncArg¶
Structure/Union member
- papfnSrcPerBandValidityMaskFunc¶
Structure/Union member
- papszWarpOptions¶
Structure/Union member
- pfnDstDensityMaskFunc¶
Structure/Union member
- pfnDstValidityMaskFunc¶
Structure/Union member
- pfnPostWarpChunkProcessor¶
Structure/Union member
- pfnPreWarpChunkProcessor¶
Structure/Union member
- pfnProgress¶
Structure/Union member
- pfnSrcDensityMaskFunc¶
Structure/Union member
- pfnSrcValidityMaskFunc¶
Structure/Union member
- pfnTransformer¶
Structure/Union member
- eoxserver.processing.gdal.reftools.create_rectified_vrt(path_or_ds, vrt_path, srid_or_wkt=None, resample=0, memory_limit=0.0, max_error=0.125, method=1, order=0, size=None, resolution=None)¶
Creates a VRT dataset that symbolizes a rectified version of the passed “referenceable” GDAL dataset.
- Parameters:
path_or_ds – a
GDAL Dataset
or a path to suchvrt_path – the path to store the VRT dataset under
resample – the resample method to be used; defaults to 0 which means a nearest neighbour resampling
memory_limit – the memory limit; by default no limit is used
max_error – the maximum allowed error
method – either of
METHOD_GCP
,METHOD_TPS
orMETHOD_TPS_LSQ
.order – the order of the function; see
get_footprint_wkt()
for reference
- eoxserver.processing.gdal.reftools.get_footprint_wkt(ds, method=1, order=0)¶
Returns the footprint of the GDAL Dataset using its GCPs for calculation.
- Parameters:
method – either of
METHOD_GCP
,METHOD_TPS
orMETHOD_TPS_LSQ
.order –
(method specific):
- GCP (order of global fitting polynomial)
0
for automatic order1
,2
, and3
for 1st, 2nd and 3rd polynomialorder
- TPS and TPS_LSQ (order of augmenting polynomial)
-1
for no-polynomial augmentation0
for 0th order (constant offset)1
,2
, and3
for 1st, 2nd and 3rd polynomial order
General guide:
method TPS, order 3 should work in most cases
method TPS_LSQ, order 3 should work in cases of an excessive number of tiepoints but it may become wobbly for small number of tiepoints
The global polynomial (GCP) interpolation does not work well for images covering large geographic areas (e.g., ENVISAT ASAR and MERIS).
Note
The default parameters are left for backward compatibility. They can be, however, often inappropriate!
- eoxserver.processing.gdal.reftools.is_extended()¶
check whether the EOX’s GDAL extensions are available (True) or not (False)
- eoxserver.processing.gdal.reftools.rect_from_subset(path_or_ds, srid, minx, miny, maxx, maxy, method=1, order=0)¶
Returns the smallest area of an image for the given spatial subset.
- Parameters:
path_or_ds – a
GDAL Dataset
or a path to suchsrid – the SRID the
minx
,miny
,maxx
andmaxy
are expressed inminx – the minimum X subset coordinate
miny – the minimum Y subset coordinate
maxx – the maximum X subset coordinate
maxy – the maximum Y subset coordinate
method – either of
METHOD_GCP
,METHOD_TPS
orMETHOD_TPS_LSQ
.order – the order of the function; see
get_footprint_wkt()
for reference
- Returns:
a
Rect
portraing the subset in image coordinates
- eoxserver.processing.gdal.reftools.reproject_image(src_ds, src_wkt, dst_ds, dst_wkt, resample=0, memory_limit=0.0, max_error=0.125, method=1, order=0)¶
Transforms the source dataset to the destination dataset.
- Parameters:
src_ds – the source
GDAL Dataset
src_wkt – override the source projection in WKT notation
dst_ds – the source
GDAL Dataset
dst_wkt – override the destination projection in WKT notation
resample – the resample method to be used; defaults to 0 which means a nearest neighbour resampling
memory_limit – the memory limit; by default no limit is used
max_error – the maximum allowed error
method – either of
METHOD_GCP
,METHOD_TPS
orMETHOD_TPS_LSQ
.order – the order of the function; see
get_footprint_wkt()
for reference
- eoxserver.processing.gdal.reftools.suggest_transformer(path_or_ds)¶
suggest value of method and order to be passed to
get_footprint_wkt
andrect_from_subset
- Parameters:
path_or_ds – a
GDAL Dataset
or a path to such.- Returns:
a
dict
containing the keysmethod
andorder
- eoxserver.processing.gdal.reftools.suggested_warp_output(ds, src_wkt, dst_wkt, method=1, order=0)¶
Returns the suggested size and geotransform tuple for the given dataset.
- Parameters:
ds – a
GDAL Dataset
src_wkt – override the source WKT notation of the transform
dst_wkt – the destination projection in WKT notation
method – either of
METHOD_GCP
,METHOD_TPS
orMETHOD_TPS_LSQ
.order – the order of the function; see
get_footprint_wkt()
for reference
- Returns:
the X size of the suggested warped image
- Returns:
the Y size of the suggested warped image
- Returns:
the geotransform tuple of the suggested warped image
eoxserver.processing.gdal.vrt module¶
- eoxserver.processing.gdal.vrt.create_simple_vrt(ds, vrt_filename)¶