Class StatisticsQueryParameters

java.lang.Object
com.esri.arcgisruntime.data.StatisticsQueryParameters

public final class StatisticsQueryParameters extends Object
Parameters to perform a statistical query on a FeatureTable.

Perform statistical analyses such as average, count, maximum, and standard deviation on a feature table by defining a StatisticType on a StatisticDefinition. Use a combination of attribute, spatial, and temporal criteria to filter the features to be analyzed. If no filters are defined, all features in the table are included in the statistical query. You can also control how to group the results.

Since:
100.2.0
See Also:
  • Constructor Details

  • Method Details

    • getGeometry

      public Geometry getGeometry()
      Gets the geometry used to filter the results.

      The geometry that (along with the getSpatialRelationship()) defines features to be included in the statistical query.

      Returns:
      the geometry used to filter the results, or null if none
      Since:
      100.2.0
    • setGeometry

      public void setGeometry(Geometry geometry)
      Sets the geometry used to filter the results.

      The geometry that (along with the getSpatialRelationship()) defines features to be included in the statistical query.

      Parameters:
      geometry - the geometry used to filter the results
      Throws:
      IllegalArgumentException - if geometry is null
      Since:
      100.2.0
    • getSpatialRelationship

      public QueryParameters.SpatialRelationship getSpatialRelationship()
      Gets the spatial relationship that (along with the getGeometry()) defines features to be included in the query.

      The default spatial relationship is QueryParameters.SpatialRelationship.INTERSECTS.

      Returns:
      the spatial relationship that (along with the StatisticsQueryParameters.getGeometry()) defines features to be included in the query.
      Since:
      100.2.0
    • setSpatialRelationship

      public void setSpatialRelationship(QueryParameters.SpatialRelationship spatialRelationship)
      Sets the spatial relationship that (along with the setGeometry(Geometry)) defines features to be included in the query.

      The default spatial relationship is QueryParameters.SpatialRelationship.INTERSECTS.

      Parameters:
      spatialRelationship - the spatial relationship that (along with the StatisticsQueryParameters.setGeometry()) defines features to be included in the query.
      Throws:
      IllegalArgumentException - if spatialRelationship is null
      Since:
      100.2.0
    • getWhereClause

      public String getWhereClause()
      Gets the attribute expression that defines features to be included in the statistics query.

      The where clause should follow standard SQL syntax similar to that discussed in the document SQL reference for query expressions used in ArcGIS.

      If the where clause includes dates, they must be correctly formatted based on the geodatabase datasource used in the service. Refer to Dates and time for date formats expected by different data sources.

      ArcGISFeatureTable objects expect that any Field.Type.GLOBALID or Field.Type.GUID parameters in the where clause are formatted as: '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}'. All characters are uppercase, wrapped in curly braces and surrounded by single quotes.

      Returns:
      a string of the attribute expression that defines features to be included in the statistics query.
      Since:
      100.2.0
    • setWhereClause

      public void setWhereClause(String whereClause)
      Sets the attribute expression that defines features to be included in the statistics query.

      The where clause should follow standard SQL syntax similar to that discussed in the document SQL reference for query expressions used in ArcGIS.

      If the where clause includes dates, they must be correctly formatted based on the geodatabase datasource used in the service. Refer to Dates and time for date formats expected by different data sources.

      ArcGISFeatureTable objects expect that any Field.Type.GLOBALID or Field.Type.GUID parameters in the where clause are formatted as: '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}'. All characters are uppercase, wrapped in curly braces and surrounded by single quotes.

      Parameters:
      whereClause - the where clause string for filtering features
      Throws:
      IllegalArgumentException - if whereClause is null
      Since:
      100.2.0
    • getGroupByFieldNames

      public List<String> getGroupByFieldNames()
      Gets a list of fields by which statistical query results will be grouped.

      By default the list is empty. Adds valid field names to group the statistical query result. It will affect the result of StatisticRecord.getGroup().

      Returns:
      a mutable list of fields by which statistical query results will be grouped
      Since:
      100.2.0
    • getOrderByFields

      public List<QueryParameters.OrderBy> getOrderByFields()
      Gets a list of fields by which statistical query results will be ordered.

      Results can be sorted by one or more fields. Each QueryParameters.OrderBy instance includes a field name and whether to sort by that field in ascending or descending order. If a service-based table is being queried it must support advanced queries.

      Returns:
      a mutable list of fields for sort orders
      Since:
      100.2.0
    • getStatisticDefinitions

      public List<StatisticDefinition> getStatisticDefinitions()
      Gets the definition of statistics (input field, output name, statistic type) to include in the statistical query of a table.

      By default, the list is the same as the definition list constructing the object. Adds or removes a statistic definition to the list to decide the final statistical query result. The list cannot be empty.

      Returns:
      the definition of statistics (input field, output name, statistic type) to include in the statistical query of a table
      Since:
      100.2.0
    • setTimeExtent

      public void setTimeExtent(TimeExtent timeExtent)
      Sets the time extent that defines features to be included in the statistics query. The time extent can be null to indicate an infinite extent.
      Parameters:
      timeExtent - the time extent
      Since:
      100.3.0
    • getTimeExtent

      public TimeExtent getTimeExtent()
      Gets the time extent that defines features to be included in the statistics query.
      Returns:
      the time extent, or null if no time extent is set
      Since:
      100.3.0