当前位置: 首页>>代码示例>>Python>>正文


Python libgeos.CS_PTR属性代码示例

本文整理汇总了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 
开发者ID:0daybug,项目名称:DjangoBlog,代码行数:20,代码来源:coordseq.py

示例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() 
开发者ID:ComputerSocietyUNB,项目名称:CodingDojo,代码行数:17,代码来源:coordseq.py

示例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 
开发者ID:ComputerSocietyUNB,项目名称:CodingDojo,代码行数:8,代码来源:coordseq.py

示例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 
开发者ID:0daybug,项目名称:DjangoBlog,代码行数:8,代码来源:coordseq.py

示例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. 
开发者ID:0daybug,项目名称:DjangoBlog,代码行数:12,代码来源:coordseq.py

示例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. 
开发者ID:VirtualPlants,项目名称:tissuelab,代码行数:12,代码来源:coordseq.py


注:本文中的django.contrib.gis.geos.libgeos.CS_PTR属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。