question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

optionally hit worker even if some sources didn't hold data for the tile

See original GitHub issue

Per this code:

for (var i = 0; i < results.length; i++) {
  data[sources[i].name] = results[i];
  if (!results[i]) return process.send({reduce: true});
}

the worker bails out and returns a reduce event if any source doesn’t have data for the requested tile. This is usually great, but in some cases where you want to compare disparate data sources and are relying on reduce events to send back information about how much data each source does or doesn’t exist in a tile, you end up losing information.

For example, if I want to find the length of roads in San Francisco that are matched by GPS datapoints. I would like to keep a tally of the total length of road in the bbox, as well as how much is matchable by GPS points. Right now, if there is no GPS data in the tile, we bail out, so I’m missing some of the total length information.

To maintain compatibility and provide optimization for the usual cases where you want this bail-out behavior, I’m proposing we add a tile-reduce option for this, maybe requireAllSources: false (defaulted true).

cc @morganherlocker @aaronlidman @mourner

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tcqlcommented, Apr 27, 2016

bump. any further thoughts here? I’m fine with having 3 modes per @morganherlocker’s

val state
requireData:'all' all sources must have data (current default)
requireData:'any' at least 1 source must have data
requireData:'none' function is called even on empty tiles

@mourner @aaronlidman

0reactions
iandeescommented, Feb 10, 2022

Hello from the future! I am running into this today and would also love to have this feature. I’m hacking in a workaround for now, but excited for #110.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · mapbox/tile-reduce - GitHub
Contribute to mapbox/tile-reduce development by creating an account on GitHub. ... optionally hit worker even if some sources didn't hold data for the...
Read more >
Tile Permission Settings
To help ensure you can find items when they are lost, the Tile app will collect location data even when the app is...
Read more >
Vector tile search API | Elasticsearch Guide [8.5] | Elastic
(Optional, integer or Boolean) Number of hits matching the query to count accurately. Defaults to 10000 . If true , the exact number...
Read more >
Troubleshooting tile errors - Power BI - Microsoft Learn
This issue could happen if the data source was removed, renamed, moved, offline, or permissions have changed. Check that the source is still...
Read more >
UNITED STATES DISTRICT COURT DISTRICT OF MINNESOTA ...
A Store Manager oversees each of The Tile Shop's retail locations. (Id. at ¶ 5.) Store Managers “regularly direct the work of all...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found