will 3d or nd be supported?
the rtreebase class seems to be able to handle n-dimensional rtree, while the rtree class only do inserts like:
// Insert inserts item into rtree
func (tr *RTree) Insert(item Item) {
minX, minY, _, maxX, maxY, _ := item.Rect()
tr.tr.Insert([2]float64{minX, minY}, [2]float64{maxX, maxY}, item)
}
I wonder if 3d or nd point, bbox, indexing, searching .etc is currently fully supported or on the roadmap?
The base rtree structure can potentially support any number of dimensions. I've done various experiments with supporting 3D geometries, but never settled on anything. Perhaps in the future.
3D support would be really the killer feature. Especially for projects with UAVs!
The possibility to geofence volumes would be something really cool.
Could potentially make use of https://sfcgal.gitlab.io/SFCGAL
Yes, there's support for the Z coordinate in Tile38 today.
Set the position of the UAV to lat/lon coordinate (33,-112) and altitude of 150 meters.
SET fleet uav1 33 -112 150
Create a geofence that is detects a rectangular lat/lon bounding box min=(32,-113) max=(34,-111) and altitude min=100 max=200.
SETHOOK geofence1 endpoint-url INTERSECTS fleet WHERE z 100 200 BOUNDS 32 -113 34 -111
I saw this already. Did not know how to query by Z. Is it merely an attribute then? I think a real 3d RTree index would be great, to have some real geospatial volume queries, even it is just a cube.
Is Tile38 using your BuntDB internally? Because it speaks about a geospatial index for up to 20 dimensions.
The Z coordinate is a special field type that can be defined using the FIELD option or by including in a Point type.
Tile38 uses BuntDB for storing the geofence event notifications only, not the internal data structures. Though Tile38 does use the same btree and rtree packages, just in a more direct way.