Changeset 8320 in josm
- Timestamp:
- 2015-05-04T19:05:13+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Way.java
r8291 r8320 685 685 686 686 /** 687 * Replies the length of the longest segement of the way, in metres, as computed by {@link LatLon#greatCircleDistance}. 688 * @return The length of the segment, in metres 689 * @since 4138 690 */ 691 public double getLongestSegmentLength() { 692 double length = 0; 693 Node lastN = null; 694 for (Node n:nodes) { 695 if (lastN != null) { 696 LatLon lastNcoor = lastN.getCoor(); 697 LatLon coor = n.getCoor(); 698 if (lastNcoor != null && coor != null) { 699 double l = coor.greatCircleDistance(lastNcoor); 700 if (l > length) { 701 length = l; 702 } 703 } 704 } 705 lastN = n; 706 } 707 return length; 708 } 709 710 /** 687 711 * Tests if this way is a oneway. 688 712 * @return {@code 1} if the way is a oneway, -
trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
r8126 r8320 40 40 import org.openstreetmap.josm.data.validation.tests.InternetTags; 41 41 import org.openstreetmap.josm.data.validation.tests.Lanes; 42 import org.openstreetmap.josm.data.validation.tests.LongSegment; 42 43 import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker; 43 44 import org.openstreetmap.josm.data.validation.tests.MultipolygonTest; … … 125 126 InternetTags.class, // 3300 .. 3399 126 127 ApiCapabilitiesTest.class, // 3400 .. 3499 128 LongSegment.class, // 3500 .. 3599 127 129 }; 128 130
Note:
See TracChangeset
for help on using the changeset viewer.