@cityjson/flatcitybuf
    Preparing search index...

    Module index

    The @cityjson/flatcitybuf package root: a pure TypeScript reader for FlatCityBuf, a cloud-optimized binary encoding of CityJSON.

    Start at FcbReader. Open a file with one of its static factories, query it with FcbReader.select, and turn the results into CityJSON with toCityJSONMetadata and toCityJSONFeature:

    import { FcbReader, toCityJSONFeature } from '@cityjson/flatcitybuf'

    const reader = await FcbReader.fromUrl('https://example.com/city.fcb')
    const hits = await reader.select({
    spatial: { kind: 'bbox', value: [minX, minY, maxX, maxY] },
    })
    for await (const feature of hits) {
    console.log(toCityJSONFeature(feature, reader.header))
    }

    Nothing here imports node:*, so this entry point runs unchanged in a browser. Reading a local file is the one thing it cannot do; that lives behind the package's separate "./node" subpath.

    Everything this module exports is public API. The traversal internals -- node decoding, level bounds, B+tree entries and payloads -- are deliberately NOT exported; the per-block comments below say why for each group. Every error this package raises is an FcbError carrying an ErrorCode.

    ColumnType
    ErrorCode
    BlobRangeReader
    BufferedRangeReader
    BytesRangeReader
    CityObjectView
    FcbError
    FcbReader
    Feature
    FetchRangeReader
    Appearance
    AttrCondition
    AttrIndexInfo
    BBox
    CityJSON
    CityJSONFeature
    ColumnInfo
    DateTimeKey
    FeatureCursor
    FetchRangeReaderOpts
    FileInfo
    GeometryTemplates
    HeaderView
    Int64Policy
    MaterialObject
    MaterialReference
    Metadata
    NodeItem
    PointOfContact
    RangeReader
    ReadOpts
    SearchResultItem
    SelectOptions
    Semantics
    SemanticSurface
    TextureObject
    TextureReference
    Transform
    AttrValue
    Boundaries
    IndexTree
    IndexValues
    JsonValue
    KeyKind
    Operator
    SemanticsValue
    SpatialQuery
    UInts
    DEFAULT_FETCH_SIZE
    NULL_INDEX
    OPEN_PREFETCH_SIZE
    compareFullStrings
    decodeAttributes
    decodeBoundaries
    decodeSemantics
    decodeSemanticsValues
    emitInt64
    geometryTypeName
    intersects
    keyKindForColumn
    postFilterCandidates
    readHeader
    requiresPostFilter
    searchAttributes
    searchRtree
    searchStree
    semanticSurfaceTypeName
    toCityJSONFeature
    toCityJSONMetadata