Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SiteModelRepositoryInterface

Site Model data repository.

The Site Model repository object enables standard create, read, update, and delete methods on Site Model Entities. Additional helpful methods are provided that enable more advanced retrieval of Site Model Entities.

Hierarchy

Index

Methods

create

filter

findAll

  • Gets all repository items. The cached data will be returned if the data has been fetched before. Using the forceFetch parameter, a user can order a fresh copy to be fetched from the server.

    Parameters

    • Optional forceFetch: boolean

      Flag whether to force a server request or not. False by default.

    Returns Promise<SiteModelEntityInterface[]>

    Array of resources.

findByTypeAndDistance2D

  • Find Site Model Entities of a certain type within a given 2-dimensional radius [m] from a given point.

    Parameters

    • type: SiteModelType

      The SiteModelType to find.

    • pos: Vector3

      The starting, central point to search from.

    • maxDist: number

      The maximum distance [m] from the central point.

    Returns Promise<SiteModelEntityInterface[]>

findClosestByTypeAndDistance2D

  • Find the closest Site Model Entity of a certain type within a given 2-dimensional radius [m] from a given point.

    Parameters

    • type: SiteModelType

      The SiteModelType to find.

    • pos: Vector3

      The starting, central point to search from.

    • maxDist: number

      The maximum distance [m] from the central point.

    Returns Promise<SiteModelEntityInterface>

findOne

  • Gets one repository item by id. The cached data will be returned if the data has been fetched before. Using the forceFetch parameter, a user can order a fresh copy to be fetched from the server. In case a new record is fetched, the data will be updated accordingly.

    Parameters

    • id: number
    • Optional forceFetch: boolean

      False by default.

    Returns Promise<SiteModelEntityInterface>

findWithin

  • Find Site Model Entities from a given local coordinate with optional Site Model type.

    Parameters

    • localLocation: Vector3 | Vector2

      Local point from which to find nearby Site Model Entities.

    • Optional entityType: SiteModelType

      Reduce search to include only the given Site Model type.

    Returns Promise<SiteModelEntityInterface[]>

generate

  • Automatically generate a Site Model based on all datasets in the instance. Note that this will overwrite any existing Site Model data.

    Returns Promise<SiteModelEntityInterface[]>

remove

save

updateAttributes

Generated using TypeDoc