this necessary when a regional preset (e.g. from NSI) is supposed to inherit fields from a parent preset, but the direct parent does NOT apply at the location of the entity to be added/edited. In that case we need to search for a potential regional variant of the parent preset.
For example, when a feature tagged as `highway=primary` (line preset) and `man_made=bridge` (area preset) is mapped as an unclosed way, converting it to an area (by closing the way by connecting the endpoints) does not improve the situation, as then the other tag doesn't fit to the geometry anymore.
closes#7037
This was taking a lot of time at app startup.
Instad now we resolve and index only the include and exclude parts.
We can still determine the valid locationSets at runtime in `locationSetsAt()`
by checking the `_locationIncludedIn` and `_locationExcludedIn` caches.
This also upgrades the locationManger to an ES6 class.
This also includes some hacky code in nsi.js so that the NSI will continue to work.
The NSI matcher can build its own location index, but it doesn't need to do this.
We monkeypatch a few of the matcher collections to work with the new LocationManager.
Consolidate localization behavior and init to a coreLocalizer function and singleton
Explicitly support `en-US` locale
Rename coreData to coreFileFetcher and export a singleton rather than using a property of coreContext
Add `apiConnections` property of coreContext to simplify adding a source switcher
Replace some init functions with re-callable, promise-supporting `ensureLoaded` functions
Make coreContext itself load the UI if a container has been specified at init time
Fix code tests
- preset data is no longer bundled into iD.js
- some code pathways commented out re: external presets
- many changes so that tests can run without presets at start, or async
- still need to make sure fallbacks are always there (point, line, area, etc)
(closes#6933)
We should not be adding unsearchable junction presets for every kind of
junction as a hacky workaround to let `junction=yes` be an area.
This should remove the special treatment of junction tag.
* `junction=*` will not be treated as an area by default
* `junction=*` will not trigger validator warnings that they should be closed
* `junction=yes` mapped as an area _will_ need an `area=yes` now, which iD will add
(afaik this is the only junction tag that should be treated as an area)
Delete nodes that can only be vertices when deleting parent ways (close#6230)
Allow snapping ways to nodes that cannot be positively identified as vertex-only