# How Does LingBot-Map Integrate with Mapping Services? A Technical Deep Dive

> Explore how LingBot-Map integrates with mapping services. Discover its GLB, PLY, and NumPy output for seamless data ingestion via a simple export workflow.

- Repository: [Robbyant/lingbot-map](https://github.com/Robbyant/lingbot-map)
- Tags: deep-dive
- Published: 2026-07-19

---

**LingBot-Map does not embed proprietary mapping APIs; instead, it generates standard 3-D geometry outputs (GLB, PLY, NumPy arrays) that can be ingested by any mapping service through a simple three-step export workflow.**

LingBot-Map is a streaming 3-D reconstruction library developed by Robbyant that builds dense point-cloud maps directly from image sequences. Unlike traditional mapping tools that bundle third-party SDKs, this repository provides low-level geometric components that you can connect to any external mapping platform. The integration relies on standard 3-D formats rather than proprietary service APIs, making the core library lightweight and service-agnostic.

## Core Components for Mapping Integration

### The Streaming Reconstruction Engine

In [`lingbot_map/models/gct_stream.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/models/gct_stream.py), the **Geometric Context Transformer** consumes per-frame RGB/D data and incrementally updates a world-aligned point cloud. The model outputs tensors for depth, world-points, and confidence that can be post-processed by any 3-D geometry library such as Open3D, Kaolin, or PCL.

### Interactive Demo Interface

The [`demo.py`](https://github.com/Robbyant/lingbot-map/blob/main/demo.py) script provides a CLI wrapper that runs the model on a folder of images and streams the reconstruction to a browser-based visualizer (Viser). After inference, you can retrieve the accumulated point cloud via the `point_cloud_viewer` utilities and export it to standard 3-D formats.

### Export Utilities for GIS Workflows

The [`lingbot_map/vis/glb_export.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/vis/glb_export.py) module converts internal point-cloud representations into **GLB files**, which are natively ingestible by Cesium, Mapbox 3D-Tiles, Google Earth Enterprise, and other GIS services. Additionally, the [`demo_render/batch_demo.py`](https://github.com/Robbyant/lingbot-map/blob/main/demo_render/batch_demo.py) pipeline can write raw point-cloud data to NumPy `.npz` files for downstream rasterization or tiling workflows.

## Three-Step Integration Workflow

### Step 1: Run Reconstruction

Feed your image or video data to either the interactive demo or the batch processor. For interactive visualization:

```bash
python demo.py \
    --model_path /path/to/lingbot-map-long.pt \
    --image_folder ./example/courthouse \
    --mask_sky               # optional sky masking

```

For batch processing of long sequences, use [`demo_render/batch_demo.py`](https://github.com/Robbyant/lingbot-map/blob/main/demo_render/batch_demo.py), which produces point-cloud videos (MP4) and optional depth maps while writing raw data to `.npz` files.

### Step 2: Export the Map

After inference, the point cloud resides in memory. Convert it to a mapping-service-ready format using the GLB exporter or save raw tensors for custom pipelines:

```python
from lingbot_map.vis.glb_export import export_glb
import numpy as np

# Export to GLB for web mapping platforms

export_glb(world_points, colors, "my_map.glb")

# Or export raw tensors for GIS pipelines

np.savez("my_map.npz", pts=world_points, rgb=colors)

```

### Step 3: Publish to Your Mapping Service

Upload the resulting files to your preferred platform:

- **Mapbox 3D-Tiles** – Use `mapbox/tilemaker` to convert GLB → `.pmtiles`
- **Cesium Ion / CesiumJS** – Load the GLB directly with `Cesium3DTileset`
- **Google Earth** – Import the GLB via the "3D Model" import tool

## Preprocessing for Clean Map Data

Before exporting, the [`lingbot_map/vis/sky_segmentation.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/vis/sky_segmentation.py) module removes sky points from outdoor reconstructions. This improves the quality and reduces file sizes for tiled 3-D layers, making conversions to formats like Cesium 3D-Tiles more efficient and visually appealing.

## Summary

- LingBot-Map generates **standard 3-D geometry** (GLB, PLY, NumPy arrays) rather than embedding proprietary mapping SDKs
- The core streaming transformer in [`lingbot_map/models/gct_stream.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/models/gct_stream.py) produces world-aligned point clouds compatible with any post-processing pipeline
- Export utilities in [`lingbot_map/vis/glb_export.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/vis/glb_export.py) enable direct ingestion by Cesium, Mapbox, and Google Earth
- Sky masking via [`lingbot_map/vis/sky_segmentation.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/vis/sky_segmentation.py) optimizes outdoor maps for web visualization
- The three-step workflow (reconstruct → export → publish) maintains service agnosticism while supporting major GIS platforms

## Frequently Asked Questions

### Does LingBot-Map include built-in support for Google Maps or Mapbox?

No. According to the Robbyant/lingbot-map source code, the library intentionally avoids embedding third-party mapping-service APIs. Instead, it provides export utilities that generate standard 3-D formats like GLB and NumPy arrays, which you can upload to any mapping platform of your choice.

### What file formats does LingBot-Map export for mapping services?

The repository supports **GLB/GLTF** files via [`lingbot_map/vis/glb_export.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/vis/glb_export.py), which are compatible with Cesium, Mapbox 3D-Tiles, and Google Earth. It also exports **NumPy `.npz` files** containing raw point coordinates and colors via [`demo_render/batch_demo.py`](https://github.com/Robbyant/lingbot-map/blob/main/demo_render/batch_demo.py), and can generate **PLY** files for general 3-D processing workflows.

### Can I process video sequences instead of image folders?

Yes. The [`demo_render/batch_demo.py`](https://github.com/Robbyant/lingbot-map/blob/main/demo_render/batch_demo.py) script runs the Geometric Context Transformer on video files or image folders in batch mode. It outputs MP4 visualizations, depth maps, and raw `.npz` point-cloud files suitable for downstream GIS processing or tiling services.

### How does sky masking improve mapping service integration?

The [`lingbot_map/vis/sky_segmentation.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/vis/sky_segmentation.py) module filters out sky points before export, which reduces noise and file size. Clean point clouds convert more efficiently to tiled 3-D layers (such as Cesium 3D-Tiles) and render more accurately in web-based mapping services.