Пример #1
0
func (this *Geos) FromWkb(wkb []byte) *Geom {
	if len(wkb) == 0 {
		return nil
	}
	geom := C.GEOSGeomFromWKB_buf_r(this.v, (*C.uchar)(&wkb[0]), C.size_t(len(wkb)))
	if geom == nil {
		return nil
	}
	return &Geom{geom}
}
Пример #2
0
func cGEOSGeomFromWKB_buf(wkb *C.uchar, size C.size_t) *C.GEOSGeometry {
	handlemu.Lock()
	defer handlemu.Unlock()
	return C.GEOSGeomFromWKB_buf_r(handle, wkb, size)
}