func (this *Geos) Geoms(geom *Geom) []*Geom { count := this.NumGeoms(geom) var result []*Geom for i := 0; int32(i) < count; i++ { part := C.GEOSGetGeometryN_r(this.v, geom.v, C.int(i)) if part == nil { return nil } result = append(result, &Geom{part}) } return result }
func cGEOSGetGeometryN(g *C.GEOSGeometry, n C.int) *C.GEOSGeometry { handlemu.Lock() defer handlemu.Unlock() return C.GEOSGetGeometryN_r(handle, g, n) }