This class can be used to create an ITileSet3DModel implementation that can read Hexagon Smart Point Cloud (HSPC) data.
More...
#include <luciad/formats/hspc/HspcModelDecoder.h>
This class can be used to create an ITileSet3DModel implementation that can read Hexagon Smart Point Cloud (HSPC) data.
See HspcModelDecoder::decode
for more details.
- Since
- 2022.0
◆ HspcModelDecoder()
luciad::HspcModelDecoder::HspcModelDecoder |
( |
| ) |
|
|
delete |
◆ ~HspcModelDecoder()
luciad::HspcModelDecoder::~HspcModelDecoder |
( |
| ) |
|
|
delete |
◆ decode() [1/2]
static luciad::expected< std::shared_ptr< ITileSet3DModel >, ErrorInfo > luciad::HspcModelDecoder::decode |
( |
const std::string & |
source | ) |
|
|
static |
A 3D Tile set model that connects to a HSPC dataset to retrieve tiles for a TileSet3DLayer
.
- Parameters
-
source | the HSPC endpoint url or the path to the entry point file |
- Returns
- either the new created model, or error information. The possible error codes are :
-
FileNotFound: when the file or url does not exist.
-
RuntimeError: in case of an error encountered while decoding the file
tileset.json
.
The error information contains a textual description that gives more information about the issue.
- See also
- decode(const std::string&, const Options&)
◆ decode() [2/2]
static luciad::expected< std::shared_ptr< ITileSet3DModel >, ErrorInfo > luciad::HspcModelDecoder::decode |
( |
const std::string & |
source, |
|
|
const Options & |
options |
|
) |
| |
|
static |
A 3D Tile set model that connects to a HSPC dataset to retrieve tiles for a TileSet3DLayer
.
- Input files
File | Entry point | Description |
tree.hspc | x | File containing the root tile metadata as well as links to the sub-tiles/content. |
*.json | | File containing metadata. |
*.apr | | File containing Point Cloud data. |
- Supported versions
HSPC version 22 or older is supported.
- Limitations
- Only datasets with an existing georeference are supported. Data with a missing georeference will not be decoded.
- Available attributes for styling
For HSPC versions 8 and up, point clouds data can be styled using style expressions
that make use of attributes
. An attribute represents additional metadata for each of the points in the point cloud. Typical attributes are intensity, color, height, etc... When attributes are available, they can be discovered by manually inspecting the hspcInfo.json
file that is located next to the tree.hspc
file. That file can contain a section called "attributes". It's a list of attributes that contain:
- a name. This is the name that can be used as attribute name in the style expression
- a type (optional). This indicates the amount of bytes used for the attribute, and what type of number it is (integer or floating point). It can give a hint about the possible range of values for a given attribute. For instance, uint8 data will only be in range 0-255, helping in designing an effective styling range.
- a role (optional). This describes what the attribute means.
This is an example of the attributes that you can find in this file:
"attributes" : [
{
"name": "colorRGB",
"role": "color"
},
{
"name": "I",
"type": float32,
"role": "intensity"
},
{
"name": "C",
"type": uint8,
"role": "classification"
}
]
- Parameters
-
source | the HSPC endpoint url or the path to the entry point file |
options | options for decoding OGC 3D Tiles data, for example an optional custom loader implementation to fetch the OGC 3D Tiles resources. |
- Returns
- either the new created model, or error information. The possible error codes are :
-
FileNotFound: when the file or url does not exist.
-
RuntimeError: in case of an error encountered while decoding the file
tree.hspc
.
The error information contains a textual description that gives more information about the issue.
- Since
- 2022.1