isce3 0.25.0
Loading...
Searching...
No Matches
IH5Dataset.h
1//-*- C++ -*-
2//-*- coding: utf-8 -*-
3//
4// Author: Piyush Agram
5// Copyright 2019
6
7#pragma once
8
9#include "forward.h"
10
11#include <gdal_pam.h>
12#include <gdal_priv.h>
13#include <gdal_rat.h>
14#include "IH5.h"
15
16
17namespace isce3 {
18namespace io {
19
20/************************************************************************/
21/* IH5Dataset */
22/************************************************************************/
23
26class IH5Dataset final: public GDALDataset
27{
28 CPL_DISALLOW_COPY_ASSIGN(IH5Dataset)
29
30 friend class IH5RasterBand;
31
32 //Standard stuff expected from all formats
33 int bGeoTransformSet;
34 double adfGeoTransform[6];
35
36 char *pszProjection;
37 CPLString pszGCPProjection;
38 GDAL_GCP *pasGCPList;
39 int nGCPCount;
40 OGRSpatialReference oSRS;
41
42 //IDataSet from Francois's IH5
43 isce3::io::IDataSet* _dataset;
44 H5::DataType nativeType;
45 H5::DataType actualType;
46 int ndims;
47 int dimensions[3];
48 int chunks[3];
49
50 protected:
51 CPLErr populateFromDataset();
52
53 public:
55 IH5Dataset(const hid_t &inputds, GDALAccess eAccess);
56
58 virtual ~IH5Dataset();
59
60 virtual int GetGCPCount() override;
61 virtual const GDAL_GCP *GetGCPs() override;
62
63 void *GetInternalHandle (const char *) override;
64
65 virtual CPLErr GetGeoTransform( double *padfTransform ) override;
66 virtual CPLErr SetGeoTransform( double * ) override;
67 static GDALDataset *Open(GDALOpenInfo *info);
68 static int Identify(GDALOpenInfo *info);
69};
70
71
72/************************************************************************/
73/* IH5RasterBand */
74/************************************************************************/
75
77class IH5RasterBand : public GDALPamRasterBand
78{
79 protected:
80 friend class IH5Dataset;
81 bool bNoDataSet;
82 double dfNoData;
83
84 public:
85 IH5RasterBand(IH5Dataset *ds, int band,
86 GDALDataType eTypeIn);
87
88 virtual ~IH5RasterBand();
89
90 virtual CPLErr IReadBlock( int, int, void * ) override;
91 virtual CPLErr IWriteBlock( int, int, void * ) override;
92 virtual double GetNoDataValue( int *pbSuccess = nullptr ) override;
93 virtual CPLErr SetNoDataValue( double ) override;
94};
95
96
98void GDALRegister_IH5();
99
100}} // namespace isce3::io
Our derived dataset structure that includes utility functions.
Definition IH5.h:41
virtual ~IH5Dataset()
Destructor.
Definition IH5Dataset.cpp:347
IH5Dataset(const hid_t &inputds, GDALAccess eAccess)
Empty constructor.
Definition IH5Dataset.cpp:290
The isce3::io namespace.
Definition Constants.h:14
void GDALRegister_IH5()
Function to register driver with GDAL.
Definition IH5Dataset.cpp:719
base interpolator is an abstract base class
Definition BinarySearchFunc.cpp:5

Generated for ISCE3.0 by doxygen 1.13.2.