def getGETGetFeatureRequest(self, typename=None, filter=None, bbox=None, featureid=None,<EOL>featureversion=None, propertyname=None, maxfeatures=None,storedQueryID=None, storedQueryParams=None,<EOL>outputFormat=None, method='<STR_LIT>', startindex=None, sortby=None):
storedQueryParams = storedQueryParams or {}<EOL>base_url = next((m.get('<STR_LIT:url>') for m in self.getOperationByName('<STR_LIT>').methods if m.get('<STR_LIT:type>').lower() == method.lower()))<EOL>base_url = base_url if base_url.endswith("<STR_LIT:?>") else base_url+"<STR_LIT:?>"<EOL>request = {'<STR_LIT>': '<STR_LIT>', '<STR_LIT:version>': self.version, '<STR_LIT>': '<STR_LIT>'}<EOL>if featureid:<EOL><INDENT>request['<STR_LIT>'] = '<STR_LIT:U+002C>'.join(featureid)<EOL><DEDENT>elif bbox:<EOL><INDENT>request['<STR_LIT>'] = self.getBBOXKVP(bbox,typename)<EOL><DEDENT>elif filter:<EOL><INDENT>request['<STR_LIT>'] = str(filter)<EOL><DEDENT>if typename:<EOL><INDENT>typename = [typename] if type(typename) == type("<STR_LIT>") else typename<EOL>if int(self.version.split('<STR_LIT:.>')[<NUM_LIT:0>]) >= <NUM_LIT:2>:<EOL><INDENT>request['<STR_LIT>'] = '<STR_LIT:U+002C>'.join(typename)<EOL><DEDENT>else:<EOL><INDENT>request['<STR_LIT>'] = '<STR_LIT:U+002C>'.join(typename)<EOL><DEDENT><DEDENT>if propertyname: <EOL><INDENT>request['<STR_LIT>'] = '<STR_LIT:U+002C>'.join(propertyname)<EOL><DEDENT>if sortby:<EOL><INDENT>request['<STR_LIT>'] = '<STR_LIT:U+002C>'.join(sortby)<EOL><DEDENT>if featureversion: <EOL><INDENT>request['<STR_LIT>'] = str(featureversion)<EOL><DEDENT>if maxfeatures: <EOL><INDENT>if int(self.version.split('<STR_LIT:.>')[<NUM_LIT:0>]) >= <NUM_LIT:2>:<EOL><INDENT>request['<STR_LIT:count>'] = str(maxfeatures)<EOL><DEDENT>else:<EOL><INDENT>request['<STR_LIT>'] = str(maxfeatures)<EOL><DEDENT><DEDENT>if startindex:<EOL><INDENT>request['<STR_LIT>'] = str(startindex)<EOL><DEDENT>if storedQueryID: <EOL><INDENT>request['<STR_LIT>']=str(storedQueryID)<EOL>for param in storedQueryParams:<EOL><INDENT>request[param]=storedQueryParams[param]<EOL><DEDENT><DEDENT>if outputFormat is not None:<EOL><INDENT>request["<STR_LIT>"] = outputFormat<EOL><DEDENT>data = urlencode(request, doseq=True)<EOL>return base_url+data<EOL>
Formulate proper GetFeature request using KVP encoding
        ----------
        typename : list
            List of typenames (string)
        filter : string 
            XML-encoded OGC filter expression.
        bbox : tuple
            (left, bottom, right, top) in the feature type's coordinates == (minx, miny, maxx, maxy)
        featureid : list
            List of unique feature ids (string)
        featureversion : string
            Default is most recent feature version.
        propertyname : list
            List of feature property names. '*' matches all.
        maxfeatures : int
            Maximum number of features to be returned.
        method : string
            Qualified name of the HTTP DCP method to use.
        outputFormat: string (optional)
            Requested response format of the request.
        startindex: int (optional)
            Start position to return feature set (paging in combination with maxfeatures)
        sortby: list (optional)
            List of property names whose values should be used to order
            (upon presentation) the set of feature instances that
            satify the query.

        There are 3 different modes of use

        1) typename and bbox (simple spatial query)
        2) typename and filter (==query) (more expressive)
        3) featureid (direct access to known features)