import org.simantics.g2d.diagram.DiagramHints;
import org.simantics.g2d.diagram.IDiagram;
import org.simantics.g2d.element.ElementClass;
import org.simantics.g2d.diagram.DiagramHints;
import org.simantics.g2d.diagram.IDiagram;
import org.simantics.g2d.element.ElementClass;
import org.simantics.g2d.element.IElement;
import org.simantics.g2d.element.handler.impl.StaticObjectAdapter;
import org.simantics.g2d.layers.ILayersEditor;
import org.simantics.g2d.element.IElement;
import org.simantics.g2d.element.handler.impl.StaticObjectAdapter;
import org.simantics.g2d.layers.ILayersEditor;
Resource startVertex = graph.getSingleObject(edgeResource, DN.HasStartVertex);
Resource endVertex = graph.getSingleObject(edgeResource, DN.HasEndVertex);
Resource startVertex = graph.getSingleObject(edgeResource, DN.HasStartVertex);
Resource endVertex = graph.getSingleObject(edgeResource, DN.HasEndVertex);
double startLat = ModelledCRS.latitudeToY(startCoords[1]) * scale;
double[] endCoords = graph.getRelatedValue2(endVertex, DIA.HasLocation);
double startLat = ModelledCRS.latitudeToY(startCoords[1]) * scale;
double[] endCoords = graph.getRelatedValue2(endVertex, DIA.HasLocation);
double endLon = ModelledCRS.longitudeToX(endCoords[0]) * scale;
double endLat = ModelledCRS.latitudeToY(endCoords[1]) * scale;
double endLon = ModelledCRS.longitudeToX(endCoords[0]) * scale;
double endLat = ModelledCRS.latitudeToY(endCoords[1]) * scale;