Esempio n. 1
0
func (this *Geos) CreateIndex() *Index {
	tree := C.GEOSSTRtree_create_r(this.v, 10)
	if tree == nil {
		panic("unable to create tree")
	}
	return &Index{tree, &sync.Mutex{}, []IndexGeom{}}
}
Esempio n. 2
0
func cGEOSSTRtree_create(nodeCapacity C.size_t) *C.GEOSSTRtree {
	handlemu.Lock()
	defer handlemu.Unlock()
	return C.GEOSSTRtree_create_r(handle, nodeCapacity)
}