forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Hide static const DerivedDatasetDescription asDDSDesc [] in a co…
…mpiled file to avoid duplication in binaries (from PR review)
- Loading branch information
1 parent
44f6f4d
commit a42afc2
Showing
6 changed files
with
76 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/****************************************************************************** | ||
* | ||
* Project: GDAL | ||
* Purpose: Implementation of derived subdatasets | ||
* Author: Julien Michel <julien dot michel at cnes dot fr> | ||
* | ||
****************************************************************************** | ||
* Copyright (c) 2016 Julien Michel <julien dot michel at cnes dot fr> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a | ||
* copy of this software and associated documentation files (the "Software"), | ||
* to deal in the Software without restriction, including without limitation | ||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
* and/or sell copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included | ||
* in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
* DEALINGS IN THE SOFTWARE. | ||
*****************************************************************************/ | ||
#include "derivedlist.h" | ||
#include "gdal.h" | ||
|
||
static const DerivedDatasetDescription asDDSDesc [] = | ||
{ | ||
{ "AMPLITUDE", "Amplitude of input bands", "mod"}, | ||
{ "PHASE", "Phase of input bands", "phase"}, | ||
{ "REAL", "Real part of input bands", "real"}, | ||
{ "IMAG", "Imaginary part of input bands", "imag"}, | ||
{ "CONJ", "Conjugate of input bands", "conj"}, | ||
{ "INTENSITY", "Intensity (squared amplitude) of input bands", "intensity"}, | ||
{ "LOGAMPLITUDE", "log10 of amplitude of input bands", "log10"} | ||
}; | ||
|
||
#define NB_DERIVED_DATASETS (sizeof(asDDSDesc)/sizeof(asDDSDesc[0])) | ||
|
||
const DerivedDatasetDescription* GDALGetDerivedDatasetDescription(const unsigned int * pnDescriptionCount) | ||
{ | ||
if(*pnDescriptionCount < (int)NB_DERIVED_DATASETS) | ||
{ | ||
return &asDDSDesc[*pnDescriptionCount]; | ||
} | ||
return NULL; | ||
} | ||
|
||
unsigned int GDALGetNumberOfDerivedDatasetDecriptions(void) | ||
{ | ||
return (unsigned int)NB_DERIVED_DATASETS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
OBJ = cderiveddataset.obj | ||
OBJ = cderiveddataset.obj derivedlist.obj | ||
|
||
GDAL_ROOT = ..\.. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters