--- title: "NavVis IVION Site Model Repository" slug: "site-model-repository-1" description: "The Site Model Repository filters buildings, floors, and rooms from a given point in a NavVis IVION site model. Call findWithinGlobal with types.FLOOR or findClosestByTypeAndDistance2D with types.ROOM, seeded by the 3D cursor position." updated: 2024-03-15T10:31:55Z published: 2024-03-15T10:31:55Z canonical: "knowledge.navvis.com/site-model-repository-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://knowledge.navvis.com/llms.txt > Use this file to discover all available pages before exploring further. # Site Model Repository The [Site Model Repository](https://ivion-api.docs.navvis.com/latest/reference/interfaces/sitemodelrepositoryinterface.html) provides filters for finding buildings, floors, and rooms from a given point within a site model in NavVis IVION. A Site Model is a three-dimensional, hierarchical model that clusters information by assigning meaningful names to clearly defined areas in the space of a Site. Each site model entity type may have a logical set of sub-entities, for example, a `BUILDING` site model entity type may contain `ROOM` types as its children. ![](https://cdn.document360.io/bf174766-fa1a-4fe1-a4d7-b1db1e7cb996/Images/Documentation/site-model-repository-image-1wd97dpe.png) ## Getting a Floor from a Point ### Procedure 1. Use the [MainViewInterface](https://ivion-api.docs.navvis.com/latest/reference/interfaces/mainviewinterface.html) 3D cursor to obtain an arbitrary coordinate by calling `getCurrentCursorPosition().geometry.coordinates`. 2. Use `findWithin` to return an array of site model entities that contain the given coordinate: ```plaintext // typescript const point: Vector3 = new api.lib.THREE.Vector3(10, 20, 1); let floors: SiteModelEntityInterface[] = api.siteModel.repository  .findWithinGlobal(point, api.siteModel.types.FLOOR); ``` ## Getting the Closest Room within Range of a Point ### Procedure 1. Use the MainViewInterface 3D cursor to obtain an arbitrary coordinate by calling `getCurrentCursorPosition().geometry.coordinates`. 2. Use `findClosestByTypeAndDistance2D` to return the site model entity that is nearest to the given coordinate: ```plaintext // typescript const point: Vector3 = new api.lib.THREE.Vector3(10, 20, 1); let room: SiteModelEntityInterface = api.siteModel.repository  .findClosestByTypeAndDistance2D(api.siteModel.types.ROOM, point, 5); ``` A site model is a three-dimensional model which clusters information by assigning meaningful names to clearly defined areas in the space of a site. With a site model, you can define and name the buildings, floors, rooms, or even more fine-grained spaces, of a site in NavVis IVION. Among other things, this information is used to create the floor changer and enrich POI search. Site refers to a complex of one or more buildings displayed in a NavVis IVION instance. For example, the Munich Airport would be one site. An instance can contain multiple sites. Each site consists of one or more datasets.