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))