9 #include <isce3/core/Projections.h>
10 #include <isce3/io/IH5.h>
12 #include "GeoTransform.h"
14 namespace isce3 {
namespace io {
namespace gdal {
30 Dataset(
const std::string & path, GDALAccess
access = GA_ReadOnly);
52 Dataset(
const std::string & path,
56 GDALDataType datatype,
89 Dataset(
const T * data,
int width,
int length,
int bands);
103 Dataset(T * data,
int width,
int length,
int bands, GDALAccess
access = GA_Update);
121 std::size_t colstride,
122 std::size_t rowstride,
123 std::size_t bandstride);
142 std::size_t colstride,
143 std::size_t rowstride,
144 std::size_t bandstride,
145 GDALAccess
access = GA_Update);
148 GDALAccess
access()
const {
return _access; }
151 int width()
const {
return _dataset->GetRasterXSize(); }
154 int length()
const {
return _dataset->GetRasterYSize(); }
157 int bands()
const {
return _dataset->GetRasterCount(); }
160 std::string
driver()
const {
return _dataset->GetDriverName(); }
211 GDALDataset *
get() {
return _dataset.get(); }
214 const GDALDataset *
get()
const {
return _dataset.get(); }
219 std::shared_ptr<GDALDataset> _dataset;
229 #define ISCE_IO_GDAL_DATASET_ICC
230 #include "Dataset.icc"
231 #undef ISCE_IO_GDAL_DATASET_ICC
void setGeoTransform(const GeoTransform &)
Set geotransform.
Definition: Dataset.cpp:156
int length() const
Number of rows.
Definition: Dataset.h:154
void setProjection(const isce3::core::ProjectionBase *)
Set spatial reference system.
Definition: Dataset.cpp:185
Raster getRaster(int band) const
Fetch raster band.
Definition: Dataset.cpp:138
GDALAccess access() const
Access mode.
Definition: Dataset.h:148
std::string driver() const
Driver name.
Definition: Dataset.h:160
double y0() const
Upper edge of upper-most line in projection coordinates.
Definition: Dataset.h:202
static std::string defaultDriver()
Default GDAL driver for dataset creation.
Definition: Dataset.h:22
double dx() const
Pixel width in projection coordinates.
Definition: Dataset.h:205
int width() const
Number of columns.
Definition: Dataset.h:151
Dataset(const std::string &path, GDALAccess access=GA_ReadOnly)
Open an existing file as a GDAL dataset.
Definition: Dataset.cpp:105
isce3::core::ProjectionBase * getProjection() const
Get spatial reference system.
Definition: Dataset.cpp:169
Our derived dataset structure that includes utility functions.
Definition: IH5.h:44
Abstract base class for individual projections.
Definition: Projections.h:22
double dy() const
Line height in projection coordinates.
Definition: Dataset.h:208
Wrapper for GDALRasterBand representing a single raster.
Definition: Raster.h:14
Wrapper for GDALDataset representing a collection of associated Raster bands.
Definition: Dataset.h:17
int bands() const
Number of bands.
Definition: Dataset.h:157
GeoTransform getGeoTransform() const
Get transform from raster coordinates (pixel, line) to projected coordinates (x, y) ...
Definition: Dataset.cpp:149
double x0() const
Left edge of left-most pixel in projection coordinates.
Definition: Dataset.h:199