示例#1
0
文件: coords.go 项目: Rachine/imposm3
func (this *CoordSeq) SetXY(handle *Geos, i uint32, x, y float64) error {
	if C.GEOSCoordSeq_setX_r(handle.v, this.v, C.uint(i), C.double(x)) == 0 {
		return Error("unable to SetY")
	}
	if C.GEOSCoordSeq_setY_r(handle.v, this.v, C.uint(i), C.double(y)) == 0 {
		return Error("unable to SetX")
	}
	return nil
}
示例#2
0
func cGEOSCoordSeq_setX(s *C.GEOSCoordSequence, idx C.uint, val C.double) C.int {
	handlemu.Lock()
	defer handlemu.Unlock()
	return C.GEOSCoordSeq_setX_r(handle, s, idx, val)
}