docs: def query(self,
                where="1=1",
                out_fields="*",
                timeFilter=None,
                geometryFilter=None,
                returnGeometry=True,
                returnIDsOnly=False,
                returnCountOnly=False,
                pixelSize=None,
                orderByFields=None,
                returnDistinctValues=True,
                outStatistics=None,
                groupByFieldsForStatistics=None
                ):
          """ queries a feature service based on a sql statement
              Inputs:
                 where - the selection sql statement
                 out_fields - the attribute fields to return
                 timeFilter - a TimeFilter object where either the start time
                              or start and end time are defined to limit the
                              search results for a given time.  The values in
                              the timeFilter should be as UTC timestampes in
                              milliseconds.  No checking occurs to see if they
                              are in the right format.
                 geometryFilter - a GeometryFilter object to parse down a given
                                 query by another spatial dataset.
                 returnGeometry - true means a geometry will be returned,
                                  else just the attributes
                 returnIDsOnly - false is default.  True means only OBJECTIDs
                                 will be returned
                 returnCountOnly - if True, then an integer is returned only
                                   based on the sql statement
                 pixelSize-Query visible rasters at a given pixel size. If
                           pixelSize is not specified, rasters at all
                           resolutions can be queried.
                 orderByFields-Order results by one or more field names. Use
                               ASC or DESC for ascending or descending order,
                               respectively
                 returnDistinctValues-  If true, returns distinct values
                                      based on the fields specified in
                                      outFields. This parameter applies only
                                      if the supportsAdvancedQueries property
                                      of the image service is true.
                 outStatistics- the definitions for one or more field-based
                                statistics to be calculated.
                 groupByFieldsForStatistics-One or more field names using the
                                           values that need to be grouped for
                                           calculating the statistics.
              Output:
                 A list of Feature Objects (default) or a path to the output featureclass if
                 returnFeatureClass is set to True.
           """
          params = {"f": "json",
                    "where": where,
                    "outFields": out_fields,
                    "returnGeometry" : returnGeometry,
                    "returnIdsOnly" : returnIDsOnly,
                    "returnCountOnly" : returnCountOnly,
                    }
          if not timeFilter is None and \
             isinstance(timeFilter, filters.TimeFilter):
              params['time'] = timeFilter.filter
          if not geometryFilter is None and \
             isinstance(geometryFilter, filters.GeometryFilter):
              gf = geometryFilter.filter
              params['geometry'] = gf['geometry']
              params['geometryType'] = gf['geometryType']
              params['spatialRelationship'] = gf['spatialRel']
              params['inSR'] = gf['inSR']
          if pixelSize is not None:
              params['pixelSize'] = pixelSize
          if orderByFields is not None:
              params['orderByFields'] = orderByFields
          if returnDistinctValues is not None:
              params['returnDistinctValues'] = returnDistinctValues
  
          url = self._url + "/query"
          return self._get(url=url, param_dict=params,
                              securityHandler=self._securityHandler,
                              proxy_url=self._proxy_url,
                              proxy_port=self._proxy_port)