<div dir="ltr">Hi Eric,<div><br>That's how I would address this in PostGIS:</div><div> - structure table in form of object_id | triangle | triangle_properties, and a separate one for objects;<br> - create index using gist on table (triangle gist_geometry_ops_nd);<br> - make sure your statistics_target is large enough so a cell of sqrt(statistics_target)*sqrt(statistics_target) (or cube root for 3D) is comparable to usual request bbox, not a lot bigger;<br> - use &&& to do 3D box tests, and ST_3DIntersects for more complex shapes.</div><div> - ordering wil be trickier. I expect it to be some kind of camera coordinate ordering, so indexes will not help you there much. Other than that ORDER BY clause should work as usual.</div><div><br></div><div>I expect performance to be within your constraints for triangle bbox filtering, and biggest bottleneck being exact shape recheck and ordering, but that depends on number of triangles you've fetched by bbox.</div><div><br></div><div>You may want to explore sfcgal postgis backend, as it seems it enables some more operations for 3D. PostGIS is mostly 2D so you may lose your Z with some functions.</div><div><br></div><div>There is TRIANGLE in postgis's WKT implementation that stores triangle effecienlty. It also means that an index that uses boxes of triangles may occupy even more space than data table itself :)<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">вс, 26 нояб. 2017 г. в 11:27, Eric <<a href="mailto:knacktus@googlemail.com">knacktus@googlemail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I'm completely new to PostGIS and spatial DBs, but not to Postgres. I've<br>
scanned the docs and saw that PosGIS can do a lot, but that it also<br>
needs some proper learning.<br>
<br>
So, before I dive into PostGIS, I'd like to ask you about your opinion.<br>
How good does PostGIS fit in the following use-case?<br>
<br>
- objects of large 3D triangular meshes; up to 50 000 triangles per object<br>
- up to 10 000 objects in a scene<br>
- overall about 50 000 000 triangles in a scene<br>
<br>
- get all objects inside a volume (box, cube and capped pyramid - like a<br>
frustum) - based on the bounding box<br>
- get all triangles inside a volume, where the triangles can be filtered<br>
prior this check.<br>
- order triangles by coordinate<br>
<br>
Performance does matter. Queries should be roughly in the order of ~ 100<br>
ms. (I have absolutely no idea if this is realistic ...). Available<br>
infrastructure is quite capable (128 GB ram 16 Cores).<br>
<br>
Thanks and best regards,<br>
<br>
Jan<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></blockquote></div>