GDAL
gdaljp2abstractdataset.h
1/******************************************************************************
2 *
3 * Project: GDAL
4 * Purpose: GDALGeorefPamDataset with helper to read georeferencing and other
5 * metadata from JP2Boxes
6 * Author: Even Rouault <even dot rouault at spatialys.com>
7 *
8 ******************************************************************************
9 * Copyright (c) 2013, Even Rouault <even dot rouault at spatialys.com>
10 *
11 * SPDX-License-Identifier: MIT
12 ****************************************************************************/
13
14#ifndef GDAL_JP2_ABSTRACT_DATASET_H_INCLUDED
15#define GDAL_JP2_ABSTRACT_DATASET_H_INCLUDED
16
18#include "gdalgeorefpamdataset.h"
19
20class CPL_DLL GDALJP2AbstractDataset : public GDALGeorefPamDataset
21{
22 char *pszWldFilename = nullptr;
23
24 GDALDataset *poMemDS = nullptr;
25 char **papszMetadataFiles = nullptr;
26 int m_nWORLDFILEIndex = -1;
27 CPLStringList m_aosImageStructureMetadata{};
28
29 CPL_DISALLOW_COPY_ASSIGN(GDALJP2AbstractDataset)
30
31 protected:
32 int CloseDependentDatasets() override;
33
34 virtual VSILFILE *GetFileHandle()
35 {
36 return nullptr;
37 }
38
39 public:
40 GDALJP2AbstractDataset();
41 ~GDALJP2AbstractDataset() override;
42
43 void LoadJP2Metadata(GDALOpenInfo *poOpenInfo,
44 const char *pszOverrideFilename = nullptr,
45 VSILFILE *fpBox = nullptr);
46 void LoadVectorLayers(int bOpenRemoteResources = FALSE);
47
48 char **GetFileList(void) override;
49
50 CSLConstList GetMetadata(const char *pszDomain = "") override;
51 const char *GetMetadataItem(const char *pszName,
52 const char *pszDomain = "") override;
53
54 int GetLayerCount() const override;
55 OGRLayer *GetLayer(int i) const override;
56};
57
59
60#endif /* GDAL_JP2_ABSTRACT_DATASET_H_INCLUDED */
String list class designed around our use of C "char**" string lists.
Definition cpl_string.h:476
A set of associated raster bands, usually from one file.
Definition gdal_dataset.h:77
Class for dataset open functions.
Definition gdal_openinfo.h:30
This class represents a layer of simple features, with access methods.
Definition ogrsf_frmts.h:61
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition cpl_port.h:1101
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1252
Virtual file handle.
Definition cpl_vsi_virtual.h:48