mgConfig = ({
edgeWeight: "time",
travelType: "walk",
maxEdgeWeight: "1800",
multiGraphReferencedStatisticIds: { wStats: statisticId },
multiGraphAggregationType: "none",
multiGraphAggregationInputParameters: {
wGrav: {},
wStats: {},
wStatsAgg: {}
},
multiGraphPreAggregationPipeline: {
wGrav: {
type: "gravitation_huff",
minSourcesCount: "1",
maxResultValueRatio: 1,
ignoreOutliers: true,
gravitationExponent: "-2.5",
probabilityDecay: 0.001,
aggregationInputParameters: sources.reduce((acc, cur) => {
acc[cur.id] = {
gravitationAttractionStrength: 1,
gravitationPositiveInfluence: cur.positive
};
return acc;
}, {})
},
wStatsAgg: {
type: "math",
mathExpression: "{wGrav} * {wStats}",
aggregationInputParameters: { wGrav: {}, wStats: {} }
}
},
multiGraphLayerGeometryDetailPerTile: "5",
multiGraphLayerMinGeometryDetailLevel: "5",
multiGraphLayerMaxGeometryDetailLevel: "25",
multiGraphLayerType: "identity",
multiGraphDomainType: "statistic_geometry",
multiGraphDomainEdgeAggregationType: "max",
multiGraphDomainStatisticGroupId: statisticGroup,
multiGraphSerializationFormat: "geojson",
multiGraphSerializationMaxGeometryCount: 100000,
serviceKey: targomoKey(),
serviceUrl: "https://api.targomo.com/westcentraleurope",
multiGraphAggregationIgnoreOutliers: true,
sources: sources.map(({ x, y, id }) => {
return { x, y, id };
})
})