當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。