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


Python LDSUtilities.splitLayerName方法代码示例

本文整理汇总了Python中lds.LDSUtilities.LDSUtilities.splitLayerName方法的典型用法代码示例。如果您正苦于以下问题:Python LDSUtilities.splitLayerName方法的具体用法?Python LDSUtilities.splitLayerName怎么用?Python LDSUtilities.splitLayerName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在lds.LDSUtilities.LDSUtilities的用法示例。


在下文中一共展示了LDSUtilities.splitLayerName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: sourceURIIncremental

# 需要导入模块: from lds.LDSUtilities import LDSUtilities [as 别名]
# 或者: from lds.LDSUtilities.LDSUtilities import splitLayerName [as 别名]
    def sourceURIIncremental(self,layername,fromdate,todate):
        '''Endpoint constructor fetching specific layers with incremental date fields'''
        if self.conn_str:
            valid,urilayer = self.validateConnStr(self.conn_str)
            #I don't know why you would attempt to specify dates in the CL and in the URL as well but we might as well attempt to catch diffs
            if layername and urilayer!=layername:
                raise MalformedConnectionString('Layer specifications in URI differs from selected layer (-l); '+str(layername)+'!='+str(urilayer))
            if (fromdate and re.search('from:'+fromdate[:10],valid) is None) or (todate and re.search('to:'+todate[:10],valid) is None):
                raise MalformedConnectionString("Date specifications in URI don't match those referred to with -t|-f "+str(todate)+'/'+str(fromdate)+" not in "+valid)
            return valid

        cql = self._buildCQLStr()
        #pql = self._buildPageStr()     
        
        vep = "{}-changeset".format(LU.splitLayerName(layername))
        typ = "##typeNames={}-changeset".format(layername)
        inc = "##viewparams=from:{};to:{}".format(fromdate,todate)
        ver = "##version={}".format(self.ver) if self.ver else "##version={}".format(self.WVER)
        svc = "##service={}".format(self.svc) if self.svc else "##service=WFS"
        req = "##request=GetFeature"
        #if omitted the outputformat parameter is null and response is GML3.2.1 but this triggers surfaceMember Invalid errors
        fmt = "##outputFormat={}".format(self.fmt if (self.fmt in self.SUPPORTED_OUTPUT_GML_FORMATS) else self.DEFAULT_OUTPUT_GML_FORMAT)
        return re.sub('##','&',re.sub('##','?','{u}services;key={k}{x}/wfs{s}{v}{r}{t}{i}{f}{c}'.format(u=self.url,k=self.key,x=vep,s=svc,v=ver,r=req,t=typ,i=inc,f=fmt,c=cql),1))
开发者ID:josephramsay,项目名称:LDS,代码行数:25,代码来源:RequestBuilder.py


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