perliedman/geojson-path-finder

edgeDataReduceFn Example

Opened this issue · 2 comments

Could you share an example on how to use edgeDataReduceFn. I have street names and other properties on my geojson but I cannot seem to get the edgeDataReduceFn function to work properly. I would appreciate any working example. Thanks!

Hi, sorry for a late reply.

I have no example at the moment, and don't really have the time or energy to make one at the moment, but this is a good idea, so I'd like to keep this issue open to remind me to add this at some point in the future!

For anyone coming here from Google: I figured out that the edgeDataReduceFn acts both as an accumulator and a combiner in the reduction operation, i.e. the right operand is either GeoJsonProperties, or a result of a previous reduction.

Hopefully someone will spend less hours trying to figure it out now.