layout: default title: Query parent: Core Classes —

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Objects

Query Class

This class defines parameters for executing queries for features from a layer or layer view. Once a Query object’s
properties are defined, it can then be passed into an executable function, which will return the features in a
FeatureSet.
ArcGIS Maps SDK for JavaScript

public class Query

Inheritance System.Object 🡒 Query

Properties

Query.AggregateIds Property

An array of Object IDs representing aggregate (i.e. cluster) graphics. This property should be used to query
features represented by one or more cluster graphics with the given Object IDs.

public System.Collections.Generic.IEnumerable<int>? AggregateIds { get; set; }

Property Value

System.Collections.Generic.IEnumerable<System.Int32>

Query.CacheHint Property

Indicates if the service should cache the query results. It only applies if the layer’s
capabilities.query.supportsCacheHint is set to true. Use only for queries that have the same parameters every time
the app is used.

public System.Nullable<bool> CacheHint { get; set; }

Property Value

System.Nullable<System.Boolean>

Query.DatumTransformation Property

Datum transformation used for projecting geometries in the query results when outSpatialReference is different than
the layer’s spatial reference. Requires ArcGIS Server service 10.5 or greater.

public System.Nullable<double> DatumTransformation { get; set; }

Property Value

System.Nullable<System.Double>

Query.Distance Property

Specifies a search distance from a given geometry in a spatial query. The units property indicates the unit of
measurement. In essence, setting this property creates a buffer at the specified size around the input geometry.
The query will use that buffer to return features in the layer or layer view that adhere to the indicated spatial
relationship.
If querying a feature service, the supportsQueryWithDistance capability must be true.

public System.Nullable<double> Distance { get; set; }

Property Value

System.Nullable<System.Double>

Query.GdbVersion Property

Specifies the geodatabase version to display for feature service queries.

public string? GdbVersion { get; set; }

Property Value

System.String

Query.Geometry Property

The geometry to apply to the spatial filter.

public dymaptic.GeoBlazor.Core.Components.Geometries.Geometry? Geometry { get; set; }

Property Value

Geometry

Query.GeometryPrecision Property

Specifies the number of decimal places for geometries returned by the JSON query operation.

public System.Nullable<int> GeometryPrecision { get; set; }

Property Value

System.Nullable<System.Int32>

Query.GroupByFieldsForStatistics Property

Used only in statistical queries. When one or more field names are provided in this property, the output statistics
will be grouped based on unique values from those fields. This is only valid when outStatistics has been defined.

public System.Collections.Generic.IEnumerable<string>? GroupByFieldsForStatistics { get; set; }

Property Value

System.Collections.Generic.IEnumerable<System.String>

Query.Having Property

A condition used with outStatistics and groupByFieldsForStatistics to limit query results to groups that satisfy
the aggregation function(s).
The following aggregation functions are supported in this clause: MIN | MAX | AVG | SUM | STDDEV | COUNT | VAR
Aggregation functions used in having must be included in the outStatistics as well. See the snippet below for an
example of how this works.
For service-based layer queries, this parameter applies only if the supportsHavingClause property of the layer is
true. This property is supported on all LayerView queries.

public string? Having { get; set; }

Property Value

System.String

Query.HistoricMoment Property

The historic moment to query. This parameter applies only if the supportsQueryWithHistoricMoment capability of the
service being queried is true. This setting is provided in the layer resource.

public System.Nullable<System.DateTime> HistoricMoment { get; set; }

Property Value

System.Nullable<System.DateTime>

Query.MaxAllowableOffset Property

The maximum distance in units of outSpatialReference used for generalizing geometries returned by the query
operation. It limits how far any part of the generalized geometry can be from the original geometry. If
outSpatialReference is not defined, the spatialReference of the data is used.

public System.Nullable<double> MaxAllowableOffset { get; set; }

Property Value

System.Nullable<System.Double>

Remarks

This property does not apply to LayerView or CSVLayer queries.

Query.MaxRecordCountFactor Property

When set, the maximum number of features returned by the query will equal the maxRecordCount of the service
multiplied by this factor. The value of this property may not exceed 5.

public System.Nullable<int> MaxRecordCountFactor { get; set; }

Property Value

System.Nullable<System.Int32>

Remarks

Only supported with ArcGIS Online hosted services or ArcGIS Enterprise 10.6 services.

Query.Num Property

