Warning:  Due to planned infrastructure maintenance, the EBRAINS Wiki and EBRAINS Support system will be unavailable for up to three days starting Monday, 14 July. During this period, both services will be inaccessible, and any emails sent to the support address will not be received.

Attention: We are currently experiencing some issues with the EBRAINS Drive. Please bear with us as we fix this issue. We apologise for any inconvenience caused.


Changes for page kg-spatial-search

Last modified by oschmid on 2023/08/22 11:23

From version 10.1
edited by oschmid
on 2023/08/22 09:25
Change comment: There is no comment for this version
To version 12.1
edited by oschmid
on 2023/08/22 09:31
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -28,7 +28,6 @@
28 28  
29 29  Simply use the API endpoint at [[https:~~/~~/spatial.kg.ebrains.eu/api/>>https://spatial.kg.ebrains.eu/api/]] by running queries according to the following examples:
30 30  
31 -
32 32  == Get started: Query by a "bounding box" (hyperrectangle) ==
33 33  
34 34  {{code language="bash" layout="LINENUMBERS"}}
... ... @@ -43,7 +43,6 @@
43 43  
44 44  As you can see, you're sending a POST request to the endpoint at **https:~/~/spatial.kg.ebrains.eu/spatial-search/cores/ebrains/spatial_objects  **with a payload defining a geometry of interest. In this case, we're looking for all objects that are **inside **a **hyperrectangle **defined by its lowest and highest point in the coordinate system of the coordinate space **AMB-CCF_v3-RAS**. This query will return you an array of ids of the objects located within the geometry which you then can use to conveniently query the KG either through the [[Instance API>>https://core.kg.ebrains.eu/swagger-ui/index.html#/2%20Advanced/getInstancesByIds]] or the [[Query API>>https://core.kg.ebrains.eu/swagger-ui/index.html#/1%20Basic/runDynamicQuery]] to access detailed meta information.
45 45  
46 -
47 47  == Query by hypersphere ==
48 48  
49 49  Alongside the possibility to use hyperrectangles for querying the spatial search, you can also use hyperspheres:
... ... @@ -56,8 +56,6 @@
56 56  
57 57  It is defined by the center of the sphere with its coordinates, the radius in coordinate units and the coordinate space of the given coordinates (in this case again AMB-CCF_v3-RAS)
58 58  
59 -
60 -
61 61  == Advanced use: Union geometries for complex queries ==
62 62  
63 63  To build arbitrarily complex geometries, it is possible to combine hyperrectangles and hyperspheres via (nested) unions:
... ... @@ -69,8 +69,11 @@
69 69  {{/code}}
70 70  
71 71  
68 += Technical details of the ingestion pipeline =
72 72  
70 +The current pipeline is regularly parsing locareJSON files registered in the KG and translates complex geometries via the [[vtk>>https://pypi.org/project/vtk/]] library into a point cloud of a density of 1 coordinate unit (by ray-casting on an obb-tree) and uploads the resulting files to the [[bucket of this collab>>https://wiki.ebrains.eu/bin/view/Collabs/kg-spatial-search/Bucket]]. A cron job on the spatial search server pulls the files from the repo and rebuilds the databases index.
73 73  
72 +
74 74  
75 75  )))
76 76