add affine function in geomutil