Commit Graph

41 Commits

Author SHA1 Message Date
Kyℓe Hensel ef88e1c7ca fix destination_sign relations not updated when splitting a way (#10646) 2025-02-17 11:46:42 +01:00
Martin Raifer f3a985f78b ways with more than 2000 nodes: prevent lockup and provide validator-fix (#8808)
* add validation & fix for way vertices limit imposed by OSM API (try to choose splitting locations at existing intersection vertices if possible)
* fix splitting of closed ways at two or more nodes:
  this bug resulted sometimes in one extra split point in the result, or one of the split  vertices to be left unsplit
2025-02-11 20:08:38 +01:00
Martin Raifer 20f53e5748 document algorithm inline, handle "junction=circular" like roundabouts 2024-03-06 13:46:22 +01:00
Martin Raifer d7aca27f41 minor code readibility refactoring 2024-03-05 17:20:04 +01:00
Martin Raifer 296ce859cf allow splitting of closed roundabout for certain rel types 2024-03-05 14:23:02 +01:00
Martin Raifer 13d46b0578 typo 2024-03-04 23:37:29 +01:00
Martin Raifer 82af60115d disalow splitting of closed roundabouts when they are part of a route
these cases are not covered by the splitting algorithm at the moment:
* typicall, only a part of the roundabout should be part of the resulting route
* when multiple routes meet at a roundabout coming from different angles, the roundabout must be split at any of those entry/exit point simutaneously, such that all routes remain correct

as a workaround, a mapper can remove the route relation(s) from the roundabout, split it accordingly and then re-add the respective parts to the relation(s) again.
2024-03-04 19:02:33 +01:00
Martin Raifer 7268a8538c handle closed roundabout ways like a single junction "point" 2024-03-04 19:02:32 +01:00
Martin Raifer 088db7ccc1 simplify boolean conditions 2024-03-04 19:02:32 +01:00
Martin Raifer 11dfbe804c fix splitting of (route) relation member ways
instead of fully re-sorting the whole relation every time a member is split, perform a local operation: This works under the assumption that the relation is already sorted properly. The new way is inserted into the relation before or after the existing member, depending on how the old/new way connect to their neighboring members.

for cases where two ways form a loop, a additional look-ahead is implemented to disambiguate the order
2024-03-04 19:02:31 +01:00
Martin Raifer 97442403cf drop validator which checks for old style multipolygons
these have long been [fixed](https://blog.jochentopf.com/2017-08-28-polygon-fixing-effort-concluded.html) in OSM

see wiki: https://wiki.openstreetmap.org/wiki/Old_style_multipolygons
2024-02-29 13:28:22 +01:00
Martin Raifer 41aa127d23 reduce use of parseFloat
as it silently strips non-numeric suffixes (e.g. a value of "123 foo" is transformed into a numeric value of 123 by `parseFloat`, which is typically not what we desire)
2022-11-24 19:39:15 +01:00
Quincy Morgan d43fc62994 Divide up the step_count tag value proportionally when splitting ways (close #8069) 2020-10-09 09:48:52 -04:00
Quincy Morgan 476e929eec Support splitting areas at nodes connected to lines if the lines can't be split (close #6047) 2020-09-29 15:49:42 -04:00
Quincy Morgan c940d827e6 Enable the Split operation for multiple selected nodes (close #7990) 2020-09-24 15:13:05 -04:00
Quincy Morgan 5ddcfb0ced Add parameter to specify which way should keep the history when splitting ways (re: #7795)
Fix code tests
2020-09-14 11:27:20 -04:00
Quincy Morgan 99c75b8f65 Keep the way history on the longer result when splitting a way (close #7795) 2020-09-14 10:01:47 -04:00
Quincy Morgan 5640d7867a Simplify some "add bridge or tunnel" fix code (re: #7055)
Add endpoint to actionSplit to get the created ways after running the action
Change "Use bridge" or "tunnel" fix labels to "Add a bridge" or "tunnel"
Add layer tags on structure feature when adding a bridge or tunnel via a fix
Select all components of the split way when adding a bridge or tunnel via a fix
Don't recommend adding a bridge to a waterway
Don't show "change layers" fixes along with "add structure" fixes
Don't split or change the tags of coincident ways when adding a bridge or tunnel
2019-11-20 13:09:27 -05:00
Bryan Housel a72865e4d8 Treat anything with a from/via/to like a restriction
(closes #6221)

Applies to actions like splitting, connecting, extracting a via node, etc
2019-04-29 21:58:10 -04:00
Quincy Morgan d01bb78707 Reduce circular dependencies caused by importing from indexes, the location of the validation models, and the location of areaKeys (close #6237) 2019-04-24 13:45:59 -07:00
Bryan Housel 8d210e8adb Remove lodash indexOf
(re: 6087)
2019-03-27 09:45:53 -04:00
Bryan Housel 5e1ff74199 Replace lodash difference, intersects, union
(re: 6087)
2019-03-27 01:22:11 -04:00
Bryan Housel 7a6c63fcc5 Remove lodash extend (re: #6087) 2019-03-23 00:38:39 -04:00
Bryan Housel 7e6f68a1b2 Remove lodash some
(re: #6087)
2019-03-23 00:07:52 -04:00
Quincy Morgan 9785021f44 Rename simpleMultipolygon functions to oldMultipolygon
Return old_multipolygon validation issues for the relations as well as the outer ways
Remove console logging
Don't run missing_tag validation for relations with old_multipolygon issues
2019-02-01 15:19:28 -05:00
Bryan Housel f8bbb995ac Properly split ways which are members of a via way turn restriction
(closes #4861)
2018-03-10 15:20:20 -05:00
Bryan Housel c1378a141f Add support for complex intersection and via way restrictions 2018-02-02 19:58:09 -05:00
Bryan Housel be46e85ec0 Move insert way pairing code from osmJoinWays to actionAddMember
(tests for actionAddMember now passing!)
2018-01-16 17:41:14 -05:00
Bryan Housel 221158e918 WIP: Add insertHint to actionAddMember, actionSplit 2018-01-15 23:13:59 -05:00
Bryan Housel 03fa6e7be9 Add tryInsert option to osmJoinWays 2018-01-15 22:02:43 -05:00
Bryan Housel a98f57cdcb Convert lodah-es and d3 to named imports for actions 2017-09-24 21:06:52 -04:00
Bryan Housel 01bfc67ea5 After splitting a way, update all matching relation members
(closes #4140)
2017-07-10 18:35:30 -04:00
Bryan Housel f50e80d0b5 Refactor Intersection, Multipolygon from geo to osm 2016-10-11 23:09:27 -04:00
Bryan Housel 07fa5fcc34 Refactor Entity, Node, Relation, Tags, Way from core to osm 2016-10-11 22:41:24 -04:00
Bryan Housel 0d0e54fdff Fix more namespaces that were missed in the first pass 2016-10-04 21:15:30 -04:00
Bryan Housel 3102a4ae6a Rename all the things to include pseudonamespaces 2016-10-04 19:06:20 -04:00
Tom MacWright 604d1e2719 import lodash (#3257) 2016-07-19 12:04:16 -04:00
Kushan Joshi 39c82af158 Sort modules [eslint rule] 2016-07-06 12:12:08 +05:30
Kushan Joshi 74028b8f16 add external imports to actions 2016-06-18 01:47:04 +05:30
Tom MacWright 9e03edc493 Start inter-requiring actions 2016-06-14 09:09:44 -04:00
Tom MacWright 266504d4e2 Baby steps mode 2016-06-06 16:54:24 -04:00