Maria GDK 5.0.0.737
Documentation of native code in develop branch
Loading...
Searching...
No Matches
Maria::RasterDataSet Class Referenceabstract

#include <MRasterDataSet.h>

Inheritance diagram for Maria::RasterDataSet:
Maria::ECWDataSet Maria::GeoPackageDataSet Maria::MBTilesDataSet Maria::SqliteTilesDataSet

Public Member Functions

virtual bool AddFile (const std::string &filename)=0
 
virtual MosaicResult BuildRaster (const RasterMosaicer &mosaic, Maria::GeoBitmap &data, std::shared_ptr< Maria::RasterProjector > vp, double nominalScale)=0
 
virtual MosaicResult BuildRasterTile (const RasterMosaicer &mosaic, Maria::GeoBitmap &data, Maria::TileId tileId, const Maria::TileCacheSpec &tcs)=0
 
virtual bool ContainsTile (Maria::TileId tileId, const Maria::TileCacheSpec &tcs)=0
 
virtual bool Intersects (std::shared_ptr< Maria::RasterProjector > vp)
 
virtual bool CheckResolution (std::shared_ptr< Maria::RasterProjector > vp, double nominalScale)
 
virtual bool CalcResolutionArea (Maria::ResolutionArea &resArea)=0
 
void SetResolutionArea (const Maria::ResolutionArea &resArea)
 
virtual BasicGeoTypes::RectD CalcBoundingBox (const std::shared_ptr< Maria::IProjector > &pj)=0
 
virtual std::shared_ptr< Maria::IProjectorGetProjector ()=0
 
virtual bool GetTileCacheSpec (Maria::TileCacheSpec &)
 
void AddParams (const Maria::ValueBag &params)
 
virtual void Close ()=0
 
virtual bool IsActive ()=0
 
unsigned int LastUsed ()
 
std::string GetParam (const std::string &name) const
 
bool HasParam (const std::string &name) const
 
void SetParam (const std::string &name, const std::string &value)
 
virtual bool IsCompatibleTiling (const Maria::TileCacheSpec &)
 
void SetMetadata (std::shared_ptr< Metadata > md)
 
std::shared_ptr< MetadataGetMetadata () const
 
double GetMinScaleParam () const
 
double GetMaxScaleParam () const
 
double GetMinResolutionParam () const
 
double GetMaxResolutionParam () const
 
std::string GetProjectionParamWKT ()
 

Protected Member Functions

void UpdateLastUsed ()
 

Protected Attributes

Maria::ValueBag _params
 
unsigned int _lastused
 
Maria::ResolutionArea _resArea
 
std::shared_ptr< Metadatametadata
 

Detailed Description

RasterDataSet - A collection of raster data files. All files in a dataset must be in the same projection, but they may differ in resolution, and may also overlap. If overlapping, the files are treated in the order they are defined in the dataset config file, so that files towards the end of the list will have priority over files early in the list.

This data set supports the following parameters in the dataset definition file:

"proj4" Projection string in PROJ4 format. Overrides any projection info in the data files. "projWKT" Projection string in WKT format. Overrides any projection info in the data files. "minResolution" Minimum valid resolution for this dataset. Requesting an image with lower resolution will give an "OutsideResolution" result. "maxResolution" Maximum valid resolution for this dataset. Requesting an image with higher resolution will give an "OutsideResolution" result. "minScale" Minimum valid scale for this dataset. Requesting an image with lower scale than half this value will give an "OutsideResolution" result. "maxScale" Maximum valid scale for this dataset. Requesting an image with higher scale than double this value will give an "OutsideResolution" result. "resampleMethod" Resampling method. Valid values are: "NearestNeighbour" (default), "Bilinear", "Cubic", "CubicSpline" and "Lanczos". "nodata" Nodata value (value to be ignored). This value is not used for RGB(A) data which should use the alpha channel for this purpose.

Member Function Documentation

◆ AddFile()

virtual bool Maria::RasterDataSet::AddFile ( const std::string &  filename)
pure virtual

Add a data file to the data set. Returns true if the file could be added, false if not.

Implemented in Maria::ECWDataSet, Maria::GeoPackageDataSet, Maria::MBTilesDataSet, and Maria::SqliteTilesDataSet.

◆ AddParams()

void RasterDataSet::AddParams ( const Maria::ValueBag params)

Add parameters. All parameter values should be stored as strings and parsed if necessary when used.

◆ BuildRaster()

virtual MosaicResult Maria::RasterDataSet::BuildRaster ( const RasterMosaicer mosaic,
Maria::GeoBitmap data,
std::shared_ptr< Maria::RasterProjector vp,
double  nominalScale 
)
pure virtual

Cut out an image for the area defined by the given viewport. This method should reproject and cut the input data to the projection and limits defined by the viewport.

Implemented in Maria::ECWDataSet, Maria::GeoPackageDataSet, Maria::MBTilesDataSet, and Maria::SqliteTilesDataSet.

◆ BuildRasterTile()

virtual MosaicResult Maria::RasterDataSet::BuildRasterTile ( const RasterMosaicer mosaic,
Maria::GeoBitmap data,
Maria::TileId  tileId,
const Maria::TileCacheSpec tcs 
)
pure virtual

Get an image tile for the given tiling and tileId. This method should only be used for tiled data sets.

