loaders.gl

repository·master·Indexed 21 days ago

https://github.com/visgl/loaders.gl

A framework-independent collection of loaders for geospatial, 3D, and big data visualization use cases, part of the vis.gl ecosystem. The library includes tools for handling 3D Tiles and I3S formats, a Model3DTiler for converting LAS/LAZ files to Cesium 3D Tiles (PNTS), and integration with Apache Arrow JavaScript for efficient columnar data storage and serialization.

Tokens
359.6K
Snippets
924
Records
1.9K
Agent score
74%

What's inside loaders.gl

  1. Overview of @loaders.gl/gis

    master
    @loaders.gl/gis is a specialized module within the loaders.gl ecosystem that provides helper classes specifically designed for the GIS (Geographic Information System) category of loaders. It serves as a utility layer to support geospatial data parsing and handling within the broader framework-independent loaders.gl collection.
  2. Introduction to loaders.gl

    master

    loaders.gl is a collection of open source loaders and writers for various file formats, primarily focused on supporting visualization and analytics of big data. It provides composable modules with consistent APIs for tabular, geospatial, and 3D file formats.

    Key features include:

    • Framework Agnostic: Parses files into plain data structures (objects + typed arrays) usable with any JS framework.
    • Streaming Support: Supports incremental parsing for
    import {load} from '@loaders.gl/core';
    import {CSVLoader} from '@loaders.gl/csv';
    
    const data = await load('data.csv', CSVLoader);
    
    for (const row of data) {
      console.log(JSON.stringify(row)); // => '{header1: value1, header2: value2}'
    }
  3. Overview of Parquet format support

    master

    loaders.gl provides support for both Apache Parquet and GeoParquet formats. These are binary formats used to store data as Tables or Geometry Tables.

    Key characteristics:

    • File Extension: .parquet
    • MIME Type: application/octet-stream
    • Streaming: Supported
    • Worker Thread: Not supported
    • Loader APIs: load, parse, parseInBatches
    • Source APIs: createDataSource, getMetadata, getSchema, read, close
    • Writer APIs: encode, encodeSync
  4. Overview of @loaders.gl/math

    master

    The @loaders.gl/math library provides classes and utilities designed for working with 3D geometries (vertex arrays) stored in typed arrays. It follows WebGL/OpenGL layout rules to facilitate efficient processing of vertex data.

    Note: This library is currently being developed to support 3D tiles and is planned to be moved to the math.gl repository once it stabilizes.

  5. Overview of @loaders.gl/zip capabilities

    master

    The @loaders.gl/zip module provides utilities for handling compressed archives. It supports:

    • ZIP format decompression and compression.
    • TAR format decompression and compression.

    Note that ZipLoader is a wrapper around the JSZip module, meaning it inherits JSZip's capabilities, though it may not expose all of JSZip's advanced options directly.

  6. Overview of @loaders.gl/terrain capabilities

    master

    The @loaders.gl/terrain module is designed to reconstruct mesh surfaces from two primary source formats:

    1. Height map images: Formats like Mapzen Terrain Tiles that encode elevation data into R,G,B pixel values.
    2. Quantized mesh: The [quantized-mesh][quantized_mesh] format.

    Reconstructed data is typically output as a Mesh or a Mesh Arrow table.

  7. Overview of available loader categories

    master

    loaders.gl organizes loaders into categories that return parsed data in standardized forms. This allows applications to handle multiple similar file formats easily.

    • Table Loaders: Streaming tabular loaders for CSV, JSON, Parquet, Arrow, etc.
    • Geospatial Loaders: Formats like GeoJSON, KML, WKT/WKB, Mapbox Vector Tiles.
    • Image Loaders: Standard images and utilities like parsed/binary image APIs.
    • Texture Loaders: Compressed textures, Basis textures, and manifest-driven texture loaders.
    • Pointcloud and Mesh Loaders: Draco, LAS, PCD, PLY, OBJ, and Terrain.
    • Scenegraph Loaders: glTF and OpenUSD.
    • Tiled Data Loaders: 3D Tiles, I3S, and potree.
  8. Overview of @loaders.gl/parquet

    master

    The @loaders.gl/parquet module is an experimental loader and writer for the Apache Parquet format. It provides multiple ways to interact with Parquet data depending on your performance and data structure needs:

    • WASM-backed plain-row APIs: Use ParquetLoader and ParquetWriter for high-performance operations.
    • Selective Arrow reads: Use ParquetSourceLoader for reusable, selective Arrow reads that utilize cached schema and footer metadata.
    • ParquetJS APIs: Use ParquetJSLoader and ParquetJSWriter for experimental plain-row and plain-table APIs based on parquetjs.

    Data Formats Support:

    • ParquetLoader can output Arrow tables by setting the option parquet.shape: 'arrow-table'.
    • ParquetWriter accepts loaders.gl Arrow tables as input.
  9. Overview of @loaders.gl/loader-utils

    master
    The @loaders.gl/loader-utils module provides shared utility functions used across the loaders.gl ecosystem. It is primarily designed to help developers normalize and manipulate streamed binary data before passing it to specific loaders. These utilities are framework-independent and support various binary input types including ArrayBuffer, ArrayBufferView, and ArrayBufferLike (such as SharedArrayBuffer).
  10. Introduction to Apache Arrow JS in loaders.gl

    master

    The Apache Arrow JS library provides a JavaScript API designed for working with binary columnar data in the Apache Arrow format. It is used within loaders.gl to handle high-performance data loading. The API provides core classes for:

    • Batched loading and writing: Efficiently handling large datasets in chunks.
    • Column and row access: Navigating data structures.
    • Schema management: Defining and interacting with data types and structures.
  11. Overview of @loaders.gl/graphs

    master

    The @loaders.gl/graphs module provides parsers for various graph data formats. It is designed to handle graph-based serialization formats and convert them into usable data structures within the loaders.gl ecosystem.

    Currently, the module supports:

    • DOT: A graph description language used for visualizing structural information.
    • GraphML: An XML-based format for expressing graph structures.

    Future updates will include additional graph serialization formats as they are added to the module.