@LcdService(service=ILcdModelDecoder.class, priority=20000) public final class TLcdPointCloudModelDecoder extends Object implements ILcdModelDecoder
tilestore.lpc
files).
File | Required | Entry point | Description |
---|---|---|---|
tilestore.lpc | x | x | Entry point of the point cloud dataset. |
tiles | x | Directory containing the tile data. |
InputStream
, from a http connection or from a file inside a
jar file.
ILcd2DBoundsIndexedModel
.ILcdDataModelDescriptor
,
but the elements in the model are not data objects
.
This allows you to still use the data model to access properties of individual points to build
expressions
for use in styling.
Use ILcdDataModelDescriptor.getModelTypes()
()} to obtain the single data type that
consists of the properties available in the point cloud data.TLcdGeocentricReference
.ALcdBounds.fromDomainObject(Object)
method.
TLsp3DTileLayerBuilder
.
It is not possible to visualize the data on a GXY view.
String source = "tilestore.lpc";
TLcdPointCloudModelDecoder modelDecoder = new TLcdPointCloudModelDecoder();
if(modelDecoder.canDecodeSource(source)){
ILcdModel model = modelDecoder.decode(source);
ILspLayer layer = TLsp3DTileLayerBuilder.newBuilder().model(model).build();
}
Modifier and Type | Field and Description |
---|---|
static String |
TYPE_NAME
The type name for the decoded models.
|
Constructor and Description |
---|
TLcdPointCloudModelDecoder() |
Modifier and Type | Method and Description |
---|---|
boolean |
canDecodeSource(String aSourceName)
Checks whether this model decoder can decode the specified data source.
|
ILcdModel |
decode(String aSourceName)
Creates a new model from the given data source.
|
String |
getDisplayName()
Returns a short, displayable name for the format that is decoded by this
ILcdModelDecoder . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
public static final String TYPE_NAME
public String getDisplayName()
ILcdModelDecoder
ILcdModelDecoder
.getDisplayName
in interface ILcdModelDecoder
ILcdModelDecoder
.public boolean canDecodeSource(String aSourceName)
ILcdModelDecoder
true
for a source name while decode
throws an exception for that same source name.
For performance reasons, we strongly recommend that this will only be a simple test. For example: check the file extension of a file, but not that the file exists or contains expected content.
canDecodeSource
in interface ILcdModelDecoder
aSourceName
- the data source to be verified; typically a file name or a URL.true
if this decoder can likely decode the data specified by the source name, false
otherwise.ILcdModelDecoder.decode(String)
,
ILcdModelDecoder.decodeModelMetadata(String)
public ILcdModel decode(String aSourceName) throws IOException
ILcdModelDecoder
decode
in interface ILcdModelDecoder
aSourceName
- the data source to be decoded; typically a file name or a URL.null
is allowed, implementors are advised to throw an error instead.IOException
- for any exceptions caused by IO problems or invalid data. Since decoding invalid data almost
always results in RunTimeExceptions (NullPointerException, IndexOutOfBoundsException,
IllegalArgumentException, ...) on unexpected places, implementations are advised to catch
RuntimeExceptions in their decode() method, and wrap them into an IOException, as illustrated
in the code snippet below.
public ILcdModel decode( String aSourceName ) throws IOException {
try (InputStream input = fInputStreamFactory.createInputStream(aSourceName)) {
// Perform decoding ...
} catch (RuntimeException e) {
throw new IOException(e);
}
}
InterruptedIOException
- When the thread on which this method is called is interrupted: it is recommended to stop the decoding
and throw an InterruptedIOException
.
This same exception can also be used if the decoder shows UI to the user, and the user cancels the decoding
through the UI.ILcdModelDecoder.canDecodeSource(String)