Implemented in Maria::ECWDataSet, Maria::GeoPackageDataSet, Maria::MBTilesDataSet, and Maria::SqliteTilesDataSet.

◆ CalcBoundingBox()

virtual BasicGeoTypes::RectD Maria::RasterDataSet::CalcBoundingBox ( const std::shared_ptr< Maria::IProjector > &  pj)
pure virtual

Calculate bounding box in the given coordinate system.If the given coordinate system is null, the native coordinate system should be used.

Implemented in Maria::ECWDataSet, Maria::GeoPackageDataSet, Maria::MBTilesDataSet, and Maria::SqliteTilesDataSet.

◆ CalcResolutionArea()

virtual bool Maria::RasterDataSet::CalcResolutionArea ( Maria::ResolutionArea resArea)
pure virtual

Calculate max resolution and bounding box for the data set in the given projection.

Implemented in Maria::ECWDataSet, Maria::GeoPackageDataSet, Maria::MBTilesDataSet, and Maria::SqliteTilesDataSet.

◆ CheckResolution()

bool RasterDataSet::CheckResolution ( std::shared_ptr< Maria::RasterProjector vp,
double  nominalScale 
)
virtual

Check if the dataset has a resolution which is suitable for the given viewport. This method will first check against the 'minResolution' and 'maxResolution' parameters for the dataset if given. If no maxResolution is given, the resolution of the output image is calculated, and if its resolution is more than twice that of the data set, we return false.

◆ Close()

virtual void Maria::RasterDataSet::Close ( )
pure virtual

Close dataset. This method should free up all data structures used by the data set.

Implemented in Maria::ECWDataSet, Maria::GeoPackageDataSet, Maria::MBTilesDataSet, and Maria::SqliteTilesDataSet.

◆ ContainsTile()

virtual bool Maria::RasterDataSet::ContainsTile ( Maria::TileId  tileId,
const Maria::TileCacheSpec tcs 
)
pure virtual

Check if dataset contains the given tile ID for the given tiling. This method should only be used for tiled data sets.

Implemented in Maria::ECWDataSet, Maria::GeoPackageDataSet, Maria::MBTilesDataSet, and Maria::SqliteTilesDataSet.

◆ GetMaxResolutionParam()

double RasterDataSet::GetMaxResolutionParam ( ) const

Get maximum resolution by parameter. If no maximum resolution is set, -1 is returned.

◆ GetMaxScaleParam()

double RasterDataSet::GetMaxScaleParam ( ) const

Get maximum scale by parameter. If no maximum scale is set, -1 is returned.

◆ GetMinResolutionParam()

double RasterDataSet::GetMinResolutionParam ( ) const

Get minimum resolution by parameter. If no minimum resolution is set, -1 is returned.

◆ GetMinScaleParam()

double RasterDataSet::GetMinScaleParam ( ) const

Get minimum scale by parameter. If no minimum scale is set, -1 is returned.

◆ GetParam()

std::string Maria::RasterDataSet::GetParam ( const std::string &  name) const
inline

Get parameter by name. If no such parameter exists, an empty string is returned.

◆ GetProjectionParamWKT()

std::string RasterDataSet::GetProjectionParamWKT ( )

Get projection parameter as WKT, if given. Projection info may be overridden with the dataset parameters "proj4" and "projWKT". If any of these are set, this method will return the WKT equivalent of the given parameter. If no projection is set, an empty string is returned.

◆ GetProjector()

virtual std::shared_ptr< Maria::IProjector > Maria::RasterDataSet::GetProjector ( )
pure virtual

Get the projection for this dataset. Return a projector for the native coordinate system of this dataset. If no projection is given WGS84 lat/lon is assumed.

Implemented in Maria::ECWDataSet, Maria::GeoPackageDataSet, Maria::MBTilesDataSet, and Maria::SqliteTilesDataSet.

◆ GetTileCacheSpec()

virtual bool Maria::RasterDataSet::GetTileCacheSpec ( Maria::TileCacheSpec )
inlinevirtual

Get the tile cache specification for this dataset. For tiled datasets, such as MBTiles and QM2 this should return the native tiling of the dataset.

Reimplemented in Maria::GeoPackageDataSet, Maria::MBTilesDataSet, and Maria::SqliteTilesDataSet.

◆ HasParam()

bool Maria::RasterDataSet::HasParam ( const std::string &  name) const
inline

Get if dataset has parameter, by name.

◆ Intersects()

bool RasterDataSet::Intersects ( std::shared_ptr< Maria::RasterProjector vp)
virtual

Check if this dataset intersects the viewport area.

◆ IsActive()

virtual bool Maria::RasterDataSet::IsActive ( )
pure virtual

Check if dataset is in use. This indicates that the dataset has loaded data into memory.

Implemented in Maria::ECWDataSet, Maria::GeoPackageDataSet, Maria::MBTilesDataSet, and Maria::SqliteTilesDataSet.

◆ IsCompatibleTiling()

virtual bool Maria::RasterDataSet::IsCompatibleTiling ( const Maria::TileCacheSpec )
inlinevirtual

Check if the data set is compatible with the given tiling.

Reimplemented in Maria::GeoPackageDataSet, Maria::MBTilesDataSet, and Maria::SqliteTilesDataSet.

◆ LastUsed()

unsigned int Maria::RasterDataSet::LastUsed ( )
inline

Returns the timestamp of the last usage of this dataset.


The documentation for this class was generated from the following files: