Class AtlasProjection

Hierarchy

  • BaseAtlasClass<components["schemas"]["ProjectionResponse"]>
    • AtlasProjection

Constructors

  • Parameters

    • id: string

      The UUID of the projection to retrieve.

    • Optional user: AtlasViewer | AtlasUser

      The user object to query with.

    • options: ProjectionInitializationOptions = {}

      Options for initializing the projection.

    Returns AtlasProjection

Properties

_attr: undefined | {
    topic_model_metadatas: Record<string, unknown>[];
    topic_models: {
        bbox?: [number, number, number, number] | [number, number, number, number, number, number];
        features: {
            bbox?: [number, number, number, number] | [number, number, number, number, number, number];
            geometry?: {
                coordinates: [number, number] | [number, number, number];
                type?: "Point";
            } | {
                coordinates: ([(...), (...)] | [(...), (...), (...)])[];
                type?: "MultiPoint";
            } | {
                coordinates: ([(...), (...)] | [(...), (...), (...)])[];
                type?: "LineString";
            } | {
                coordinates: ((...) | (...))[][];
                type?: "MultiLineString";
            } | {
                coordinates: ((...) | (...))[][];
                type?: "Polygon";
            } | {
                coordinates: (...)[][][];
                type?: "MultiPolygon";
            } | {
                geometries: ({
                    coordinates: ...;
                    type?: ...;
                } | {
                    coordinates: ...;
                    type?: ...;
                } | {
                    coordinates: ...;
                    type?: ...;
                } | {
                    coordinates: ...;
                    type?: ...;
                } | {
                    coordinates: ...;
                    type?: ...;
                } | {
                    coordinates: ...;
                    type?: ...;
                })[];
                type?: "GeometryCollection";
            };
            id?: string;
            properties?: Record<string, unknown>;
            type?: "Feature";
        }[];
        type?: "FeatureCollection";
    }[];
}

Type declaration

  • topic_model_metadatas: Record<string, unknown>[]

    Topic Model Metadatas

    Description

    list of topic model metadata

  • topic_models: {
        bbox?: [number, number, number, number] | [number, number, number, number, number, number];
        features: {
            bbox?: [number, number, number, number] | [number, number, number, number, number, number];
            geometry?: {
                coordinates: [number, number] | [number, number, number];
                type?: "Point";
            } | {
                coordinates: ([(...), (...)] | [(...), (...), (...)])[];
                type?: "MultiPoint";
            } | {
                coordinates: ([(...), (...)] | [(...), (...), (...)])[];
                type?: "LineString";
            } | {
                coordinates: ((...) | (...))[][];
                type?: "MultiLineString";
            } | {
                coordinates: ((...) | (...))[][];
                type?: "Polygon";
            } | {
                coordinates: (...)[][][];
                type?: "MultiPolygon";
            } | {
                geometries: ({
                    coordinates: ...;
                    type?: ...;
                } | {
                    coordinates: ...;
                    type?: ...;
                } | {
                    coordinates: ...;
                    type?: ...;
                } | {
                    coordinates: ...;
                    type?: ...;
                } | {
                    coordinates: ...;
                    type?: ...;
                } | {
                    coordinates: ...;
                    type?: ...;
                })[];
                type?: "GeometryCollection";
            };
            id?: string;
            properties?: Record<string, unknown>;
            type?: "Feature";
        }[];
        type?: "FeatureCollection";
    }[]

    Topic Models

    Description

    List of topic model geojsons

_index?: AtlasIndex
_project?: AtlasProject

A projection is a map in Atlas; it represents a snapshot 2d view of a dataset at a point in time. Every projection belongs to a Dataset.

_project_id_promise?: Promise<string>
_schema: null | Uint8Array = null
attributePromise: undefined | Promise<{
    topic_model_metadatas: Record<string, unknown>[];
    topic_models: {
        bbox?: [number, number, number, number] | [number, number, number, number, number, number];
        features: {
            bbox?: [number, number, number, number] | [number, number, number, number, number, number];
            geometry?: {
                coordinates: [(...), (...)] | [(...), (...), (...)];
                type?: "Point";
            } | {
                coordinates: ((...) | (...))[];
                type?: "MultiPoint";
            } | {
                coordinates: ((...) | (...))[];
                type?: "LineString";
            } | {
                coordinates: (...)[][];
                type?: "MultiLineString";
            } | {
                coordinates: (...)[][];
                type?: "Polygon";
            } | {
                coordinates: (...)[][];
                type?: "MultiPolygon";
            } | {
                geometries: ((...) | (...) | (...) | (...) | (...) | (...))[];
                type?: "GeometryCollection";
            };
            id?: string;
            properties?: Record<string, unknown>;
            type?: "Feature";
        }[];
        type?: "FeatureCollection";
    }[];
}>
id: string

The UUID of the projection to retrieve.

project_id?: string
viewer: AtlasViewer

Accessors

  • get attr(): undefined | AttributesType
  • returns the object's information; this may be undefined

    Returns undefined | AttributesType

  • get quadtree_root(): string
  • Returns string

    the URL for the quadtree root for this projection. 'public' may be be added in fetching.

Methods

  • Parameters

    • endpoint: string
    • method: "GET" | "POST"
    • payload: Payload = null
    • headers: null | Record<string, string> = null

    Returns Promise<null | string | any[] | Record<string, any> | Uint8Array | Table<any>>

  • Parameters

    • ids: string[] | number[] | bigint[]

    Returns Promise<any>

  • Parameters

    • options: CreateTagOptions

    Returns Promise<TagResponse>

  • Returns Promise<string>

    the UUID of the dataset that this projection belongs to.

  • Parameters

    • options: DeleteTagRequest

    Returns Promise<void>

  • Fetches basic information about the object. By default, this caches the call; if you want to bust the cache, pass true as the first argument. This immediately.

    Parameters

    • bustCache: boolean = false

      Whether to refetch the relevant information

    Returns Promise<{
        topic_model_metadatas: Record<string, unknown>[];
        topic_models: {
            bbox?: [number, number, number, number] | [number, number, number, number, number, number];
            features: {
                bbox?: [number, number, number, number] | [number, number, number, number, number, number];
                geometry?: {
                    coordinates: [number, number] | [number, number, number];
                    type?: "Point";
                } | {
                    coordinates: ([(...), (...)] | [(...), (...), (...)])[];
                    type?: "MultiPoint";
                } | {
                    coordinates: ([(...), (...)] | [(...), (...), (...)])[];
                    type?: "LineString";
                } | {
                    coordinates: ((...) | (...))[][];
                    type?: "MultiLineString";
                } | {
                    coordinates: ((...) | (...))[][];
                    type?: "Polygon";
                } | {
                    coordinates: (...)[][][];
                    type?: "MultiPolygon";
                } | {
                    geometries: ({
                        coordinates: ...;
                        type?: ...;
                    } | {
                        coordinates: ...;
                        type?: ...;
                    } | {
                        coordinates: ...;
                        type?: ...;
                    } | {
                        coordinates: ...;
                        type?: ...;
                    } | {
                        coordinates: ...;
                        type?: ...;
                    } | {
                        coordinates: ...;
                        type?: ...;
                    })[];
                    type?: "GeometryCollection";
                };
                id?: string;
                properties?: Record<string, unknown>;
                type?: "Feature";
            }[];
            type?: "FeatureCollection";
        }[];
    }>

    A promise that resolves to the organization info.

  • Parameters

    • options: TagRequestOptions

    Returns Promise<TagStatus>

  • Parameters

    • param0: Omit<{
          atlas_index_id: string;
          k?: number;
          queries: string | number[][];
      }, "atlas_index_id">

      an object with keys k (number of numbers) and queries (list of vectors, where each one is the length of the embedding space).

    Returns Promise<Record<string, any>>

    A list of entries in sorted order, where each entry is a list of neighbors including distances in the _distance field.

  • Parameters

    • options: RoboTagOptions

    Returns Promise<void>

  • Parameters

    • options: UpdateTagOptions

    Returns Promise<TagResponse>

  • Parameters

    • bitmask_bytes: Uint8Array
    • options: UpdateTagMaskOptions

    Returns Promise<void>

  • Loads the information associated with the class, removing any existing caches.

    Returns Promise<LoadedObject<AtlasProjection, {
        topic_model_metadatas: Record<string, unknown>[];
        topic_models: {
            bbox?: [number, number, number, number] | [number, number, number, number, number, number];
            features: {
                bbox?: [number, number, number, number] | [number, number, number, number, number, number];
                geometry?: {
                    coordinates: [(...), (...)] | [(...), (...), (...)];
                    type?: "Point";
                } | {
                    coordinates: ((...) | (...))[];
                    type?: "MultiPoint";
                } | {
                    coordinates: ((...) | (...))[];
                    type?: "LineString";
                } | {
                    coordinates: (...)[][];
                    type?: "MultiLineString";
                } | {
                    coordinates: (...)[][];
                    type?: "Polygon";
                } | {
                    coordinates: (...)[][];
                    type?: "MultiPolygon";
                } | {
                    geometries: ((...) | (...) | (...) | (...) | (...) | (...))[];
                    type?: "GeometryCollection";
                };
                id?: string;
                properties?: Record<string, unknown>;
                type?: "Feature";
            }[];
            type?: "FeatureCollection";
        }[];
    }>>

    a LoadedObject instance of the class that is guaranteed to have its attr slot populated with appropriate information.

    Example

    const loadedProject = await (new AtlasProject(projectId)).withLoadedAttributes()

    // OR, in cases where we want to do stuff immediately with the project and ensure
    // that later calls there don't double-fetch information.

    const project = new AtlasProject(projectId)

    // do stuff right away.
    const projection = new AtlasProjection(projectionId, {project: project})
    const loadedProjection = await projection.withLoadedAttributes()
    // do stuff with loadedProjection