def standardGeographyQuery(self,
                               sourceCountry=None,
                               optionalCountryDataset=None,
                               geographyLayers=None,
                               geographyIDs=None,
                               geographyQuery=None,
                               returnSubGeographyLayer=False,
                               subGeographyLayer=None,
                               subGeographyQuery=None,
                               outSR=4326,
                               returnGeometry=False,
                               returnCentroids=False,
                               generalizationLevel=0,
                               useFuzzySearch=False,
                               featureLimit=1000):
        """
        The GeoEnrichment service provides a helper method that returns
        standard geography IDs and features for the supported geographic
        levels in the United States and Canada.
        As indicated throughout this documentation guide, the GeoEnrichment
        service uses the concept of a study area to define the location of
        the point or area that you want to enrich with additional
        information. Locations can also be passed as one or many named
        statistical areas. This form of a study area lets you define an
        area by the ID of a standard geographic statistical feature, such
        as a census or postal area. For example, to obtain enrichment
        information for a U.S. state, county or ZIP Code or a Canadian
        province or postal code, the Standard Geography Query helper method
        allows you to search and query standard geography areas so that
        they can be used in the GeoEnrichment method to obtain facts about
        the location.
        The most common workflow for this service is to find a FIPS
        (standard geography ID) for a geographic name. For example, you can
        use this service to find the FIPS for the county of San Diego which
        is 06073. You can then use this FIPS ID within the GeoEnrichment
        service study area definition to get geometry and optional
        demographic data for the county. This study area definition is
        passed as a parameter to the GeoEnrichment service to return data
        defined in the enrichment pack and optionally return geometry for
        the feature.

        For examples and more help with this function see:
        http://resources.arcgis.com/en/help/arcgis-rest-api/#/Standard_geography_query/02r30000000q000000/

        Inputs:
           sourceCountry - Optional parameter to specify the source country
            for the search. Use this parameter to limit the search and
            query of standard geographic features to one country. This
            parameter supports both the two-digit and three-digit country
            codes illustrated in the coverage table.
           optionalCountryDataset - Optional parameter to specify a
            specific dataset within a defined country.
           geographyLayers - Optional parameter to specify which standard
            geography layers are being queried or searched. If this
            parameter is not provided, all layers within the defined
            country will be queried.
           geographyIDs - Optional parameter to specify which IDs for the
            standard geography layers are being queried or searched. You
            can use this parameter to return attributes and/or geometry for
            standard geographic areas for administrative areas where you
            already know the ID, for example, if you know the Federal
            Information Processing Standard (FIPS) Codes for a U.S. state
            or county; or, in Canada, to return the geometry and attributes
            for a Forward Sortation Area (FSA).
           geographyQuery - Optional parameter to specify the text to query
            and search the standard geography layers specified. You can use
            this parameter to query and find standard geography features
            that meet an input term, for example, for a list of all the
            U.S. counties that contain the word "orange". The
            geographyQuery parameter can be a string that contains one or
            more words.
           returnSubGeographyLayer - Use this optional parameter to return
            all the subgeographic areas that are within a parent geography.
            For example, you could return all the U.S. counties for a given
            U.S. state or you could return all the Canadian postal areas
            (FSAs) within a Census Metropolitan Area (city).
            When this parameter is set to true, the output features will be
            defined in the subGeographyLayer. The output geometries will be
            in the spatial reference system defined by outSR.
           subGeographyLayer - Use this optional parameter to return all
            the subgeographic areas that are within a parent geography. For
            example, you could return all the U.S. counties within a given
            U.S. state or you could return all the Canadian postal areas
            (FSAs) within a Census Metropolitan Areas (city).
            When this parameter is set to true, the output features will be
            defined in the subGeographyLayer. The output geometries will be
            in the spatial reference system defined by outSR.
           subGeographyQuery - Optional parameter to filter the results of
            the subgeography features that are returned by a search term.
            You can use this parameter to query and find subgeography
            features that meet an input term. This parameter is used to
            filter the list of subgeography features that are within a
            parent geography. For example, you may want a list of all the
            ZIP Codes that are within "San Diego County" and filter the
            results so that only ZIP Codes that start with "921" are
            included in the output response. The subgeography query is a
            string that contains one or more words.
           outSR - Optional parameter to request the output geometries in a
            specified spatial reference system.
           returnGeometry - Optional parameter to request the output
            geometries in the response.
           returnCentroids - Optional Boolean parameter to request the
            output geometry to return the center point for each feature.
            Use this parameter to return all the geometries as points. For
            example, you could return all U.S. ZIP Code centroids (points)
            rather than providing the boundaries.
           generalizationLevel - Optional integer that specifies the level
            of generalization or detail in the area representations of the
            administrative boundary or standard geographic data layers.
            Values must be whole integers from 0 through 6, where 0 is most
            detailed and 6 is most generalized.
           useFuzzySearch - Optional Boolean parameter to define if text
            provided in the geographyQuery parameter should utilize fuzzy
            search logic. Fuzzy searches are based on the Levenshtein
            Distance or Edit Distance algorithm.
           featureLimit - Optional integer value where you can limit the
            number of features that are returned from the geographyQuery.
        """
        url = self._base_url + self._url_standard_geography_query_execute
        params = {
            "f" : "json"
        }
        if not sourceCountry is None:
            params['sourceCountry'] = sourceCountry
        if not optionalCountryDataset is None:
            params['optionalCountryDataset'] = optionalCountryDataset
        if not geographyLayers is None:
            params['geographylayers'] = geographyLayers
        if not geographyIDs is None:
            params['geographyids'] = json.dumps(geographyIDs)
        if not geographyQuery is None:
            params['geographyQuery'] = geographyQuery
        if not returnSubGeographyLayer is None and \
           isinstance(returnSubGeographyLayer, bool):
            params['returnSubGeographyLayer'] = returnSubGeographyLayer
        if not subGeographyLayer is None:
            params['subGeographyLayer'] = json.dumps(subGeographyLayer)
        if not subGeographyQuery is None:
            params['subGeographyQuery'] = subGeographyQuery
        if not outSR is None and \
           isinstance(outSR, int):
            params['outSR'] = outSR
        if not returnGeometry is None and \
           isinstance(returnGeometry, bool):
            params['returnGeometry']  = returnGeometry
        if not returnCentroids is None and \
           isinstance(returnCentroids, bool):
            params['returnCentroids'] = returnCentroids
        if not generalizationLevel is None and \
           isinstance(generalizationLevel, int):
            params['generalizationLevel'] = generalizationLevel
        if not useFuzzySearch is None and \
           isinstance(useFuzzySearch, bool):
            params['useFuzzySearch'] = json.dumps(useFuzzySearch)
        if featureLimit is None:
            featureLimit = 1000
        elif isinstance(featureLimit, int):
            params['featureLimit'] = featureLimit
        else:
            params['featureLimit'] = 1000
        return self._post(url=url,
                             param_dict=params,
                             securityHandler=self._securityHandler,
                             proxy_url=self._proxy_url,
                             proxy_port=self._proxy_port)