The number of features to retrieve. This option should be used in conjunction with the start property. Use this to
implement paging (i.e. to retrieve “pages” of results when querying).
If not provided, but an instance of Query has a start property, then the default value of num is 10. If neither num
nor start properties are provided, then the default value of num is equal to the maxRecordCount of the service,
which can be found at the REST endpoint of the FeatureLayer.

public System.Nullable<int> Num { get; set; }

Property Value

System.Nullable<System.Int32>

Query.ObjectIds Property

An array of ObjectIDs to be used to query for features in a layer.

public System.Collections.Generic.IEnumerable<long>? ObjectIds { get; set; }

Property Value

System.Collections.Generic.IEnumerable<System.Int64>

Query.OrderByFields Property

One or more field names used to order the query results. Specify ASC (ascending) or DESC (descending) after the
field name to control the order. The default order is ASC.

public System.Collections.Generic.IEnumerable<string>? OrderByFields { get; set; }

Property Value

System.Collections.Generic.IEnumerable<System.String>

Remarks

If querying a MapImageLayer, then supportsAdvancedQueries must be true on the service.
For FeatureLayer, FeatureLayer.capabilities.queryRelated.supportsOrderBy must be true.

Query.OutFields Property

Attribute fields to include in the FeatureSet.

public System.Collections.Generic.IEnumerable<string>? OutFields { get; set; }

Property Value

System.Collections.Generic.IEnumerable<System.String>

Query.OutSpatialReference Property

The spatial reference for the returned geometry. If not specified, the geometry is returned in the spatial
reference of the queried layer.

public dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference? OutSpatialReference { get; set; }

Property Value

SpatialReference

Query.OutStatistics Property

The definitions for one or more field-based statistics to be calculated. If outStatistics is specified the only
other query parameters that should be used are groupByFieldsForStatistics, orderByFields, text, and where.

public System.Collections.Generic.IEnumerable<dymaptic.GeoBlazor.Core.Objects.StatisticDefinition>? OutStatistics { get; set; }

Property Value

System.Collections.Generic.IEnumerable<StatisticDefinition>

Remarks

For service-based queries, outStatistics is only supported on layers where supportsStatistics = true.

Query.ParameterValues Property

Filters features from the layer based on pre-authored parameterized filters. When value is not specified for any
parameter in a request, the default value, that is assigned during authoring time, gets used. Requires an ArcGIS
Enterprise service 10.5 or greater. This parameter is only supported with MapImageLayer pointing to a map service.

public System.Collections.Generic.IEnumerable<dymaptic.GeoBlazor.Core.Objects.ParameterValue>? ParameterValues { get; set; }

Property Value

System.Collections.Generic.IEnumerable<ParameterValue>

Query.QuantizationParameters Property

Used to project the geometry onto a virtual grid, likely representing pixels on the screen. Geometry coordinates
are converted to integers by building a grid with a resolution matching the quantizationParameters.tolerance. Each
coordinate is then snapped to one pixel on the grid.

public dymaptic.GeoBlazor.Core.Objects.QuantizationParameters? QuantizationParameters { get; set; }

Property Value

QuantizationParameters

Query.RangeValues Property

Filters features from the layer that are within the specified range values. Requires ArcGIS Enterprise services
10.5 or greater.This parameter is only supported with MapImageLayer pointing to a map service.

public System.Collections.Generic.IEnumerable<dymaptic.GeoBlazor.Core.Objects.RangeValue>? RangeValues { get; set; }

Property Value

System.Collections.Generic.IEnumerable<RangeValue>

Query.RelationParameter Property

The Dimensionally Extended 9 Intersection Model (DE-9IM) matrix relation (encoded as a string) to query the spatial
relationship of the input geometry to the layer’s features. This string contains the test result of each
intersection represented in the DE-9IM matrix. Each result is one character of the string and may be represented as
either a number (maximum dimension returned: 0,1,2), a Boolean value (T or F), or a mask character (for ignoring
results: ‘*’).
Set this parameter when the spatialRelationship is relation. The Relational functions for ST_Geometry topic has
additional details on how to construct these strings.

public string? RelationParameter { get; set; }

Property Value

System.String

Remarks

This property does not apply to layer view or CSVLayer queries.

Query.ReturnCentroid Property

If true, each feature in the returned FeatureSet will be returned with a centroid. This property only applies to
queries against polygon FeatureLayers.

public System.Nullable<bool> ReturnCentroid { get; set; }

Property Value

System.Nullable<System.Boolean>

Remarks

Only supported with ArcGIS Online hosted services or ArcGIS Enterprise 10.6.1 services.

Query.ReturnDistinctValues Property

