12 Sept 2024

QGIS3: Aggregate Over Layer with Expression Builder Using a Filter

array_sum(
	array_foreach(
		generate_series(0, layer_property('MY_LAYER', 'feature_count'), 1),
		if(attribute(get_feature_by_id('MY_LAYER', @element), 'MY_FIELD_TO_FILTER') = 'MY_FILTER_VALUE',		
			attribute(get_feature_by_id('MY_LAYER', @element), 'MY_FIELD_TO_AGGREGATE'),
			0
		)
	)
)
is the same as
aggregate(
	layer:='MY_LAYER',
	aggregate:='sum', 
	expression:="MY_FIELD_TO_AGGREGATE",
	filter:="MY_FIELD_TO_FILTER"='MY_FILTER_VALUE'
)

3 Jun 2024

Strava Heatmap in QGIS - working TMS 2024

TMS Source:
https://heatmap-external-a.strava.com/tiles-auth/ride/hot/{z}/{x}/{y}.png?Key-Pair-Id=LONGSTRING&Signature=LONGERSTRING
Get credentials with Chrome Plugin JOSM Strava Heatmap: