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:

  1. Decode the Binz data into an ILcdModel using the TLcdBinzModelDecoder.

    ILcdModelDecoder decoder = new TLcdBinzModelDecoder();
    ILcdModel model = decoder.decode(sourceName);
  2. 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 .llh, .ref, or .prj file with the same name as the data file.

.llh files contain longitude, latitude, and height, defined in the default EPSG 4326 reference.

Optionally, 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.