Changeset 35976 in osm for applications/editors/josm/plugins/public_transport
- Timestamp:
- 2022-06-14T20:11:21+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/public_transport/src/org/openstreetmap/josm/plugins/public_transport/actions/RoutePatternAction.java
r34718 r35976 1868 1868 if ("backward".equals(itineraryData.getValueAt(i, 1))) { 1869 1869 for (int j = way.getNodesCount() - 2; j >= 0; --j) { 1870 SegmentMetric sm = new SegmentMetric(way.getNode(j + 1). getCoor().lat(),1871 way.getNode(j + 1). getCoor().lon(),1872 way.getNode(j). getCoor().lat(), way.getNode(j).getCoor().lon(),1870 SegmentMetric sm = new SegmentMetric(way.getNode(j + 1).lat(), 1871 way.getNode(j + 1).lon(), 1872 way.getNode(j).lat(), way.getNode(j).lon(), 1873 1873 distance); 1874 1874 segmentMetrics.add(sm); … … 1877 1877 } else { 1878 1878 for (int j = 0; j < way.getNodesCount() - 1; ++j) { 1879 SegmentMetric sm = new SegmentMetric(way.getNode(j). getCoor().lat(),1880 way.getNode(j). getCoor().lon(),1881 way.getNode(j + 1). getCoor().lat(),1882 way.getNode(j + 1). getCoor().lon(), distance);1879 SegmentMetric sm = new SegmentMetric(way.getNode(j).lat(), 1880 way.getNode(j).lon(), 1881 way.getNode(j + 1).lat(), 1882 way.getNode(j + 1).lon(), distance); 1883 1883 segmentMetrics.add(sm); 1884 1884 distance += sm.length; … … 1894 1894 private StopReference detectMinDistance(Node node, Vector<SegmentMetric> segmentMetrics, 1895 1895 boolean rhsPossible, boolean lhsPossible) { 1896 if (node == null || node.getCoor() == null)1896 if (node == null || !node.isLatLonKnown()) 1897 1897 return null; 1898 1898 … … 1900 1900 double position = -1.0; 1901 1901 double distance = 180.0; 1902 double lat = node. getCoor().lat();1903 double lon = node. getCoor().lon();1902 double lat = node.lat(); 1903 double lon = node.lon(); 1904 1904 1905 1905 int curIndex = -2;
Note:
See TracChangeset
for help on using the changeset viewer.