Skip to content

Commit

Permalink
GDAL DEM reader - use a faster method for DEMS with nearest interpola…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
gwaldron committed Jan 4, 2025
1 parent 4f6ed26 commit 4d70d01
Show file tree
Hide file tree
Showing 3 changed files with 355 additions and 80 deletions.
7 changes: 5 additions & 2 deletions src/osgEarth/GDAL
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,17 @@ namespace osgEarth
void pixelToGeo(double, double, double&, double&);
void geoToPixel(double, double, double&, double&);

bool isValidValue(float, GDALRasterBand*);
bool isValidValue(float, GDALRasterBand*) const;
bool isValidValue(float value, float noDataValue) const;
bool intersects(const TileKey&);
float getInterpolatedValue(GDALRasterBand* band, double x, double y, bool applyOffset = true);
float getInterpolatedDEMValue(GDALRasterBand* band, double x, double y, bool applyOffset = true);
float getInterpolatedDEMValueWorkspace(GDALRasterBand* band, double u, double v, float* data, int width, int height);

optional<float> _noDataValue, _minValidValue, _maxValidValue;
optional<unsigned> _maxDataLevel = 30;
GDALDataset* _srcDS = nullptr;
GDALDataset* _warpedDS = nullptr;
bool _pixelIsArea = true; // AREA_OR_POINT metadata if available
double _linearUnits = 1.0;
double _geotransform[6];
double _invtransform[6];
Expand Down
Loading

0 comments on commit 4d70d01

Please sign in to comment.