Changeset 35978 in osm for applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap
- Timestamp:
- 2022-06-15T20:10:48+02:00 (3 years ago)
- Location:
- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationHelper.java
r35964 r35978 109 109 110 110 // get distance in meters and divide it by 100 in advance 111 double distInMeter = w1.greatCircleDistance( w2) / 100.0;111 double distInMeter = w1.greatCircleDistance((ILatLon) w2) / 100.0; 112 112 113 113 // get elevation (difference) -
applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/EleVertex.java
r35165 r35978 6 6 import java.util.List; 7 7 8 import org.openstreetmap.josm.data.coor.ILatLon; 8 9 import org.openstreetmap.josm.data.coor.LatLon; 9 10 import org.openstreetmap.josm.plugins.elevation.ElevationHelper; … … 41 42 42 43 // compute the (approx.!) area of the vertex using heron's formula 43 double a = p1.greatCircleDistance( p2);44 double b = p2.greatCircleDistance( p3);45 double c = p1.greatCircleDistance( p3);44 double a = p1.greatCircleDistance((ILatLon) p2); 45 double b = p2.greatCircleDistance((ILatLon) p3); 46 double c = p1.greatCircleDistance((ILatLon) p3); 46 47 47 48 double s = (a + b + c) / 2D; … … 55 56 int k = 0; 56 57 for (int i = 0; i < points.length; i++) { 57 EleCoordinatec1 = points[i];58 ILatLon c1 = points[i]; 58 59 59 60 for (int j = i + 1; j < points.length; j++) { 60 EleCoordinatec2 = points[j];61 ILatLon c2 = points[j]; 61 62 edges[k++] = new TriangleEdge(i, j, c1.greatCircleDistance(c2)); 62 63 } … … 119 120 120 121 double z = (c1.getEle() + c2.getEle()) / 2.0; 121 if (c1.greatCircleDistance( c2) > MIN_DIST) {122 if (c1.greatCircleDistance((ILatLon) c2) > MIN_DIST) { 122 123 double hgtZ = ElevationHelper.getSrtmElevation(new LatLon(y, x)); 123 124
Note:
See TracChangeset
for help on using the changeset viewer.