GetLayerHistogramParams
Last updated
Was this helpful?
Last updated
Was this helpful?
The params used to request a histogram of values from a layer, passed to the method.
layerId:
string
attribute:
string
steps:
number
[] | {type
:"equal-intervals"
;count
:number
; } | {type
:"time-interval"
;interval
:"hour"
|"day"
|"week"
|"month"
|"year"
; }
optional
values: {boundary
: [number
,number
][] | [number
,number
,number
,number
] | {type
:"Polygon"
;coordinates
: [number
,number
][][]; } | {type
:"MultiPolygon"
;coordinates
: [number
,number
][][][]; };filters
:null
|boolean
| [null
|string
,"in"
|"ni"
,null
| (null
|string
|number
|boolean
)[]] | [null
|string
,"lt"
|"gt"
|"le"
|"ge"
|"eq"
|"ne"
|"cn"
|"nc"
|"is"
|"isnt"
,null
|string
|number
|boolean
] | ;aggregation
: {method
:"avg"
|"max"
|"min"
|"sum"
|"median"
;attribute
:string
; }; }
Configuration for filtering and aggregating values while preserving the full set of bin ranges in the results.
This is particularly useful when you want to compare different subsets of data while maintaining consistent ranges. For example:
Use the same height ranges for comparing old vs new buildings
Unlike top-level filters which affect both what ranges appear AND their values, filters in this configuration only affect the values while keeping all possible ranges in the results.
boundary
?
[number
, number
][] | [number
, number
, number
, number
] | { type
: "Polygon"
; coordinates
: [number
, number
][][]; } | { type
: "MultiPolygon"
; coordinates
: [number
, number
][][][]; }
-
-
filters
?
-
-
aggregation
?
{ method
: "avg"
| "max"
| "min"
| "sum"
| "median"
; attribute
: string
; }
-
-
aggregation.method
"avg"
| "max"
| "min"
| "sum"
| "median"
AggregateMethodSchema
The operation to use on the values from the features in the layer
aggregation.attribute
string
-
The attribute to use for the aggregation. This must be a numeric attribute.
Attribute filters for the features to include when calculating the histogram bins.
The spatial boundary for the features to include when calculating the histogram bins.
null
| boolean
| [null
| string
, "in"
| "ni"
, null
| (null
| string
| number
| boolean
)[]] | [null
| string
, "lt"
| "gt"
| "le"
| "ge"
| "eq"
| "ne"
| "cn"
| "nc"
| "is"
| "isnt"
, null
| string
| number
| boolean
] |
optional
filters:
optional
boundary: