X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.district.network.ui%2Fsrc%2Forg%2Fsimantics%2Fdistrict%2Fnetwork%2Fui%2Fcontributions%2FChangeRoutePointToVertexHandler.java;fp=org.simantics.district.network.ui%2Fsrc%2Forg%2Fsimantics%2Fdistrict%2Fnetwork%2Fui%2Fcontributions%2FChangeRoutePointToVertexHandler.java;h=f9e37c088bc2751b8e9c339a66d312f1409df0df;hb=60c060751f037be8f1643656327799f70a3504b1;hp=edecb859791cee9a14488726e144cc32cb77879f;hpb=2826bfa9f5ab4e4a8cf552a196102b3947e071a0;p=simantics%2Fdistrict.git diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/contributions/ChangeRoutePointToVertexHandler.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/contributions/ChangeRoutePointToVertexHandler.java index edecb859..f9e37c08 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/contributions/ChangeRoutePointToVertexHandler.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/contributions/ChangeRoutePointToVertexHandler.java @@ -159,21 +159,10 @@ public class ChangeRoutePointToVertexHandler { double y = finalClosestPoint.getY(); double[] midVertexCoords = new double[] { x, y }; - double elevation = 0; - if (MapsElevationServerPreferences.useElevationServer()) { - // ok! we use new elevation API to resolve possible elevations for the starting points - try { - elevation = SingletonTiffTileInterface.lookup(x, y).doubleValue(); - } catch (Exception ee) { - LOGGER.error("Could not get elevation from tiff interface", ee); - } - } - - Resource createdVertex = DistrictNetworkUtil.createVertex(graph, diagram, midVertexCoords, elevation, mapping); + Resource createdVertex = DistrictNetworkUtil.createVertex(graph, diagram, midVertexCoords, Double.MAX_VALUE, mapping); - Optional leftEdge = DNEdgeBuilder.create(graph, diagram, currentStartVertexCoords, 0, midVertexCoords, 0, detailedLeftEdgeGeometryCoords, 0.001); - Optional rightEdge = DNEdgeBuilder.create(graph, diagram, midVertexCoords, 0, currentEndVertexCoords, 0, detailedRightEdgeGeometryCoords, 0.001); - + Optional leftEdge = DNEdgeBuilder.create(graph, diagram, currentStartVertexCoords, Double.MAX_VALUE, midVertexCoords, Double.MAX_VALUE, detailedLeftEdgeGeometryCoords, 0.001); + Optional rightEdge = DNEdgeBuilder.create(graph, diagram, midVertexCoords, Double.MAX_VALUE, currentEndVertexCoords, Double.MAX_VALUE, detailedRightEdgeGeometryCoords, 0.001); } } });