| | 675 | |
| | 676 | node[natural=tree][height][siunit_length(tag(height)) > 150] { |
| | 677 | throwWarning: tr("Unusually large value of {0} for a tree.", "{1.key}"); |
| | 678 | assertMatch: "node natural=tree height=\"200 m\""; |
| | 679 | assertMatch: "node natural=tree height=3100.0"; |
| | 680 | assertNoMatch: "node natural=tree height=9.7"; |
| | 681 | assertNoMatch: "node natural=tree height=\"5900 cm\""; |
| | 682 | assertNoMatch: "node natural=tree height=116 m"; /* Current world record "Hyperion" */ |
| | 683 | } |
| | 684 | |
| | 685 | node[natural=tree][diameter][diameter =~ /^-?[0-9]+(\.[0-9]+)?$/][diameter < 5] { |
| | 686 | throwWarning: tr("Unusually small value of {0} for a tree. Values for {0} without explicit unit are in millimeters.", "{1.key}"); |
| | 687 | assertMatch: "node natural=tree diameter=2"; |
| | 688 | assertNoMatch: "node natural=tree diameter=2 m"; |
| | 689 | assertNoMatch: "node natural=tree diameter=1000.0"; |
| | 690 | } |
| | 691 | |
| | 692 | node[natural=tree][diameter][diameter =~ /^[0-9]+(\.[0-9]+)?$/][diameter > 20000] { /* special case because siunit_length for unitless values */ |
| | 693 | throwWarning: tr("Unusually large value of {0} for a tree''s trunk. Use diameter_crown for crown diameter.", "{1.key}"); |
| | 694 | assertMatch: "node natural=tree diameter=44000.0"; |
| | 695 | assertNoMatch: "node natural=tree diameter=15900"; /* Current world record "Glencoe Baobab" */ |
| | 696 | } |
| | 697 | |
| | 698 | node[natural=tree][diameter][diameter =~ /m/][siunit_length(tag(diameter)) > 20] { |
| | 699 | throwWarning: tr("Unusually large value of {0} for a tree''s trunk. Use diameter_crown for crown diameter.", "{1.key}"); |
| | 700 | assertMatch: "node natural=tree diameter=\"25 m\""; |
| | 701 | assertNoMatch: "node natural=tree diameter=15.9 m"; /* Current world record "Glencoe Baobab" */ |
| | 702 | } |
| | 703 | |
| | 704 | node[natural=tree][diameter_crown][siunit_length(tag(diameter_crown)) > 100] { |
| | 705 | throwWarning: tr("Unusually large value of {0} for a tree.", "{1.key}"); |
| | 706 | assertMatch: "node natural=tree diameter_crown=\"121.2 m\""; |
| | 707 | assertNoMatch: "node natural=tree diameter_crown=80 m"; |
| | 708 | } |
| | 709 | No newline at end of file |