You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+77-29Lines changed: 77 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,7 @@
7
7
8
8
The TileDB-PyBabylonJS library is a geospatial data visualization Python library that interactively visualizes TileDB arrays with [Babylon.js](https://www.babylonjs.com) in a Jupyter notebook widget.
9
9
10
-
The package is under development and currently contains:
11
-
12
-
* point cloud visualizations with the option to stream all data from a TileDB array or define a bounding box to load a slice of the array
13
-
* MBRS visualization showing the minimum bounding rectangles of the [fragments](https://docs.tiledb.com/main/background/key-concepts-and-data-format#fragments) in the sparse array containing point cloud data
10
+
The package is under development and currently contains point cloud visualizations with the option to stream all data from a TileDB array or define a bounding box to load a slice of the array
@@ -45,7 +40,7 @@ Fork or clone the repo and go to the main directory. Install the TileDB-PyBabylo
45
40
pip install -e ".[test, examples]"
46
41
```
47
42
48
-
When developing your extensions you need to manually enable your extensions with the notebook / lab frontend. For jupyter lab this is done by the command:
43
+
When developing extensions you need to manually enable the extensions with the notebook / lab frontend. For jupyter lab this is done by the command:
@@ -86,15 +81,16 @@ When you make a change to the Python code rebuild the package and restart the no
86
81
87
82
## Usage
88
83
89
-
### Point clouds
90
-
91
84
Jupyter notebooks are provided in the [examples folder](https://github.com/TileDB-Inc/TileDB-PyBabylonJS/tree/main/examples) for the following visualizations:
92
85
93
-
*[Slice of the Autzen point cloud](/examples/autzen_slice.ipynb)
94
-
*[Streaming the Autzen point cloud](/examples/autzen-streaming.ipynb)
95
-
*[Slice of the Boulder point cloud](/examples/point-cloud-boulder.ipynb)
86
+
*[Point cloud visualization parameters](examples/point-cloud-parameters.ipynb) contains a description of all parameters
87
+
*[Slice of the Autzen point cloud](examples/autzen-slice.ipynb)
88
+
*[Slice of the Boulder point cloud](examples/boulder-slice.ipynb)
89
+
*[Streaming the Autzen point cloud](examples/autzen-streaming.ipynb)
90
+
*[Streaming the Bristol point cloud](examples/bristol-streaming.ipynb)
91
+
*[Streaming the Santorini point cloud](examples/santorini-streaming.ipynb)
96
92
97
-
Display a point cloud visualization from a TileDB cloud sparse array by specifying the bounding box of a slice of the data:
93
+
[Sign up for a TileDB account](https://cloud.tiledb.com/auth/signup) and display a point cloud visualization from a TileDB cloud sparse array by specifying the bounding box of a slice of data:
The following parameters can be set for a point cloud visualization:
143
+
144
+
*`camera_location` is the location of the arcRotateCamera in relation to the centre of the point cloud. 1: south, 2: south-east, 3: east, 4: north-east, 5: north, 6: north-west, 7: west, 8: south-west and 9: looking down from above the centre of the point cloud
145
+
*`camera_up` is the height of the initial location of the freeCamera
146
+
*`camera_zoom` scales the camera position relative to the centre of the point cloud with `[1,1,1]` being in the default position and `[2,2,2]` is then twice a far away from the centre in the X, Y and Z direction
147
+
*`color_scheme` is the initial background color: `dark` (default), `light` or ` blue`
148
+
*`data` is the dictionary with the point cloud data when `source = dict`. This dictionary needs to contain values for the location `X`, `Y` and `Z` and the RGB color for each point `Red`, `Green` and `Blue`
149
+
*`height` is the height of the display window in pixels
150
+
*`point_size` is the size of the points
151
+
*`point_type` is the interactive point size type
152
+
*`fixed_screen_size` (default): each point has a constant size in pixels regardless of its distance to the camera
153
+
*`fixed_world_space`: each point has a constant size in world space. This value should be set accordingly to the spacing of the points in world space
154
+
*`adaptive_world_space`: the same as `fixed_world_space` for the below example. But when streaming point cloud data, the point size depends on the locally loaded LODs at each point. The point density across all blocks of the same LOD should be the same and the point density should double at each LOD
155
+
*`source` is the data source (`cloud` (default), `local` or `dict`)
156
+
*`use_sps=True` displays the points as 3D blocks using a [Solid Particle System](https://doc.babylonjs.com/features/featuresDeepDive/particles/solid_particle_system/sps_intro)
157
+
*`use_shader=True` adds the EDL shading
158
+
*`edl_strength` is the strenght of the shader
159
+
*`wheel_precision` gives control over how fast to zoom with the mouse wheel
160
+
*`width` is the width of the display window in pixels
161
+
162
+
### Navigating the point cloud
163
+
164
+
There are two different cameras available to navigate the point cloud, the arcRotateCamera and freeCamera. Toggle between them with `c`. The initial camera is always the arcRotateCamera
165
+
166
+
**arcRotateCamera**
167
+
* Zoom in and out with the scroll wheel
168
+
* Rotate by dragging the mouse with left button down
169
+
* The parameter `wheel_precision` gives control over how fast to zoom with the mouse wheel
170
+
* The camera location and distance from the centre of the points can be changed with `camera_location` and `camera_zoom`
171
+
* Rotate through the `camera_locations` with `v`
172
+
* Change the background color between dark and light with `b`
173
+
174
+
**freeCamera**
175
+
* Move forward: `w` or `up`
176
+
* Move backward: `s` or `down`
177
+
* Move up: `e`
178
+
* Move down: `q`
179
+
* Move to the left: `a` or `left`
180
+
* Move to the right: `d` or `right`
181
+
* Rotate by dragging the mouse with left button down
182
+
* The initial camera position is the centre of the point cloud, the height of the location can be changed with the parameter `camera_up`
183
+
* The camera speed can be changed with the parameter `move_speed`
184
+
* Change the background color between dark and light with `b`
0 commit comments