@ferrybig/cgeodata-reader
    Preparing search index...

    Interface PlaceIdResult

    lookup()'s result: where a point resolves, without names.

    interface PlaceIdResult {
        placeId: number | null;
        boundingBox: BoundingBox;
        chunkIndex: number;
    }

    Hierarchy (View Summary)

    Index
    placeId: number | null

    The global id (Section 7.5) of the finest place resolved -- the city, else the region, else the country -- or null where nothing resolved. Two results with the same id have the same names, so a caller doing many lookups can key per-place work (a color, a label) on it instead of on the names.

    boundingBox: BoundingBox

    The lat/lon rectangle this result is valid for -- every coordinate in this box resolves to the exact same result as the one just queried. Callers doing many nearby lookups (e.g. a tile renderer sampling a grid of pixels) can cache on this to skip repeat queries that would land in the same underlying cell. It's as tight as the cell that produced the result when one was matched; for "unknown" results it's the whole empty chunk when possible, otherwise the single finest-grain cell containing the query point (always correct, just not maximal -- the actual empty region in a gap between records isn't generally a plain rectangle, so this doesn't try to find its full extent).

    chunkIndex: number

    Index of the chunk the query point falls in (Section 6.1's r * W + c), whether or not that chunk holds any records. Useful for narrowing a rebuild to one chunk with the compressor's --only-chunks when a query resolves unexpectedly.