Esempio n. 1
0
func (this *Geos) FromWkt(wkt string) *Geom {
	wktC := C.CString(wkt)
	defer C.free(unsafe.Pointer(wktC))
	geom := C.GEOSGeomFromWKT_r(this.v, wktC)
	if geom == nil {
		return nil
	}
	return &Geom{geom}
}
Esempio n. 2
0
func cGEOSGeomFromWKT(wkt *C.char) *C.GEOSGeometry {
	handlemu.Lock()
	defer handlemu.Unlock()
	return C.GEOSGeomFromWKT_r(handle, wkt)
}