本文整理汇总了Python中django.contrib.gis.geos.libgeos.CS_PTR属性的典型用法代码示例。如果您正苦于以下问题:Python libgeos.CS_PTR属性的具体用法?Python libgeos.CS_PTR怎么用?Python libgeos.CS_PTR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类django.contrib.gis.geos.libgeos
的用法示例。
在下文中一共展示了libgeos.CS_PTR属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: cs_operation
# 需要导入模块: from django.contrib.gis.geos import libgeos [as 别名]
# 或者: from django.contrib.gis.geos.libgeos import CS_PTR [as 别名]
def cs_operation(func, ordinate=False, get=False):
"For coordinate sequence operations."
if get:
# Get routines get double parameter passed-in by reference.
func.errcheck = check_cs_get
dbl_param = POINTER(c_double)
else:
func.errcheck = check_cs_op
dbl_param = c_double
if ordinate:
# Get/Set ordinate routines have an extra uint parameter.
func.argtypes = [CS_PTR, c_uint, c_uint, dbl_param]
else:
func.argtypes = [CS_PTR, c_uint, dbl_param]
func.restype = c_int
return func
示例2: get_func
# 需要导入模块: from django.contrib.gis.geos import libgeos [as 别名]
# 或者: from django.contrib.gis.geos.libgeos import CS_PTR [as 别名]
def get_func(self, ordinate=False, get=False):
if get:
# Get routines have double parameter passed-in by reference.
self.errcheck = check_cs_get
dbl_param = POINTER(c_double)
else:
self.errcheck = check_cs_op
dbl_param = c_double
if ordinate:
# Get/Set ordinate routines have an extra uint parameter.
self.argtypes = [CS_PTR, c_uint, c_uint, dbl_param]
else:
self.argtypes = [CS_PTR, c_uint, dbl_param]
return super(CsOperation, self).get_func()
示例3: __init__
# 需要导入模块: from django.contrib.gis.geos import libgeos [as 别名]
# 或者: from django.contrib.gis.geos.libgeos import CS_PTR [as 别名]
def __init__(self, ptr, z=False):
"Initializes from a GEOS pointer."
if not isinstance(ptr, CS_PTR):
raise TypeError('Coordinate sequence should initialize with a CS_PTR.')
self._ptr = ptr
self._z = z
示例4: cs_int
# 需要导入模块: from django.contrib.gis.geos import libgeos [as 别名]
# 或者: from django.contrib.gis.geos.libgeos import CS_PTR [as 别名]
def cs_int(func):
"For coordinate sequence routines that return an integer."
func.argtypes = [CS_PTR, POINTER(c_uint)]
func.restype = c_int
func.errcheck = check_cs_get
return func
示例5: cs_output
# 需要导入模块: from django.contrib.gis.geos import libgeos [as 别名]
# 或者: from django.contrib.gis.geos.libgeos import CS_PTR [as 别名]
def cs_output(func, argtypes):
"For routines that return a coordinate sequence."
func.argtypes = argtypes
func.restype = CS_PTR
func.errcheck = check_cs_ptr
return func
# ## Coordinate Sequence ctypes prototypes ##
# Coordinate Sequence constructors & cloning.
示例6: cs_output
# 需要导入模块: from django.contrib.gis.geos import libgeos [as 别名]
# 或者: from django.contrib.gis.geos.libgeos import CS_PTR [as 别名]
def cs_output(func, argtypes):
"For routines that return a coordinate sequence."
func.argtypes = argtypes
func.restype = CS_PTR
func.errcheck = check_cs_ptr
return func
## Coordinate Sequence ctypes prototypes ##
# Coordinate Sequence constructors & cloning.