LuciadCPillar 2024.0.04
|
This class is a factory that provides new instances of a Model that are decoded using the GDAL library. More...
#include <luciad/formats/gdal/GdalModelDecoder.h>
Public Member Functions | |
GdalModelDecoder ()=delete | |
~GdalModelDecoder ()=delete | |
Static Public Member Functions | |
static luciad::expected< std::shared_ptr< Model >, ErrorInfo > | decode (const std::string &source) |
Creates a model for a raster or vector file supported by the GDAL library. More... | |
This class is a factory that provides new instances of a Model that are decoded using the GDAL library.
The created model is either an IRasterModel or an IFeatureModel giving the ability to access the data within files of the following supported formats:
|
delete |
|
delete |
|
static |
Creates a model for a raster or vector file supported by the GDAL library.
See class documentation for more information on the supported file formats.
Currently, the following features are supported:
This model decoder considers single band data, using either 32-bit float or 16-bit signed integer, as raster elevation data.
Raster elevation data using single unsigned 16-bit integers are supported under the following conditions:
For more information, please read the related article: Elevation support.
This model decoder supports external overviews created in GeoTIFF format, i.e. overviews generated in an external .ovr file. Please note that the external overview file must have the same name as the GeoTIFF file, but the extension .ovr appended and it must be in the same folder. For more information on GeoTIFF overviews, please read the gdal documentation.
Geometry Type | Description for geometry in model |
---|---|
Point | Point |
Polyline | Polyline |
Polygon | Polygon |
MultiPoint | MultiGeometry with Point sub-geometries |
MultiPolyline | MultiGeometry with Polyline sub-geometries |
MultiPolygon | MultiGeometry with Polygon sub-geometries |
Point Z | Point |
Polyline Z | Polyline |
Polygon Z | Polygon |
MultiPoint Z | MultiGeometry with Point sub-geometries |
MultiPolyline Z | MultiGeometry with Polyline sub-geometries |
MultiPolygon Z | MultiGeometry with Polygon sub-geometries |
SHP geometry types having measurement values are not supported!
The ESRI SHP file must have a corresponding .prj
file containing the WKT representation of the Coordinate Reference System. If it does not exist this decoder attempts to read the Coordinate Reference System from a .epsg
file containing an EPSG code, e.g. EPSG:4326
.
FeatureQuery expression filter can be used to filter the features that have to be loaded in memory. It supports filtering by ID, using a bounding box, and using a condition.
Note that when the condition contains expressions using a spatial bbox operator the filtering cannot be propagated efficiently to GDAL. In this case a best effort is done to translate the condition towards GDAL and a post filtering step in memory is performed.
When available the decoder uses the ESRI spatial index files (.sbn / .sbx) or spatial index files (in .qix
format). When no spatial index files are available the decoder creates a spatial index file using the .qix
format.
When the index file (*.shx) or one of the spatial index files (*.sbx,*.sbn or *.qix) is missing, the decoder creates them at runtime. The index files are stored next to the source data. If the record index file *.shx
cannot be written next to the source data (e.g. no write permission) the decoding fails. If the spatial index file *.qix
cannot be written next to the source data (e.g. no write permission) the decoding continues but spatial filtering will be slower.
source | The absolute path to the file. |