示例#1
0
def ordinary_kriging(prop, grid, radiuses, max_neighbours, cov_model):
	out_prop = _clone_prop(prop)

	okp = _HPGL_OK_PARAMS(
		covariance_type = cov_model.type,
		ranges = cov_model.ranges,
		angles = cov_model.angles,
		sill = cov_model.sill,
		nugget = cov_model.nugget,
		radiuses = radiuses,
		max_neighbours = max_neighbours)

	_hpgl_so.hpgl_ordinary_kriging(
		_create_hpgl_cont_masked_array(prop, grid),
		C.byref(okp),
		_create_hpgl_cont_masked_array(out_prop, grid))

	return out_prop
示例#2
0
def lvm_kriging(prop, grid, mean_data, radiuses, max_neighbours, cov_model):
	out_prop = _clone_prop(prop)

	okp = _HPGL_OK_PARAMS(
		covariance_type = cov_model.type,
		ranges = cov_model.ranges,
		angles = cov_model.angles,
		sill = cov_model.sill,
		nugget = cov_model.nugget,
		radiuses = radiuses,
		max_neighbours = max_neighbours)

	sh_data = (C.c_int * 3)(grid.x, grid.y, grid.z)
	sh = _HPGL_SHAPE(data=sh_data)

	_hpgl_so.hpgl_lvm_kriging(
		prop.data, prop.mask, C.byref(sh), 
		mean_data, C.byref(sh),
		C.byref(okp),
		out_prop.data, out_prop.mask,
		C.byref(sh))

	return out_prop