#NEWLINE# def getGETGetFeatureRequest( self , typename = None , filter = None , bbox = None , featureid = None , featureversion = None , propertyname = None , maxfeatures = None , storedQueryID = None , storedQueryParams = None , outputFormat = None , method = 'Get' , startindex = None ) : #NEWLINE# #INDENT# "Formulate proper GetFeature request using KVP encoding\n        ----------\n        typename : list\n            List of typenames (string)\n        filter : string \n            XML-encoded OGC filter expression.\n        bbox : tuple\n            (left, bottom, right, top) in the feature type's coordinates == (minx, miny, maxx, maxy)\n        featureid : list\n            List of unique feature ids (string)\n        featureversion : string\n            Default is most recent feature version.\n        propertyname : list\n            List of feature property names. '*' matches all.\n        maxfeatures : int\n            Maximum number of features to be returned.\n        method : string\n            Qualified name of the HTTP DCP method to use.\n        outputFormat: string (optional)\n            Requested response format of the request.\n        startindex: int (optional)\n            Start position to return feature set (paging in combination with maxfeatures)\n\n        There are 3 different modes of use\n\n        1) typename and bbox (simple spatial query)\n        2) typename and filter (==query) (more expressive)\n        3) featureid (direct access to known features)\n        " #NEWLINE# storedQueryParams = ( storedQueryParams or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# base_url = next ( ( m . get ( 'url' ) for m in self . getOperationByName ( 'GetFeature' ) . methods if ( m . get ( 'type' ) . lower ( ) == method . lower ( ) ) ) ) #NEWLINE# base_url = ( base_url if base_url . endswith ( '?' ) else ( base_url + '?' ) ) #NEWLINE# request = { #NEWLINE# #INDENT# 'service' : 'WFS' , #NEWLINE# 'version' : self . version , #NEWLINE# 'request' : 'GetFeature' , #NEWLINE# #UNINDENT# } #NEWLINE# if featureid : #NEWLINE# #INDENT# request [ 'featureid' ] = ',' . join ( featureid ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if bbox : #NEWLINE# #INDENT# request [ 'bbox' ] = self . getBBOXKVP ( bbox , typename ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if filter : #NEWLINE# #INDENT# request [ 'query' ] = str ( filter ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if typename : #NEWLINE# #INDENT# typename = ( [ typename ] if ( type ( typename ) == type ( '' ) ) else typename ) #NEWLINE# request [ 'typename' ] = ',' . join ( storedQueryParams ) #NEWLINE# #UNINDENT# if propertyname : #NEWLINE# #INDENT# request [ 'propertyname' ] = ',' . join ( propertyname ) #NEWLINE# #UNINDENT# if featureversion : #NEWLINE# #INDENT# request [ 'featureversion' ] = str ( featureversion ) #NEWLINE# #UNINDENT# if maxfeatures : #NEWLINE# #INDENT# request [ 'maxfeatures' ] = str ( maxfeatures ) #NEWLINE# #UNINDENT# if startindex : #NEWLINE# #INDENT# request [ 'startindex' ] = str ( startindex ) #NEWLINE# #UNINDENT# if storedQueryID : #NEWLINE# #INDENT# request [ 'storedQuery_id' ] = str ( storedQueryID ) #NEWLINE# for param in storedQueryParams : #NEWLINE# #INDENT# request [ param ] = storedQueryParams [ param ] #NEWLINE# #UNINDENT# #UNINDENT# if ( outputFormat is not None ) : #NEWLINE# #INDENT# request [ 'outputFormat' ] = outputFormat #NEWLINE# #UNINDENT# data = urlencode ( request ) #NEWLINE# return ( base_url + data )