package org.simantics.district.network.ui.adapters;
import java.awt.geom.Path2D;
+import java.awt.geom.Point2D;
import org.simantics.db.AsyncReadGraph;
import org.simantics.db.ReadGraph;
import org.simantics.g2d.diagram.DiagramHints;
import org.simantics.g2d.diagram.IDiagram;
import org.simantics.g2d.element.ElementClass;
+import org.simantics.g2d.element.ElementUtils;
import org.simantics.g2d.element.IElement;
import org.simantics.g2d.element.handler.impl.StaticObjectAdapter;
import org.simantics.g2d.layers.ILayersEditor;
+import org.simantics.maps.MapScalingTransform;
public class DistrictNetworkEdgeElementFactory extends SyncElementFactory {
Resource startVertex = graph.getSingleObject(edgeResource, DN.HasStartVertex);
Resource endVertex = graph.getSingleObject(edgeResource, DN.HasEndVertex);
-
+
// TODO: fix scale..
double scale = 100000;
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;