If true then the query returns distinct values based on the field(s) specified in outFields.

public System.Nullable<bool> ReturnDistinctValues { get; set; }

Property Value

System.Nullable<System.Boolean>

Remarks

For service-based queries, this parameter applies only if the supportsAdvancedQueries capability of the layer is
true.
Make sure to set returnGeometry to false when returnDistinctValues is true. Otherwise, reliable results will not be
returned.

Query.ReturnExceededLimitFeatures Property

If true, then all features are returned for each tile request, even if they exceed the maximum record limit per
query indicated on the service by maxRecordCount. If false, the tile request will not return any features if the
maxRecordCount limit is exceeded.
Default Value: true

public System.Nullable<bool> ReturnExceededLimitFeatures { get; set; }

Property Value

System.Nullable<System.Boolean>

Remarks

Only supported with ArcGIS Online hosted services or ArcGIS Enterprise 10.6 services.

Query.ReturnGeometry Property

If true, each feature in the returned FeatureSet includes the geometry.

public System.Nullable<bool> ReturnGeometry { get; set; }

Property Value

System.Nullable<System.Boolean>

Query.ReturnM Property

If true, and returnGeometry is true, then m-values are included in the geometry.

public System.Nullable<bool> ReturnM { get; set; }

Property Value

System.Nullable<System.Boolean>

Query.ReturnQueryGeometry Property

If true, the query geometry will be returned with the query results. It is useful for getting the buffer geometry
generated when querying features by distance or getting the query geometry projected in the outSpatialReference of
the query. The query geometry is returned only for client-side queries and hosted feature services and if the
layer’s capabilities.query.supportsQueryGeometry is true.

public System.Nullable<bool> ReturnQueryGeometry { get; set; }

Property Value

System.Nullable<System.Boolean>

Query.ReturnZ Property

If true, and returnGeometry is true, then z-values are included in the geometry.

public System.Nullable<bool> ReturnZ { get; set; }

Property Value

System.Nullable<System.Boolean>

Remarks

FeatureLayerView.queryFeatures(), GeoJSONLayerView.queryFeatures(), and OGCFeatureLayerView.queryFeatures() results
do not include the z-values when called in 2D MapView even if returnZ is set to true.

Query.SpatialRelationship Property

For spatial queries, this parameter defines the spatial relationship to query features in the layer or layer view
against the input geometry.

public System.Nullable<dymaptic.GeoBlazor.Core.Objects.SpatialRelationship> SpatialRelationship { get; set; }

Property Value

System.Nullable<SpatialRelationship>

Query.SqlFormat Property

This parameter can be either standard SQL92 standard or it can use the native SQL of the underlying datastore
native. See the ArcGIS REST API documentation for more information.

public System.Nullable<dymaptic.GeoBlazor.Core.Objects.SqlFormat> SqlFormat { get; set; }

Property Value

System.Nullable<SqlFormat>

Remarks

This property does not apply to layer view or CSVLayer queries.

Query.Start Property

The zero-based index indicating where to begin retrieving features. This property should be used in conjunction
with num. Use this to implement paging and retrieve “pages” of results when querying. Features are sorted ascending
by object ID by default.

public System.Nullable<int> Start { get; set; }

Property Value

System.Nullable<System.Int32>

Query.Text Property

Shorthand for a where clause using “like”. The field used is the display field defined in the services directory.

public string? Text { get; set; }

Property Value

System.String

Query.TimeExtent Property

A time extent for a temporal query against time-aware layers. For example, it can be used to discover all crimes
that occurred during the night shift from 10 PM to 6 AM on a particular date.

public dymaptic.GeoBlazor.Core.Objects.TimeExtent? TimeExtent { get; set; }

Property Value

TimeExtent

Query.Units Property

The unit for calculating the buffer distance when distance is specified in spatial queries. If units is not
specified, the unit is derived from the geometry spatial reference. If the geometry spatial reference is not
specified, the unit is derived from the feature service data spatial reference. For service-based queries, this
parameter only applies if the layer’s capabilities.query.supportsDistance is true.

public System.Nullable<dymaptic.GeoBlazor.Core.Objects.LinearUnit> Units { get; set; }

Property Value

System.Nullable<LinearUnit>

Query.UseViewExtent Property

Determines whether to use the view’s extent as the query geometry

public System.Nullable<bool> UseViewExtent { get; set; }

Property Value

System.Nullable<System.Boolean>

Query.Where Property

A where clause for the query.

public string? Where { get; set; }

Property Value

System.String