| 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Project: Raster Matrix Format |
| 4 | * Purpose: Private class declarations for the RMF classes used to read/write |
| 5 | * GIS "Integratsia" raster files (also known as "Panorama" GIS). |
| 6 | * Author: Andrey Kiselev, [email protected] |
| 7 | * |
| 8 | ****************************************************************************** |
| 9 | * Copyright (c) 2007, Andrey Kiselev <[email protected]> |
| 10 | * Copyright (c) 2023, NextGIS <[email protected]> |
| 11 | * |
| 12 | * SPDX-License-Identifier: MIT |
| 13 | ****************************************************************************/ |
| 14 | |
| 15 | #ifndef RMFDATASET_H_INCLUDED |
| 16 | #define RMFDATASET_H_INCLUDEDcxx . . $ `frmts/rmf/rmfdataset.h:16:9`! |
| 17 | |
| 18 | #include <array> |
| 19 | #include <list> |
| 20 | #include "gdal_priv.h"cxx . . $ `<file>/gcore/gdal_priv.h`/ |
| 21 | #include "cpl_worker_thread_pool.h"cxx . . $ `<file>/port/cpl_worker_thread_pool.h`/ |
| 22 | |
| 23 | #define RMF_HEADER_SIZEcxx . . $ `frmts/rmf/rmfdataset.h:23:9`! 320 |
| 24 | #define RMF_EXT_HEADER_SIZEcxx . . $ `frmts/rmf/rmfdataset.h:24:9`! 320 |
| 25 | #define RMF_MIN_EXT_HEADER_SIZEcxx . . $ `frmts/rmf/rmfdataset.h:25:9`! (36 + 4) |
| 26 | #define RMF_MAX_EXT_HEADER_SIZEcxx . . $ `frmts/rmf/rmfdataset.h:26:9`! 1000000 |
| 27 | |
| 28 | #define RMF_COMPRESSION_NONEcxx . . $ `frmts/rmf/rmfdataset.h:28:9`! 0 |
| 29 | #define RMF_COMPRESSION_LZWcxx . . $ `frmts/rmf/rmfdataset.h:29:9`! 1 |
| 30 | #define RMF_COMPRESSION_JPEGcxx . . $ `frmts/rmf/rmfdataset.h:30:9`! 2 |
| 31 | #define RMF_COMPRESSION_DEMcxx . . $ `frmts/rmf/rmfdataset.h:31:9`! 32 |
| 32 | |
| 33 | enum RMFTypecxx . . $ RMFType# |
| 34 | { |
| 35 | RMFT_RSWcxx . . $ RMFT_RSW., // Raster map |
| 36 | RMFT_MTWcxx . . $ RMFT_MTW. // Digital elevation model |
| 37 | }; |
| 38 | |
| 39 | enum RMFVersioncxx . . $ RMFVersion# |
| 40 | { |
| 41 | RMF_VERSIONcxx . . $ RMF_VERSION. = 0x0200, // Version for "small" files less than 4 Gb |
| 42 | RMF_VERSION_HUGEcxx . . $ RMF_VERSION_HUGE. = 0x0201 // Version for "huge" files less than 4 Tb. Since |
| 43 | // GIS Panorama v11 |
| 44 | }; |
| 45 | |
| 46 | class RMFDatasetcxx . . $ RMFDataset#; |
| 47 | |
| 48 | #define RMF_HUGE_OFFSET_FACTORcxx . . $ `frmts/rmf/rmfdataset.h:48:9`! 256 |
| 49 | |
| 50 | constexpr int RMF_JPEG_BAND_COUNTcxx . . $ RMF_JPEG_BAND_COUNT. = 3; |
| 51 | constexpr int RMF_DEM_BAND_COUNTcxx . . $ RMF_DEM_BAND_COUNT. = 1; |
| 52 | |
| 53 | /************************************************************************/ |
| 54 | /* RMFHeader */ |
| 55 | /************************************************************************/ |
| 56 | |
| 57 | typedef structcxx . . $ $anonymous_type_7130a07a6637b322_0# |
| 58 | { |
| 59 | #define RMF_SIGNATURE_SIZEcxx . . $ `frmts/rmf/rmfdataset.h:59:9`! 4 |
| 60 | char bySignaturecxx . . $ $anonymous_type_7130a07a6637b322_0#bySignature.[RMF_SIGNATURE_SIZEcxx . . $ `frmts/rmf/rmfdataset.h:59:9`!]; // "RSW" for raster |
| 61 | // map or "MTW" for DEM |
| 62 | GUInt32cxx . . $ GUInt32# iVersioncxx . . $ $anonymous_type_7130a07a6637b322_0#iVersion.; |
| 63 | GUInt32cxx . . $ GUInt32# nSizecxx . . $ $anonymous_type_7130a07a6637b322_0#nSize.; // File size in bytes |
| 64 | GUInt32cxx . . $ GUInt32# nOvrOffsetcxx . . $ $anonymous_type_7130a07a6637b322_0#nOvrOffset.; // Offset to overview |
| 65 | GUInt32cxx . . $ GUInt32# iUserIDcxx . . $ $anonymous_type_7130a07a6637b322_0#iUserID.; |
| 66 | #define RMF_NAME_SIZEcxx . . $ `frmts/rmf/rmfdataset.h:66:9`! 32 |
| 67 | GBytecxx . . $ GByte# byNamecxx . . $ $anonymous_type_7130a07a6637b322_0#byName.[RMF_NAME_SIZEcxx . . $ `frmts/rmf/rmfdataset.h:66:9`!]; |
| 68 | GUInt32cxx . . $ GUInt32# nBitDepthcxx . . $ $anonymous_type_7130a07a6637b322_0#nBitDepth.; // Number of bits per pixel |
| 69 | GUInt32cxx . . $ GUInt32# nHeightcxx . . $ $anonymous_type_7130a07a6637b322_0#nHeight.; // Image length |
| 70 | GUInt32cxx . . $ GUInt32# nWidthcxx . . $ $anonymous_type_7130a07a6637b322_0#nWidth.; // Image width |
| 71 | GUInt32cxx . . $ GUInt32# nXTilescxx . . $ $anonymous_type_7130a07a6637b322_0#nXTiles.; // Number of tiles in line |
| 72 | GUInt32cxx . . $ GUInt32# nYTilescxx . . $ $anonymous_type_7130a07a6637b322_0#nYTiles.; // Number of tiles in column |
| 73 | GUInt32cxx . . $ GUInt32# nTileHeightcxx . . $ $anonymous_type_7130a07a6637b322_0#nTileHeight.; |
| 74 | GUInt32cxx . . $ GUInt32# nTileWidthcxx . . $ $anonymous_type_7130a07a6637b322_0#nTileWidth.; |
| 75 | GUInt32cxx . . $ GUInt32# nLastTileHeightcxx . . $ $anonymous_type_7130a07a6637b322_0#nLastTileHeight.; |
| 76 | GUInt32cxx . . $ GUInt32# nLastTileWidthcxx . . $ $anonymous_type_7130a07a6637b322_0#nLastTileWidth.; |
| 77 | GUInt32cxx . . $ GUInt32# nROIOffsetcxx . . $ $anonymous_type_7130a07a6637b322_0#nROIOffset.; |
| 78 | GUInt32cxx . . $ GUInt32# nROISizecxx . . $ $anonymous_type_7130a07a6637b322_0#nROISize.; |
| 79 | GUInt32cxx . . $ GUInt32# nClrTblOffsetcxx . . $ $anonymous_type_7130a07a6637b322_0#nClrTblOffset.; // Position and size |
| 80 | GUInt32cxx . . $ GUInt32# nClrTblSizecxx . . $ $anonymous_type_7130a07a6637b322_0#nClrTblSize.; // of the colour table |
| 81 | GUInt32cxx . . $ GUInt32# nTileTblOffsetcxx . . $ $anonymous_type_7130a07a6637b322_0#nTileTblOffset.; // Position and size of the |
| 82 | GUInt32cxx . . $ GUInt32# nTileTblSizecxx . . $ $anonymous_type_7130a07a6637b322_0#nTileTblSize.; // tile offsets/sizes table |
| 83 | GInt32cxx . . $ GInt32# iMapTypecxx . . $ $anonymous_type_7130a07a6637b322_0#iMapType.; |
| 84 | GInt32cxx . . $ GInt32# iProjectioncxx . . $ $anonymous_type_7130a07a6637b322_0#iProjection.; |
| 85 | GInt32cxx . . $ GInt32# iEPSGCodecxx . . $ $anonymous_type_7130a07a6637b322_0#iEPSGCode.; |
| 86 | double dfScalecxx . . $ $anonymous_type_7130a07a6637b322_0#dfScale.; |
| 87 | double dfResolutioncxx . . $ $anonymous_type_7130a07a6637b322_0#dfResolution.; |
| 88 | double dfPixelSizecxx . . $ $anonymous_type_7130a07a6637b322_0#dfPixelSize.; |
| 89 | double dfLLXcxx . . $ $anonymous_type_7130a07a6637b322_0#dfLLX.; |
| 90 | double dfLLYcxx . . $ $anonymous_type_7130a07a6637b322_0#dfLLY.; |
| 91 | double dfStdP1cxx . . $ $anonymous_type_7130a07a6637b322_0#dfStdP1.; |
| 92 | double dfStdP2cxx . . $ $anonymous_type_7130a07a6637b322_0#dfStdP2.; |
| 93 | double dfCenterLongcxx . . $ $anonymous_type_7130a07a6637b322_0#dfCenterLong.; |
| 94 | double dfCenterLatcxx . . $ $anonymous_type_7130a07a6637b322_0#dfCenterLat.; |
| 95 | GBytecxx . . $ GByte# iCompressioncxx . . $ $anonymous_type_7130a07a6637b322_0#iCompression.; |
| 96 | GBytecxx . . $ GByte# iMaskTypecxx . . $ $anonymous_type_7130a07a6637b322_0#iMaskType.; |
| 97 | GBytecxx . . $ GByte# iMaskStepcxx . . $ $anonymous_type_7130a07a6637b322_0#iMaskStep.; |
| 98 | GBytecxx . . $ GByte# iFrameFlagcxx . . $ $anonymous_type_7130a07a6637b322_0#iFrameFlag.; |
| 99 | GUInt32cxx . . $ GUInt32# nFlagsTblOffsetcxx . . $ $anonymous_type_7130a07a6637b322_0#nFlagsTblOffset.; |
| 100 | GUInt32cxx . . $ GUInt32# nFlagsTblSizecxx . . $ $anonymous_type_7130a07a6637b322_0#nFlagsTblSize.; |
| 101 | GUInt32cxx . . $ GUInt32# nFileSize0cxx . . $ $anonymous_type_7130a07a6637b322_0#nFileSize0.; |
| 102 | GUInt32cxx . . $ GUInt32# nFileSize1cxx . . $ $anonymous_type_7130a07a6637b322_0#nFileSize1.; |
| 103 | GBytecxx . . $ GByte# iUnknowncxx . . $ $anonymous_type_7130a07a6637b322_0#iUnknown.; |
| 104 | GBytecxx . . $ GByte# iGeorefFlagcxx . . $ $anonymous_type_7130a07a6637b322_0#iGeorefFlag.; |
| 105 | GBytecxx . . $ GByte# iInversecxx . . $ $anonymous_type_7130a07a6637b322_0#iInverse.; |
| 106 | GBytecxx . . $ GByte# iJpegQualitycxx . . $ $anonymous_type_7130a07a6637b322_0#iJpegQuality.; |
| 107 | #define RMF_INVISIBLE_COLORS_SIZEcxx . . $ `frmts/rmf/rmfdataset.h:107:9`! 32 |
| 108 | GBytecxx . . $ GByte# abyInvisibleColorscxx . . $ $anonymous_type_7130a07a6637b322_0#abyInvisibleColors.[RMF_INVISIBLE_COLORS_SIZEcxx . . $ `frmts/rmf/rmfdataset.h:107:9`!]; |
| 109 | double adfElevMinMaxcxx . . $ $anonymous_type_7130a07a6637b322_0#adfElevMinMax.[2]; |
| 110 | double dfNoDatacxx . . $ $anonymous_type_7130a07a6637b322_0#dfNoData.; |
| 111 | GUInt32cxx . . $ GUInt32# iElevationUnitcxx . . $ $anonymous_type_7130a07a6637b322_0#iElevationUnit.; |
| 112 | GBytecxx . . $ GByte# iElevationTypecxx . . $ $anonymous_type_7130a07a6637b322_0#iElevationType.; |
| 113 | GUInt32cxx . . $ GUInt32# nExtHdrOffsetcxx . . $ $anonymous_type_7130a07a6637b322_0#nExtHdrOffset.; |
| 114 | GUInt32cxx . . $ GUInt32# nExtHdrSizecxx . . $ $anonymous_type_7130a07a6637b322_0#nExtHdrSize.; |
| 115 | } RMFHeadercxx . . $ RMFHeader#; |
| 116 | |
| 117 | /************************************************************************/ |
| 118 | /* RMFExtHeader */ |
| 119 | /************************************************************************/ |
| 120 | |
| 121 | typedef structcxx . . $ $anonymous_type_7130a07a6637b322_1# |
| 122 | { |
| 123 | GInt32cxx . . $ GInt32# nEllipsoidcxx . . $ $anonymous_type_7130a07a6637b322_1#nEllipsoid.; |
| 124 | GInt32cxx . . $ GInt32# nVertDatumcxx . . $ $anonymous_type_7130a07a6637b322_1#nVertDatum.; |
| 125 | GInt32cxx . . $ GInt32# nDatumcxx . . $ $anonymous_type_7130a07a6637b322_1#nDatum.; |
| 126 | GInt32cxx . . $ GInt32# nZonecxx . . $ $anonymous_type_7130a07a6637b322_1#nZone.; |
| 127 | } RMFExtHeadercxx . . $ RMFExtHeader#; |
| 128 | |
| 129 | /************************************************************************/ |
| 130 | /* RSWFrame */ |
| 131 | /************************************************************************/ |
| 132 | |
| 133 | typedef structcxx . . $ $anonymous_type_7130a07a6637b322_2# |
| 134 | { |
| 135 | GInt32cxx . . $ GInt32# nTypecxx . . $ $anonymous_type_7130a07a6637b322_2#nType.; |
| 136 | GInt32cxx . . $ GInt32# nSizecxx . . $ $anonymous_type_7130a07a6637b322_2#nSize.; |
| 137 | GInt32cxx . . $ GInt32# nSubCountcxx . . $ $anonymous_type_7130a07a6637b322_2#nSubCount.; |
| 138 | GInt32cxx . . $ GInt32# nCoordsSizecxx . . $ $anonymous_type_7130a07a6637b322_2#nCoordsSize.; |
| 139 | } RSWFramecxx . . $ RSWFrame#; |
| 140 | |
| 141 | typedef structcxx . . $ $anonymous_type_7130a07a6637b322_3# |
| 142 | { |
| 143 | GInt32cxx . . $ GInt32# nXcxx . . $ $anonymous_type_7130a07a6637b322_3#nX., nYcxx . . $ $anonymous_type_7130a07a6637b322_3#nY.; |
| 144 | } RSWFrameCoordcxx . . $ RSWFrameCoord#; |
| 145 | |
| 146 | /************************************************************************/ |
| 147 | /* RMFCompressionJob */ |
| 148 | /************************************************************************/ |
| 149 | |
| 150 | struct RMFCompressionJobcxx . . $ RMFCompressionJob# |
| 151 | { |
| 152 | RMFDatasetcxx . . $ RMFDataset# *poDScxx . . $ RMFCompressionJob#poDS. = nullptr; |
| 153 | CPLErr eResultcxx . . $ RMFCompressionJob#eResult. = CE_None; |
| 154 | int nBlockXOffcxx . . $ RMFCompressionJob#nBlockXOff. = -1; |
| 155 | int nBlockYOffcxx . . $ RMFCompressionJob#nBlockYOff. = -1; |
| 156 | GBytecxx . . $ GByte# *pabyUncompressedDatacxx . . $ RMFCompressionJob#pabyUncompressedData. = nullptr; |
| 157 | size_t nUncompressedBytescxx . . $ RMFCompressionJob#nUncompressedBytes. = 0; |
| 158 | GBytecxx . . $ GByte# *pabyCompressedDatacxx . . $ RMFCompressionJob#pabyCompressedData. = nullptr; |
| 159 | size_t nCompressedBytescxx . . $ RMFCompressionJob#nCompressedBytes. = 0; |
| 160 | GUInt32cxx . . $ GUInt32# nXSizecxx . . $ RMFCompressionJob#nXSize. = 0; |
| 161 | GUInt32cxx . . $ GUInt32# nYSizecxx . . $ RMFCompressionJob#nYSize. = 0; |
| 162 | |
| 163 | RMFCompressionJobcxx . . $ RMFCompressionJob#RMFCompressionJob(ced63f7c635d850d).() = default; |
| 164 | RMFCompressionJobcxx . . $ RMFCompressionJob#RMFCompressionJob(3bd2f3c30afda1d3).(const RMFCompressionJobcxx . . $ RMFCompressionJob# &) = delete; |
| 165 | RMFCompressionJobcxx . . $ RMFCompressionJob# &operatorcxx . . $ RMFCompressionJob#`operator=`(cceb31ffec3de1be).=(const RMFCompressionJobcxx . . $ RMFCompressionJob# &) = delete; |
| 166 | RMFCompressionJobcxx . . $ RMFCompressionJob#RMFCompressionJob(61245710036f01f0).(RMFCompressionJobcxx . . $ RMFCompressionJob# &&) = default; |
| 167 | RMFCompressionJobcxx . . $ RMFCompressionJob# &operatorcxx . . $ RMFCompressionJob#`operator=`(df890dfd4a07ee79).=(RMFCompressionJobcxx . . $ RMFCompressionJob# &&) = default; |
| 168 | }; |
| 169 | |
| 170 | /************************************************************************/ |
| 171 | /* RMFCompressData */ |
| 172 | /************************************************************************/ |
| 173 | |
| 174 | struct RMFCompressDatacxx . . $ RMFCompressData# |
| 175 | { |
| 176 | CPLWorkerThreadPoolcxx . . $ CPLWorkerThreadPool# oThreadPoolcxx . . $ RMFCompressData#oThreadPool.{cxx . . $ CPLWorkerThreadPool#CPLWorkerThreadPool(49f6e7a06ebc5aa8).}; |
| 177 | stdcxx . . $ std/::vector<RMFCompressionJobcxx . . $ RMFCompressionJob#> asJobscxx . . $ RMFCompressData#asJobs.{}; |
| 178 | stdcxx . . $ std/::listcxx . . $ std/__cxx11/list#<RMFCompressionJobcxx . . $ RMFCompressionJob# *> asReadyJobscxx . . $ RMFCompressData#asReadyJobs.{cxx . . $ std/__cxx11/list#list(49f6e7a06ebc5aa8).}; |
| 179 | GBytecxx . . $ GByte# *pabyBufferscxx . . $ RMFCompressData#pabyBuffers. = nullptr; |
| 180 | CPLMutexcxx . . $ CPLMutex# *hReadyJobMutexcxx . . $ RMFCompressData#hReadyJobMutex. = nullptr; |
| 181 | CPLMutexcxx . . $ CPLMutex# *hWriteTileMutexcxx . . $ RMFCompressData#hWriteTileMutex. = nullptr; |
| 182 | |
| 183 | RMFCompressDatacxx . . $ RMFCompressData#RMFCompressData(68b506ee960c6682).(const RMFCompressDatacxx . . $ RMFCompressData# &) = delete; |
| 184 | RMFCompressDatacxx . . $ RMFCompressData# &operatorcxx . . $ RMFCompressData#`operator=`(b9560a8d1882282f).=(const RMFCompressDatacxx . . $ RMFCompressData# &) = delete; |
| 185 | |
| 186 | RMFCompressDatacxx . . $ RMFCompressData#RMFCompressData(49f6e7a06ebc5aa8).(); |
| 187 | ~cxx . . $ RMFCompressData#`~RMFCompressData`(49f6e7a06ebc5aa8).RMFCompressDatacxx . . $ RMFCompressData#(); |
| 188 | }; |
| 189 | |
| 190 | /************************************************************************/ |
| 191 | /* RMFTileData */ |
| 192 | /************************************************************************/ |
| 193 | |
| 194 | struct RMFTileDatacxx . . $ RMFTileData# |
| 195 | { |
| 196 | stdcxx . . $ std/::vector<GBytecxx . . $ GByte#> oDatacxx . . $ RMFTileData#oData.{}; |
| 197 | int nBandsWrittencxx . . $ RMFTileData#nBandsWritten. = 0; |
| 198 | }; |
| 199 | |
| 200 | /************************************************************************/ |
| 201 | /* RMFDataset */ |
| 202 | /************************************************************************/ |
| 203 | |
| 204 | class RMFDatasetcxx . . $ RMFDataset# final : public GDALDatasetcxx . . $ GDALDataset# |
| 205 | { |
| 206 | friend class RMFRasterBandcxx . . $ RMFRasterBand#; |
| 207 | |
| 208 | private: |
| 209 | RMFHeadercxx . . $ RMFHeader# sHeadercxx . . $ RMFDataset#sHeader.{}; |
| 210 | RMFExtHeadercxx . . $ RMFExtHeader# sExtHeadercxx . . $ RMFDataset#sExtHeader.{}; |
| 211 | RMFTypecxx . . $ RMFType# eRMFTypecxx . . $ RMFDataset#eRMFType. = RMFT_RSWcxx . . $ RMFT_RSW.; |
| 212 | GUInt32cxx . . $ GUInt32# nXTilescxx . . $ RMFDataset#nXTiles. = 0; |
| 213 | GUInt32cxx . . $ GUInt32# nYTilescxx . . $ RMFDataset#nYTiles. = 0; |
| 214 | GUInt32cxx . . $ GUInt32# *paiTilescxx . . $ RMFDataset#paiTiles. = nullptr; |
| 215 | GBytecxx . . $ GByte# *pabyDecompressBuffercxx . . $ RMFDataset#pabyDecompressBuffer. = nullptr; |
| 216 | GBytecxx . . $ GByte# *pabyCurrentTilecxx . . $ RMFDataset#pabyCurrentTile. = nullptr; |
| 217 | bool bCurrentTileIsNullcxx . . $ RMFDataset#bCurrentTileIsNull. = false; |
| 218 | int nCurrentTileXOffcxx . . $ RMFDataset#nCurrentTileXOff. = -1; |
| 219 | int nCurrentTileYOffcxx . . $ RMFDataset#nCurrentTileYOff. = -1; |
| 220 | GUInt32cxx . . $ GUInt32# nCurrentTileBytescxx . . $ RMFDataset#nCurrentTileBytes. = 0; |
| 221 | GUInt32cxx . . $ GUInt32# nColorTableSizecxx . . $ RMFDataset#nColorTableSize. = 0; |
| 222 | GBytecxx . . $ GByte# *pabyColorTablecxx . . $ RMFDataset#pabyColorTable. = nullptr; |
| 223 | GDALColorTablecxx . . $ GDALColorTable# *poColorTablecxx . . $ RMFDataset#poColorTable. = nullptr; |
| 224 | GDALGeoTransformcxx . . $ GDALGeoTransform# m_gtcxx . . $ RMFDataset#m_gt.{cxx . . $ GDALGeoTransform#GDALGeoTransform(ced63f7c635d850d).}; |
| 225 | OGRSpatialReferencecxx . . $ OGRSpatialReference# m_oSRScxx . . $ RMFDataset#m_oSRS.{cxx . . $ OGRSpatialReference#OGRSpatialReference(85c52e162fed56f9).}; |
| 226 | |
| 227 | char *pszUnitTypecxx . . $ RMFDataset#pszUnitType. = nullptr; |
| 228 | |
| 229 | bool bBigEndiancxx . . $ RMFDataset#bBigEndian. = false; |
| 230 | bool bHeaderDirtycxx . . $ RMFDataset#bHeaderDirty. = false; |
| 231 | |
| 232 | VSILFILE *fpcxx . . $ RMFDataset#fp. = nullptr; |
| 233 | |
| 234 | stdcxx . . $ std/::shared_ptr<RMFCompressDatacxx . . $ RMFCompressData#> poCompressDatacxx . . $ RMFDataset#poCompressData.{}; |
| 235 | stdcxx . . $ std/::mapcxx . . $ std/map#<GUInt32cxx . . $ GUInt32#, RMFTileDatacxx . . $ RMFTileData#> oUnfinishedTilescxx . . $ RMFDataset#oUnfinishedTiles.{cxx . . $ std/map#map(49f6e7a06ebc5aa8).}; |
| 236 | |
| 237 | CPLErr WriteHeadercxx . . $ RMFDataset#WriteHeader(1953a311f24b2543).(); |
| 238 | static size_t LZWDecompresscxx . . $ RMFDataset#LZWDecompress(8e67beafa5949733).(const GBytecxx . . $ GByte# *, GUInt32cxx . . $ GUInt32#, GBytecxx . . $ GByte# *, GUInt32cxx . . $ GUInt32#, |
| 239 | GUInt32cxx . . $ GUInt32#, GUInt32cxx . . $ GUInt32#); |
| 240 | static size_t LZWCompresscxx . . $ RMFDataset#LZWCompress(58eaed384e26f159).(const GBytecxx . . $ GByte# *, GUInt32cxx . . $ GUInt32#, GBytecxx . . $ GByte# *, GUInt32cxx . . $ GUInt32#, GUInt32cxx . . $ GUInt32#, |
| 241 | GUInt32cxx . . $ GUInt32#, const RMFDatasetcxx . . $ RMFDataset# *); |
| 242 | #ifdef HAVE_LIBJPEGcxx . . $ `<built-in>:483:9`! |
| 243 | static size_t JPEGDecompresscxx . . $ RMFDataset#JPEGDecompress(8e67beafa5949733).(const GBytecxx . . $ GByte# *, GUInt32cxx . . $ GUInt32#, GBytecxx . . $ GByte# *, GUInt32cxx . . $ GUInt32#, |
| 244 | GUInt32cxx . . $ GUInt32#, GUInt32cxx . . $ GUInt32#); |
| 245 | static size_t JPEGCompresscxx . . $ RMFDataset#JPEGCompress(58eaed384e26f159).(const GBytecxx . . $ GByte# *, GUInt32cxx . . $ GUInt32#, GBytecxx . . $ GByte# *, GUInt32cxx . . $ GUInt32#, |
| 246 | GUInt32cxx . . $ GUInt32#, GUInt32cxx . . $ GUInt32#, const RMFDatasetcxx . . $ RMFDataset# *); |
| 247 | #endif // HAVE_LIBJPEG |
| 248 | static size_t DEMDecompresscxx . . $ RMFDataset#DEMDecompress(8e67beafa5949733).(const GBytecxx . . $ GByte# *, GUInt32cxx . . $ GUInt32#, GBytecxx . . $ GByte# *, GUInt32cxx . . $ GUInt32#, |
| 249 | GUInt32cxx . . $ GUInt32#, GUInt32cxx . . $ GUInt32#); |
| 250 | static size_t DEMCompresscxx . . $ RMFDataset#DEMCompress(58eaed384e26f159).(const GBytecxx . . $ GByte# *, GUInt32cxx . . $ GUInt32#, GBytecxx . . $ GByte# *, GUInt32cxx . . $ GUInt32#, GUInt32cxx . . $ GUInt32#, |
| 251 | GUInt32cxx . . $ GUInt32#, const RMFDatasetcxx . . $ RMFDataset# *); |
| 252 | |
| 253 | /*! |
| 254 | Tile decompress callback |
| 255 | pabyIn - input compressed data |
| 256 | nSizeIn - input compressed data size (in bytes) |
| 257 | pabyOut - pointer to uncompressed data |
| 258 | nSizeOut - maximum uncompressed data size |
| 259 | nTileSx - width of uncompressed tile (in pixels) |
| 260 | nTileSy - height of uncompressed tile (in pixels) |
| 261 | |
| 262 | Returns: actual uncompressed data size or 0 on error (if nSizeOut is |
| 263 | small returns 0 too). |
| 264 | */ |
| 265 | size_t (*Decompresscxx . . $ RMFDataset#Decompress.)(const GBytecxx . . $ GByte# *pabyIn, GUInt32cxx . . $ GUInt32# nSizeIn, GBytecxx . . $ GByte# *pabyOut, |
| 266 | GUInt32cxx . . $ GUInt32# nSizeOut, GUInt32cxx . . $ GUInt32# nTileSx, |
| 267 | GUInt32cxx . . $ GUInt32# nTileSy) = nullptr; |
| 268 | |
| 269 | /*! |
| 270 | Tile compress callback |
| 271 | pabyIn - input uncompressed data |
| 272 | nSizeIn - input uncompressed data size (in bytes) |
| 273 | pabyOut - pointer to compressed data |
| 274 | nSizeOut - maximum compressed data size |
| 275 | nTileSx - width of uncompressed tile (in pixels) |
| 276 | nTileSy - height of uncompressed tile (in pixels) |
| 277 | poDS - pointer to parent dataset |
| 278 | |
| 279 | Returns: actual compressed data size or 0 on error (if nSizeOut is |
| 280 | small returns 0 too). |
| 281 | */ |
| 282 | size_t (*Compresscxx . . $ RMFDataset#Compress.)(const GBytecxx . . $ GByte# *pabyIn, GUInt32cxx . . $ GUInt32# nSizeIn, GBytecxx . . $ GByte# *pabyOut, |
| 283 | GUInt32cxx . . $ GUInt32# nSizeOut, GUInt32cxx . . $ GUInt32# nTileSx, GUInt32cxx . . $ GUInt32# nTileSy, |
| 284 | const RMFDatasetcxx . . $ RMFDataset# *poDS) = nullptr; |
| 285 | |
| 286 | stdcxx . . $ std/::vector<RMFDatasetcxx . . $ RMFDataset# *> poOvrDatasetscxx . . $ RMFDataset#poOvrDatasets.{}; |
| 287 | vsi_l_offset nHeaderOffsetcxx . . $ RMFDataset#nHeaderOffset. = 0; |
| 288 | RMFDatasetcxx . . $ RMFDataset# *poParentDScxx . . $ RMFDataset#poParentDS. = nullptr; |
| 289 | |
| 290 | RMFDatasetcxx . . $ RMFDataset#RMFDataset(7afa3cbc5fdbc48b).(const RMFDatasetcxx . . $ RMFDataset# &) = delete; |
| 291 | RMFDatasetcxx . . $ RMFDataset# &operatorcxx . . $ RMFDataset#`operator=`(46be040bb012a5).=(const RMFDatasetcxx . . $ RMFDataset# &) = delete; |
| 292 | |
| 293 | public: |
| 294 | RMFDatasetcxx . . $ RMFDataset#RMFDataset(49f6e7a06ebc5aa8).(); |
| 295 | ~cxx . . $ RMFDataset#`~RMFDataset`(ced63f7c635d850d).RMFDatasetcxx . . $ RMFDataset#() override; |
| 296 | |
| 297 | static int Identifycxx . . $ RMFDataset#Identify(48f695ac6b30cd84).(GDALOpenInfocxx . . $ GDALOpenInfo# *poOpenInfo); |
| 298 | static GDALDatasetcxx . . $ GDALDataset# *Opencxx . . $ RMFDataset#Open(905b7966ba8c1649).(GDALOpenInfocxx . . $ GDALOpenInfo# *); |
| 299 | static RMFDatasetcxx . . $ RMFDataset# *Opencxx . . $ RMFDataset#Open(8b4bfdca79f3178).(GDALOpenInfocxx . . $ GDALOpenInfo# *, RMFDatasetcxx . . $ RMFDataset# *poParentDS, |
| 300 | vsi_l_offset nNextHeaderOffset); |
| 301 | static GDALDatasetcxx . . $ GDALDataset# *Createcxx . . $ RMFDataset#Create(2a509bdc7a404bec).(const char *, int, int, int, GDALDataType, |
| 302 | CSLConstListcxx . . $ CSLConstList#); |
| 303 | static GDALDatasetcxx . . $ GDALDataset# *Createcxx . . $ RMFDataset#Create(f806a8548967c46).(const char *, int, int, int, GDALDataType, |
| 304 | CSLConstListcxx . . $ CSLConstList#, RMFDatasetcxx . . $ RMFDataset# *poParentDS, |
| 305 | double dfOvFactor); |
| 306 | CPLErr FlushCachecxx . . $ RMFDataset#FlushCache(426a86739463d040).(bool bAtClosing) override; |
| 307 | |
| 308 | CPLErr GetGeoTransformcxx . . $ RMFDataset#GetGeoTransform(9cfa0773fdb41a90).(GDALGeoTransformcxx . . $ GDALGeoTransform# >) const override; |
| 309 | CPLErr SetGeoTransformcxx . . $ RMFDataset#SetGeoTransform(6716ac9bf47c3d35).(const GDALGeoTransformcxx . . $ GDALGeoTransform# >) override; |
| 310 | const OGRSpatialReferencecxx . . $ OGRSpatialReference# *GetSpatialRefcxx . . $ RMFDataset#GetSpatialRef(8a5496c2eeefaeaf).() const override; |
| 311 | CPLErr SetSpatialRefcxx . . $ RMFDataset#SetSpatialRef(1251a88179d9f833).(const OGRSpatialReferencecxx . . $ OGRSpatialReference# *poSRS) override; |
| 312 | |
| 313 | CPLErr IBuildOverviewscxx . . $ RMFDataset#IBuildOverviews(62c4454be959517b).(const char *pszResampling, int nOverviews, |
| 314 | const int *panOverviewList, int nBandsIn, |
| 315 | const int *panBandList, GDALProgressFunc pfnProgress, |
| 316 | void *pProgressData, |
| 317 | CSLConstListcxx . . $ CSLConstList# papszOptions) override; |
| 318 | CPLErr IRasterIOcxx . . $ RMFDataset#IRasterIO(64f45bf94c495e7a).(GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, |
| 319 | int nYSize, void *pData, int nBufXSize, int nBufYSize, |
| 320 | GDALDataType eBufType, int nBandCount, |
| 321 | BANDMAP_TYPEcxx . . $ `gcore/gdal_dataset.h:71:9`! panBandMap, GSpacing nPixelSpace, |
| 322 | GSpacing nLineSpace, GSpacing nBandSpace, |
| 323 | GDALRasterIOExtraArg *psExtraArg) override; |
| 324 | CPLErr SetMetadataItemcxx . . $ RMFDataset#SetMetadataItem(216fc8eb9053a851).(const char *pszName, const char *pszValue, |
| 325 | const char *pszDomain = "") override; |
| 326 | CPLErr SetMetadatacxx . . $ RMFDataset#SetMetadata(6c7b553169186fed).(CSLConstListcxx . . $ CSLConstList# papszMetadata, |
| 327 | const char *pszDomain = "") override; |
| 328 | // cppcheck-suppress functionStatic |
| 329 | vsi_l_offset GetFileOffsetcxx . . $ RMFDataset#GetFileOffset(96635ad3070297c8).(GUInt32cxx . . $ GUInt32# iRMFOffset) const; |
| 330 | GUInt32cxx . . $ GUInt32# GetRMFOffsetcxx . . $ RMFDataset#GetRMFOffset(3f54ee48f06aa431).(vsi_l_offset iFileOffset, |
| 331 | vsi_l_offset *piNewFileOffset) const; |
| 332 | RMFDatasetcxx . . $ RMFDataset# *OpenOverviewcxx . . $ RMFDataset#OpenOverview(8ccd347976a69617).(RMFDatasetcxx . . $ RMFDataset# *poParentDS, GDALOpenInfocxx . . $ GDALOpenInfo# *); |
| 333 | vsi_l_offset GetLastOffsetcxx . . $ RMFDataset#GetLastOffset(1c5fc1fd41a99ae7).() const; |
| 334 | CPLErr CleanOverviewscxx . . $ RMFDataset#CleanOverviews(1953a311f24b2543).(); |
| 335 | static GBytecxx . . $ GByte# GetCompressionTypecxx . . $ RMFDataset#GetCompressionType(f8b331399af92601).(const char *pszCompressName); |
| 336 | int SetupCompressioncxx . . $ RMFDataset#SetupCompression(7b34ddbeb9731f47).(GDALDataType eType, const char *pszFilename); |
| 337 | static void WriteTileJobFunccxx . . $ RMFDataset#WriteTileJobFunc(5d22bdacc48458e8).(void *pData); |
| 338 | CPLErr InitCompressorDatacxx . . $ RMFDataset#InitCompressorData(3a22ad7ac1be656d).(CSLConstListcxx . . $ CSLConstList# papszParamList); |
| 339 | CPLErr WriteTilecxx . . $ RMFDataset#WriteTile(7664a6cef105f5bc).(int nBlockXOff, int nBlockYOff, GBytecxx . . $ GByte# *pabyData, |
| 340 | size_t nBytes, GUInt32cxx . . $ GUInt32# nRawXSize, GUInt32cxx . . $ GUInt32# nRawYSize); |
| 341 | CPLErr WriteRawTilecxx . . $ RMFDataset#WriteRawTile(9c101138843c0589).(int nBlockXOff, int nBlockYOff, GBytecxx . . $ GByte# *pabyData, |
| 342 | size_t nBytes); |
| 343 | CPLErr ReadTilecxx . . $ RMFDataset#ReadTile(5298e313d1ea0b4f).(int nBlockXOff, int nBlockYOff, GBytecxx . . $ GByte# *pabyData, |
| 344 | size_t nBytes, GUInt32cxx . . $ GUInt32# nRawXSize, GUInt32cxx . . $ GUInt32# nRawYSize, |
| 345 | bool &bNullTile); |
| 346 | void SetupNBitscxx . . $ RMFDataset#SetupNBits(49f6e7a06ebc5aa8).(); |
| 347 | }; |
| 348 | |
| 349 | /************************************************************************/ |
| 350 | /* RMFRasterBand */ |
| 351 | /************************************************************************/ |
| 352 | |
| 353 | class RMFRasterBandcxx . . $ RMFRasterBand# final : public GDALRasterBandcxx . . $ GDALRasterBand# |
| 354 | { |
| 355 | friend class RMFDatasetcxx . . $ RMFDataset#; |
| 356 | |
| 357 | private: |
| 358 | GUInt32cxx . . $ GUInt32# nBlockSizecxx . . $ RMFRasterBand#nBlockSize. = 0; |
| 359 | GUInt32cxx . . $ GUInt32# nBlockBytescxx . . $ RMFRasterBand#nBlockBytes. = 0; |
| 360 | GUInt32cxx . . $ GUInt32# nLastTileWidthcxx . . $ RMFRasterBand#nLastTileWidth. = 0; |
| 361 | GUInt32cxx . . $ GUInt32# nLastTileHeightcxx . . $ RMFRasterBand#nLastTileHeight. = 0; |
| 362 | GUInt32cxx . . $ GUInt32# nDataSizecxx . . $ RMFRasterBand#nDataSize. = 0; |
| 363 | |
| 364 | public: |
| 365 | RMFRasterBandcxx . . $ RMFRasterBand#RMFRasterBand(7fa2cf99e2d27ec).(RMFDatasetcxx . . $ RMFDataset# *, int, GDALDataType); |
| 366 | ~cxx . . $ RMFRasterBand#`~RMFRasterBand`(ced63f7c635d850d).RMFRasterBandcxx . . $ RMFRasterBand#() override; |
| 367 | |
| 368 | CPLErr IReadBlockcxx . . $ RMFRasterBand#IReadBlock(282c12597d894d0d).(int, int, void *) override; |
| 369 | CPLErr IWriteBlockcxx . . $ RMFRasterBand#IWriteBlock(282c12597d894d0d).(int, int, void *) override; |
| 370 | virtual GDALSuggestedBlockAccessPatterncxx . . $ GDALSuggestedBlockAccessPattern# |
| 371 | GetSuggestedBlockAccessPatterncxx . . $ RMFRasterBand#GetSuggestedBlockAccessPattern(455f465bc33b4cdf).() const override; |
| 372 | double GetNoDataValuecxx . . $ RMFRasterBand#GetNoDataValue(3e6f4119bf25dad8).(int *pbSuccess = nullptr) override; |
| 373 | CPLErr SetNoDataValuecxx . . $ RMFRasterBand#SetNoDataValue(e675d8b745d1cf66).(double dfNoData) override; |
| 374 | const char *GetUnitTypecxx . . $ RMFRasterBand#GetUnitType(33a1f659e94feb42).() override; |
| 375 | GDALColorInterp GetColorInterpretationcxx . . $ RMFRasterBand#GetColorInterpretation(35c4b535829078b5).() override; |
| 376 | GDALColorTablecxx . . $ GDALColorTable# *GetColorTablecxx . . $ RMFRasterBand#GetColorTable(bb3b733f241ea394).() override; |
| 377 | CPLErr SetUnitTypecxx . . $ RMFRasterBand#SetUnitType(80d06f1dc84b2c8f).(const char *) override; |
| 378 | CPLErr SetColorTablecxx . . $ RMFRasterBand#SetColorTable(a567fd1abdfca9c2).(GDALColorTablecxx . . $ GDALColorTable# *) override; |
| 379 | int GetOverviewCountcxx . . $ RMFRasterBand#GetOverviewCount(b126dc7c1de90089).() override; |
| 380 | GDALRasterBandcxx . . $ GDALRasterBand# *GetOverviewcxx . . $ RMFRasterBand#GetOverview(b7317453d4fdb323).(int i) override; |
| 381 | CPLErr IRasterIOcxx . . $ RMFRasterBand#IRasterIO(b70cc820beb1726b).(GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, |
| 382 | int nYSize, void *pData, int nBufXSize, int nBufYSize, |
| 383 | GDALDataType eBufType, GSpacing nPixelSpace, |
| 384 | GSpacing nLineSpace, |
| 385 | GDALRasterIOExtraArg *psExtraArg) override; |
| 386 | }; |
| 387 | |
| 388 | #endif |