If you want to visualize large Binz datasets and maintain application performance, you must convert the Binz data to the OGC 3D Tiles format. OGC 3D Tiles is an optimal format for visualizing large geographical datasets.
After the conversion, you can visualize the data on a Lightspeed view, as explained in the OGC 3D Tiles documentation, or in LuciadRIA, as explained in our tutorial.
You can perform the conversion programmatically, or you can run a Binz data conversion script from the command line.
Converting Binz data to OGC 3D Tiles in your code
To convert Binz data to OGC 3D Tiles:
-
Decode the Binz data into an
ILcdModel
using theTLcdBinzModelDecoder
.ILcdModelDecoder decoder = new TLcdBinzModelDecoder(); ILcdModel model = decoder.decode(sourceName);
-
Encode the generated model to OGC 3D Tiles using a
TLcdOGC3DTilesModelEncoder
:TLcdOGC3DTilesModelEncoder encoder = new TLcdOGC3DTilesModelEncoder(); encoder.export(model, outputPath);
The resulting OGC 3D Tiles dataset is written to the given
outputPath
location.
Converting Binz data to OGC 3D Tiles from the command line
To convert Binz data to OGC 3D Tiles from the command line, go to the samples
folder, and select the appropriate script to run:
-
decoder.binz.bat
on Windows systems -
decoder.binz.sh
on Linux systems
For example:
decoder.binz.bat -i D:\Formats\BINZ\dataset1\tree0000.bin -o C:\Users\user1\3dtilesoutput
You must run the script with these parameters:
-
-i path/to/<projectfile>
: specify the Binz project file, either a<project>.binz
file or a<project>/tree0000.bin
with its folder path. -
-o path/to/output/
: specify the path to the output folder for the OGC 3D Tiles.
Adding georeference information
Make sure that georeference information is available in the input folder with Binz data. You can provide georeference information
in a
|
Optionally, you can add the -g
and -m
command parameters:
-
You can use the
-g
command parameter to add a GeoJSON file to the output folder.decoder.binz.bat -g -i D:\Formats\BINZ\dataset1\tree0000.bin -o C:\Users\user1\3dtilesoutput
The GeoJSON file contains information about the features in the Binz data: the feature ID, moniker, linkage, and bounding box, but not the full geometry.
-
You can use the
-m
command parameter to specify the mesh compression you want to apply. You can set it to eitherDRACO
orNONE
. SeeELcdOGC3DTilesMeshCompressionType
for more information about the meaning of these values. If this parameter is not specified, theDRACO
compression is used.decoder.binz.bat -m DRACO -i D:\Formats\BINZ\dataset1\tree0000.bin -o C:\Users\user1\3dtilesoutput