Open scd opened 11 years ago
Isn't this impossible? When a childs location is set outside doesn't this automatically expand the bbox? The check would be nice to the actual shape thought, or is this what you meant?
Actually what I meant was the outside the drawn boundary. Actually it is impossible to be outside the cascaded bounded box, but not the bounded box of the boundary - two different boxes managed internally (from memory).
@brendanheywood here is a snippet of the logic for the auto reparenting if it were run on prod...
- reparent Crag node 'Gyeoryong-san' [942178044] to parent Crag node 'Bagaji Bawi' [272358807].
- reparent Gym node 'Gordon College Rock Gym at Bennett Recreation Center' [1649758761] to parent Crag node 'Boston' [11905957].
- reparent Gym node 'MetroRock #2' [1649758407] to parent Crag node 'Boston' [11905957].
- reparent Gym node 'Red Rock Climbing Center' [1649794062] to parent Crag node 'Las Vegas' [292588191].
- reparent Crag node 'Bilecik' [11751283] to parent Crag node 'Golpazari' [433454022].
- reparent Crag node 'Ettalong' [11770093] to parent Crag node 'Umina' [11770141].
- reparent Gym node 'Wheat Ridge Recreation Center' [1649697669] to parent Area node 'Denver' [11896285].
- reparent Gym node 'Buchanan Park Recreation Center' [1649689560] to parent Area node 'Denver' [11896285].
- reparent Gym node 'Kletterwelt Sauerland KG' [1606401111] to parent Region node 'Sauerland' [424541589].
- reparent Crag node 'Pointe de la Touffe' [14004961] to parent Crag node 'La Restonica' [14004889].
- reparent Gym node 'Outdoorfriend - Kletteranlage in der Apenke' [1606412736] to parent Crag node 'Oberharz' [265253628].
- reparent Gym node 'Provo Recreation Center' [1649881740] to parent Region node 'Wasatch Front' [11899069].
- reparent Gym node 'Miramont Lifestyle Fitness Climbing Wall' [1649691204] to parent Area node 'Fort Collins' [11896213].
- reparent Gym node 'Western State College Climbing Gym' [1649694564] to parent Region node 'South Central Colorado' [11896405].
- reparent Gym node 'Gypsum Rec Center Climbing Pinnacle' [1649696115] to parent Area node 'North Central Mountains' [11896357].
- reparent Gym node 'Mountain Gear' [1649902839] to parent Region node 'Eastern Washington' [11896813].
- reparent Gym node 'Santa Fe Climbing Center' [1649807127] to parent Region node 'Santa Fe' [11903677].
- reparent Gym node 'Summit Fitness Center' [1649869371] to parent Area node 'Austin' [11903245].
- reparent Gym node 'Phoenix Rock Gym' [1649653806] to parent Region node 'Phoenix' [11903029].
- reparent Gym node 'Momentum Indoor Climbing' [1649878272] to parent Region node 'Wasatch Front' [11899069].
- reparent Gym node 'Solid Rock Gym' [1649664153] to parent Region node 'San Diego Area' [11895421].
- reparent Crag node 'Victoria Falls' [12013627] to parent Crag node 'Ikara, Victorialand, Odin Head, Thor Head' [12013603].
- reparent Gym node 'Crux Climbing Center' [1649876298] to parent Area node 'Austin' [11903245].
- reparent Gym node 'Cirque Climbing Gym' [1649900256] to parent Crag node 'Olympia' [11896645].
- reparent Gym node 'Climbmax' [1649654196] to parent Region node 'Phoenix' [11903029].
- reparent Gym node 'Klettercenter Rotpunkt Tribuswinkel' [1649263077] to parent Region node 'Wienerwald (IV)' [791323062].
- reparent Gym node 'Kletterzentrum Brunek' [1663045995] to parent Region node 'Val Pusteria' [12521023].
Stats
StatusQuoBoulderInName: 290
StatusQuoReparentingIntoMovingParent: 16
StatusQuo: 4497
ReparentUncle: 0
Targets: 4812
StatusQuoRegionAreaType: 486
StatusQuoSiblingHasDirectRoutes: 2673
StatusQuoMultipleSiblingMatches: 1258
StatusQuoNotInFence: 4067
Reparent: 299
StatusQuoInTestArea: 140
Just a quick thought on this topic: it would be good if we could run the script with a soft threshold, maybe as a % deviation of the parents bbox. This would allow us to set a simple goal of fixing all the gross errors where say a child area is on the wrong side of the world to it's parent, but won't match more gray errors like a crag which only partially overlaps it's parent. The soft % threshold could fail purely based on bbox.
But the full result of this report should be strictly what area's boundaries are outside their parents boundaries. It can use the non-cascaded bbox as a faster test first but even if the bboxes are contained we still want to do the stricter test. This will also find all the areas which are located but whose parents don't have any location. This seems valid to me and we should fix these too. These would fail regardless of the soft % threshold, so in a way these are higher priority.
Test cases:
https://www.thecrag.com/climbing/united-states/california/maps#33.664269,-117.711095,8,,terrain