Skip to content

Commit

Permalink
PR: Enhance gdal capabilities for complex datasets (squashed)
Browse files Browse the repository at this point in the history
This pull request creates a new metadata domain, called DERIVED_SUBDATASETS, for all datasets supported by gdal.

This new metadata domain reports derived subdatasets that actually are derived vrt raster band using some of the pixel functions from Valentino. Derived datasets are only exposed if there is at least one raster band, and only derived datasets that make sense are exposed (complex related ones are exposed only if there is at least one complex raster band). The used pixel functions where integrated in another pull request, that has been merged in this one (see OSGeo#141). All metadata, geotransform and projection reference are imported from the orginal dataset. For the sake of numerical precision, derived bands will have Float64 or CFloat64 precision.

Implementation details:

    - Reading of derived subdatasets are handled by a new dataset class (frtms/derived/deriveddataset.cpp)
    - Reporting the new metadata domain and its entries is done at gdaldataset class level, within GetMetaDataDomainList() and GetMetaData() methods,
    - Mapping between pixel functions and available derived dataset is done in a static array in frmts/dervied/derivedlist.c. Adding new derived datasets should be easy.

Here is an example on Sentinel1 dataset :

$ gdalinfo -nogcp -mdd DERIVED_SUBDATASETS s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
Driver: GTiff/GeoTIFF
Files: s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
Size is 17663, 31106
Coordinate System is `'
Metadata:
AREA_OR_POINT=Area
TIFFTAG_DATETIME=2015:06:20 01:52:30
TIFFTAG_IMAGEDESCRIPTION=Sentinel-1A SM SLC L1
TIFFTAG_SOFTWARE=Sentinel-1 IPF 002.45
Metadata (DERIVED_SUBDATASETS):
DERIVED_SUBDATASET_0_NAME=DERIVED_SUBDATASET:AMPLITUDE:s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
DERIVED_SUBDATASET_0_DESC=Amplitude of input bands from s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
DERIVED_SUBDATASET_1_NAME=DERIVED_SUBDATASET:PHASE:s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
DERIVED_SUBDATASET_1_DESC=Phase of input bands from s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
DERIVED_SUBDATASET_2_NAME=DERIVED_SUBDATASET:REAL:s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
DERIVED_SUBDATASET_2_DESC=Real part of input bands from s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
DERIVED_SUBDATASET_3_NAME=DERIVED_SUBDATASET:IMAG:s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
DERIVED_SUBDATASET_3_DESC=Imaginary part of input bands from s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
DERIVED_SUBDATASET_4_NAME=DERIVED_SUBDATASET:CONJ:s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
DERIVED_SUBDATASET_4_DESC=Conjugate of input bands from s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
DERIVED_SUBDATASET_5_NAME=DERIVED_SUBDATASET:INTENSITY:s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
DERIVED_SUBDATASET_5_DESC=Intensity (squared amplitude) of input bands from s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
DERIVED_SUBDATASET_6_NAME=DERIVED_SUBDATASET:LOGAMPLITUDE:s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
DERIVED_SUBDATASET_6_DESC=log10 of amplitude of input bands from s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0,31106.0)
Upper Right (17663.0, 0.0)
Lower Right (17663.0,31106.0)
Center ( 8831.5,15553.0)
Band 1 Block=17663x1 Type=CInt16, ColorInterp=Gray

And :

$ gdalinfo -nogcp DERIVED_SUBDATASET:AMPLITUDE:s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
Driver: COMPLEXDERIVED/Complex derived bands
Files: s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff
Size is 17663, 31106
Coordinate System is `'
Origin = (0.000000000000000,0.000000000000000)
Pixel Size = (1.000000000000000,1.000000000000000)
Metadata:
AREA_OR_POINT=Area
TIFFTAG_DATETIME=2015:06:20 01:52:30
TIFFTAG_IMAGEDESCRIPTION=Sentinel-1A SM SLC L1
TIFFTAG_SOFTWARE=Sentinel-1 IPF 002.45
Corner Coordinates:
Upper Left ( 0.0000000, 0.0000000)
Lower Left ( 0.000, 31106.000)
Upper Right ( 17663.000, 0.000)
Lower Right ( 17663.000, 31106.000)
Center ( 8831.500, 15553.000)
Band 1 Block=128x128 Type=Float64, ColorInterp=Undefined

Squashed commit of the following:

commit 6371674
Merge: acd8343 20b0f9d
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 13 09:08:37 2016 +0200

    Merge branch 'trunk' into enhance-complex-datasets-with-pf

commit acd8343
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 13 09:04:15 2016 +0200

    DOC: Moving DERIVED dataset entry at the correct location in supported formats table

commit bf03eed
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Jul 12 17:31:13 2016 +0200

    DOC: Adding documentation derived datasets

commit 1a9a5fa
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Jul 12 16:57:56 2016 +0200

    ENH: Remove last magic number

commit 3a8ff49
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Jul 12 15:44:21 2016 +0200

    TEST: Check expected checksum following modification of intensity function

commit 72f37d6
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Jul 12 15:44:02 2016 +0200

    TEST: Remove duplicate pixfun.py

commit eba1603
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Jul 12 15:09:53 2016 +0200

    COMP: Remove pixel function C file, as it has been renamed to .cpp

commit 5b785c4
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Jul 12 14:20:40 2016 +0200

    TEST: Fix remaining jp2openjpeg failing tests

commit 3fcc552
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Jul 12 14:20:24 2016 +0200

    ENH: Add the DERIVED_SUBDATASETS domain to the filtered domain in gdaljp2metadata

commit 5d922d9
Merge: 84afb22 d9ba836
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Jul 12 13:33:13 2016 +0200

    Merge branch 'trunk' into enhance-complex-datasets-with-pf

commit 84afb22
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Jul 12 12:17:44 2016 +0200

    TEST: Fixing tests failing because of new metadata domain DERIVED_SUBDATASETS

commit a897355
Merge: 8b7793e bf7b478
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Jul 12 10:45:45 2016 +0200

    Merge branch 'trunk' into enhance-complex-datasets-with-pf

commit 8b7793e
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Jul 8 15:43:59 2016 +0200

    BUG: Only report DERIVED metadata domain if there is at least one raster band

commit f6aaf6d
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Jul 8 15:05:56 2016 +0200

    BUG: Ensure that DERIVED mdd is not reported twice

commit d96cf59
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Jul 8 14:44:42 2016 +0200

    TEST: More complete tests, including geoTransform, Proj and Checksum tests (from PR review)

commit e1c072a
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Jul 8 14:44:14 2016 +0200

    BUG: We must also now the return type of the pixel function (for instance conj is CFloat64, but mod is Float64)

commit b0abc50
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Jul 8 14:23:11 2016 +0200

    BUG: Fix geotransform setting

commit 153e215
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Jul 8 13:48:45 2016 +0200

    TEST: Fix tests failing due to incorrect number of metadata domains

commit 17516f6
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Jul 8 13:42:14 2016 +0200

    TEST: Fix autotest for derived datasets

commit 2490c3d
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Jul 8 13:40:59 2016 +0200

    ENH: Better implementation of access to available subdatasets description

commit e7965e4
Merge: 57e607d 5c295ab
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Jul 8 12:13:01 2016 +0200

    MRG: Merge trunk into branch

commit 57e607d
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 17:15:44 2016 +0200

    ENH: Report correct block size (from PR review)

commit a65e6ef
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 17:12:40 2016 +0200

    ENH: Avoid exposing complex relevant derived datasets if there is not at least one complex raster band

commit 03ca1aa
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 16:58:35 2016 +0200

    COMP: Adding C wrapping stuff to make it compile

commit c32128a
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 16:25:33 2016 +0200

    ENH: Renamed cderived -> derived (as it is not limited to complex datasets)

commit a42afc2
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 16:20:05 2016 +0200

    ENH: Hide static const DerivedDatasetDescription asDDSDesc [] in a compiled file to avoid duplication in binaries (from PR review)

commit 44f6f4d
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 15:43:50 2016 +0200

    STY: papo -> o (from PR review)

commit 4713785
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 15:39:15 2016 +0200

    ENH: Replace magic number by appropriate definition (from PR review)

commit 842bff5
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 15:36:43 2016 +0200

    DOC: Fix copyright

commit 5742267
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 15:36:01 2016 +0200

    ENH: Remove unused code (from PR review)

commit 07a3c7e
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 15:35:06 2016 +0200

    STY: Fix if indentation (from PR review)

commit 27ab9f5
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 15:33:23 2016 +0200

    ENH: Clear debug traces (from PR review)

commit 96ff920
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 15:32:10 2016 +0200

    ENH: CPLStringList * -> CPLStringList (from PR review)

commit f014748
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 13:47:15 2016 +0200

    TEST: travis-ci failing due to python package imported but not used

commit afed253
Merge: db55680 e8cb1ae
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 12:08:30 2016 +0200

    Merge branch 'pixelfunctions-integration' into enhance-complex-datasets-with-pf

commit e8cb1ae
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 12:07:56 2016 +0200

    TEST: Fixing test failing due to bad indent

commit 0345b9e
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 11:45:29 2016 +0200

    COMP: Trying to fix travis-ci compilation error

commit db55680
Merge: 2162049 de301c3
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 11:40:23 2016 +0200

    Merge branch 'pixelfunctions-integration' into enhance-complex-datasets-with-pf

commit de301c3
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 11:39:52 2016 +0200

    TEST: Make numpy dependency optional (from PR review)

commit 2162049
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 11:29:19 2016 +0200

    TEST: Adding simple opening tests for cderived datasets

commit f1d0ab1
Merge: 7ff31aa 8783995
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 11:25:51 2016 +0200

    Merge branch 'pixelfunctions-integration' into enhance-complex-datasets-with-pf

commit 8783995
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 11:25:12 2016 +0200

    COMP: Fix include of gdal_vrt.h

commit 7ff31aa
Merge: 318ed3d 66e3388
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 11:07:38 2016 +0200

    Merge branch 'pixelfunctions-integration' into enhance-complex-datasets-with-pf

commit 66e3388
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 11:06:30 2016 +0200

    COMP: Add gdal_vrt.h include to get declaration of prototype for GDALRegisterDefaultPixelFunc

commit 318ed3d
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 11:02:41 2016 +0200

    COMP: Adding make file for windows

commit f7fbcc2
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 10:59:32 2016 +0200

    BUG: Use the correct pixel function

commit 97124fc
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 10:53:46 2016 +0200

    DOC: Add copyright notices

commit ec88c34
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 10:50:12 2016 +0200

    ENH: Support several types of derived datasets, all declared in one place

commit f264169
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 09:31:52 2016 +0200

    ENH: Remove hard-coded pixel function now that we have them within gdal

commit 07eae9f
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Jul 7 09:14:39 2016 +0200

    ENH: Add derived dataset to GDALmake.opt.in

commit c2e7853
Merge: dbd8187 0e14ea1
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 17:06:49 2016 +0200

    Merge branch 'pixelfunctions-integration' into enhance-complex-datasets-with-pf

commit 0e14ea1
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 17:03:40 2016 +0200

    COMP: Make pixelfunctions static, and solve link error

commit d9fd29b
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 16:44:23 2016 +0200

    DOC: Adding a section about default pixel functions in vrt tutorial (from PR review)

commit 5e40669
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 16:34:33 2016 +0200

    ENH: Update makefile.vc as well (from PR review)

commit 6f95e7d
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 16:32:51 2016 +0200

    ENH: Avoid ignoring c files (from PR review)

commit bf13853
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 16:28:49 2016 +0200

    ENH: Remove code that only makes sense as part of a plugin (from PR review)

commit f0f79ef
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 16:27:30 2016 +0200

    ENH: Removing useless files (from PR review)

commit dbd8187
Merge: a75faf5 a53f540
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 16:04:45 2016 +0200

    Merge branch 'pixelfunctions-integration' into enhance-complex-datasets-with-pf

commit a53f540
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 15:55:51 2016 +0200

    ENH: Register default pixel functions

commit 22c92a8
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 15:55:27 2016 +0200

    COMP: Add prototypes for all functions

commit 9d18110
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 15:55:00 2016 +0200

    COMP: Adding pixelfunction file for compilation

commit 8ffbb53
Merge: 22919bf 67373d6
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 15:43:56 2016 +0200

    Merge branch 'pixelfunctions-import' into pixelfunctions-integration

commit 67373d6
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 15:42:54 2016 +0200

    TEST: Removing those tests since they seem unrelated to the pixel functions

commit a75faf5
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 15:18:44 2016 +0200

    ENH: Remove useless trace

commit a5a8adb
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 15:12:09 2016 +0200

    ENH: Ensure that geotiff dataset calls base GetMetadata() and GetMetadataDomainList()

commit a7b6a89
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 15:11:30 2016 +0200

    ENH: Implement virtual GetMetadata() and GetMetadataDomainList() in GDALDataset

commit 94d8ecc
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 15:10:55 2016 +0200

    ENH: Minor fixes in derived dataset

commit de11bcd
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 11:53:56 2016 +0200

    Prepare for integration in Gdal

commit d384b9d
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Wed Jul 6 10:19:20 2016 +0200

    ENH: Report projectionRef, geoTransform and GCPs for derived subdatasets

commit 665d879
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Jul 5 13:00:25 2016 +0200

    ENH: Expose derived subdatasets in SetBand()

commit e277ccf
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Jul 4 16:16:33 2016 +0200

    ENH: Comments from review

commit a984a78
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Jul 4 14:25:11 2016 +0200

    ENH: Adding a complex derived dataset to allow for on-the-fly computation of amplitude while reading

commit ac7f70a
Author: Antonio Valentino <antonio.valentino@tiscali.it>
Date:   Mon Feb 1 23:48:59 2016 +0100

    Fix floating point trunation in mod function (closes OSGeogh-3)

commit 4668088
Author: Antonio Valentino <antonio.valentino@tiscali.it>
Date:   Tue Jun 23 22:34:00 2015 +0200

    Rename makecomplex into complex

commit 6648310
Merge: 4038d40 d7eaf5f
Author: Antonio Valentino <antonio.valentino@tiscali.it>
Date:   Tue Jun 23 22:25:01 2015 +0200

    Merge remote-tracking branch 'bopen/master'

commit d7eaf5f
Author: Alessandro Amici <alexamici@gmail.com>
Date:   Tue Jun 23 17:02:43 2015 +0200

    Add the MakeCompexPixelFunc that make a complex out of a real and imag bands

commit 4038d40
Author: Antonio Valentino <antonio.valentino@tiscali.it>
Date:   Sun Apr 13 12:39:30 2014 +0200

    Minor improvements

commit 01e325c
Author: Antonio Valentino <antonio.valentino@tiscali.it>
Date:   Sun Apr 13 12:39:07 2014 +0200

    Silence compiler warnings

commit 29f6bd3
Author: Antonio Valentino <antonio.valentino@tiscali.it>
Date:   Sun Apr 13 12:37:57 2014 +0200

    Remove unnecessary includes

commit 2cfd449
Author: Antonio Valentino <antonio.valentino@tiscali.it>
Date:   Sun Apr 13 12:36:38 2014 +0200

    Improved the README.txt file

commit cceed0b
Author: Antonio Valentino <antonio.valentino@tiscali.it>
Date:   Sun Apr 13 11:47:01 2014 +0200

    Initial commit
  • Loading branch information
jmichel-otb committed Jul 13, 2016
1 parent 4d47708 commit c4b6a9f
Show file tree
Hide file tree
Showing 48 changed files with 1,246 additions and 24 deletions.
25 changes: 13 additions & 12 deletions autotest/gcore/tiff_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,7 @@ def tiff_read_md1():
return 'fail'

metadata = ds.GetMetadataDomainList()
if len(metadata) != 5:
if len(metadata) != 6:
gdaltest.post_reason( 'did not get expected metadata list.' )
return 'fail'

Expand Down Expand Up @@ -1813,7 +1813,7 @@ def tiff_read_md2():
return 'fail'

metadata = ds.GetMetadataDomainList()
if len(metadata) != 5:
if len(metadata) != 6:
gdaltest.post_reason( 'did not get expected metadata list.' )
return 'fail'

Expand Down Expand Up @@ -1862,7 +1862,7 @@ def tiff_read_md3():
return 'fail'

metadata = ds.GetMetadataDomainList()
if len(metadata) != 5:
if len(metadata) != 6:
gdaltest.post_reason( 'did not get expected metadata list.' )
return 'fail'

Expand Down Expand Up @@ -1911,7 +1911,7 @@ def tiff_read_md4():
return 'fail'

metadata = ds.GetMetadataDomainList()
if len(metadata) != 5:
if len(metadata) != 6:
gdaltest.post_reason( 'did not get expected metadata list.' )
return 'fail'

Expand Down Expand Up @@ -1960,7 +1960,8 @@ def tiff_read_md5():
return 'fail'

metadata = ds.GetMetadataDomainList()
if len(metadata) != 4:
print metadata
if len(metadata) != 5:
gdaltest.post_reason( 'did not get expected metadata list.' )
return 'fail'

Expand Down Expand Up @@ -2009,7 +2010,7 @@ def tiff_read_md6():
return 'fail'

metadata = ds.GetMetadataDomainList()
if len(metadata) != 4:
if len(metadata) != 5:
gdaltest.post_reason( 'did not get expected metadata list.' )
return 'fail'

Expand Down Expand Up @@ -2058,7 +2059,7 @@ def tiff_read_md7():
return 'fail'

metadata = ds.GetMetadataDomainList()
if len(metadata) != 4:
if len(metadata) != 5:
gdaltest.post_reason( 'did not get expected metadata list.' )
return 'fail'

Expand Down Expand Up @@ -2107,7 +2108,7 @@ def tiff_read_md8():
return 'fail'

metadata = ds.GetMetadataDomainList()
if len(metadata) != 4:
if len(metadata) != 5:
gdaltest.post_reason( 'did not get expected metadata list.' )
return 'fail'

Expand Down Expand Up @@ -2156,7 +2157,7 @@ def tiff_read_md9():
return 'fail'

metadata = ds.GetMetadataDomainList()
if len(metadata) != 5:
if len(metadata) != 6:
gdaltest.post_reason( 'did not get expected metadata list.' )
return 'fail'

Expand Down Expand Up @@ -2202,7 +2203,7 @@ def tiff_read_md10():
return 'fail'

metadata = ds.GetMetadataDomainList()
if len(metadata) != 5:
if len(metadata) != 6:
gdaltest.post_reason( 'did not get expected metadata list.' )
return 'fail'

Expand Down Expand Up @@ -2251,7 +2252,7 @@ def tiff_read_md11():
return 'fail'

metadata = ds.GetMetadataDomainList()
if len(metadata) != 5:
if len(metadata) != 6:
gdaltest.post_reason( 'did not get expected metadata list.' )
return 'fail'

Expand Down Expand Up @@ -2295,7 +2296,7 @@ def tiff_read_md12():
return 'fail'

metadata = ds.GetMetadataDomainList()
if len(metadata) != 5:
if len(metadata) != 6:
gdaltest.post_reason( 'did not get expected metadata list.' )
return 'fail'

Expand Down
Binary file added autotest/gdrivers/data/cfloat64.tif
Binary file not shown.
Binary file added autotest/gdrivers/data/cint_sar.tif
Binary file not shown.
18 changes: 18 additions & 0 deletions autotest/gdrivers/data/pixfun_cmul_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="CFloat32" band="1" subClass="VRTDerivedRasterBand">
<Description>Product with complex conjugate</Description>
<PixelFunctionType>cmul</PixelFunctionType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
18 changes: 18 additions & 0 deletions autotest/gdrivers/data/pixfun_cmul_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float32" band="1" subClass="VRTDerivedRasterBand">
<Description>Product with complex conjugate</Description>
<PixelFunctionType>cmul</PixelFunctionType>
<SimpleSource>
<SourceFilename relativeToVRT="1">uint16.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">int32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
19 changes: 19 additions & 0 deletions autotest/gdrivers/data/pixfun_complex.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="CFloat32" band="1" subClass="VRTDerivedRasterBand">
<Description>Make complex</Description>
<PixelFunctionType>complex</PixelFunctionType>
<SourceTransferType>CFloat32</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">int32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">int32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_conj_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="CInt16" band="1" subClass="VRTDerivedRasterBand">
<Description>conjugate</Description>
<PixelFunctionType>conj</PixelFunctionType>
<SourceTransferType>CInt16</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_conj_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>conjugate</Description>
<PixelFunctionType>conj</PixelFunctionType>
<SourceTransferType>Int32</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">int32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_dB2amp.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>db to amplitude</Description>
<PixelFunctionType>dB2amp</PixelFunctionType>
<SourceTransferType>Float64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_dB2pow.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>dB to power</Description>
<PixelFunctionType>dB2pow</PixelFunctionType>
<SourceTransferType>Float64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
18 changes: 18 additions & 0 deletions autotest/gdrivers/data/pixfun_diff_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="CFloat32" band="1" subClass="VRTDerivedRasterBand">
<Description>Difference</Description>
<PixelFunctionType>diff</PixelFunctionType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">cfloat64.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
18 changes: 18 additions & 0 deletions autotest/gdrivers/data/pixfun_diff_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="Float32" band="1" subClass="VRTDerivedRasterBand">
<Description>Difference</Description>
<PixelFunctionType>diff</PixelFunctionType>
<SimpleSource>
<SourceFilename relativeToVRT="1">int32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="10" yOff="10" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_imag_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>Imaginary part</Description>
<PixelFunctionType>imag</PixelFunctionType>
<SourceTransferType>CFloat64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_imag_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float32" band="1" subClass="VRTDerivedRasterBand">
<Description>Imaginary part</Description>
<PixelFunctionType>imag</PixelFunctionType>
<SourceTransferType>Float32</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_intensity_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>Intensity</Description>
<PixelFunctionType>intensity</PixelFunctionType>
<SourceTransferType>CFloat64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_intensity_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float32" band="1" subClass="VRTDerivedRasterBand">
<Description>Intensity</Description>
<PixelFunctionType>intensity</PixelFunctionType>
<SourceTransferType>Float32</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_inv_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="CFloat64" band="1" subClass="VRTDerivedRasterBand">
<Description>Inverse</Description>
<PixelFunctionType>inv</PixelFunctionType>
<SourceTransferType>CFloat64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_inv_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>Inverse</Description>
<PixelFunctionType>inv</PixelFunctionType>
<SourceTransferType>Float64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_log10.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float32" band="1" subClass="VRTDerivedRasterBand">
<Description>Log10</Description>
<PixelFunctionType>log10</PixelFunctionType>
<SourceTransferType>Float32</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_mod_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="Float32" band="1" subClass="VRTDerivedRasterBand">
<Description>Magnitude</Description>
<PixelFunctionType>mod</PixelFunctionType>
<SourceTransferType>CFloat64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_mod_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="uint32" band="1" subClass="VRTDerivedRasterBand">
<Description>Magnitude</Description>
<PixelFunctionType>mod</PixelFunctionType>
<SourceTransferType>Int32</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">int32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
Loading

0 comments on commit c4b6a9f

Please sign in to comment.