summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
8958c9b)
gitlab #3
Change-Id: I36b5f67821079d91f7f75d3dc9bda79d83149c8e
} else {
coords = new double[] { xCoord, yCoord };
}
} else {
coords = new double[] { xCoord, yCoord };
}
+
+ // Switch to (longitude, latitude)
+ flipAxes(coords);
+
Resource vertex = DistrictNetworkUtil.createVertex(graph, model.getParentDiagram(), coords, model.getComponentMappings().get(mappingValue));
writeStringValue(graph, row, idColumn, vertex, DN.HasId);
Resource vertex = DistrictNetworkUtil.createVertex(graph, model.getParentDiagram(), coords, model.getComponentMappings().get(mappingValue));
writeStringValue(graph, row, idColumn, vertex, DN.HasId);
startCoords = new double[] { startXCoord , startYCoord };
endCoords = new double[] { endXCoord , endYCoord };
}
startCoords = new double[] { startXCoord , startYCoord };
endCoords = new double[] { endXCoord , endYCoord };
}
+
+ // Switch to (longitude, latitude)
+ flipAxes(startCoords);
+ flipAxes(endCoords);
+
Resource edge = DNEdgeBuilder.create(graph, vv, model.getParentDiagram(), model.getComponentMappings().get(mappingValue), startCoords, endCoords, padding, true);
writeStringValue(graph, row, idColumn, edge, DN.HasId);
Resource edge = DNEdgeBuilder.create(graph, vv, model.getParentDiagram(), model.getComponentMappings().get(mappingValue), startCoords, endCoords, padding, true);
writeStringValue(graph, row, idColumn, edge, DN.HasId);
+
+ private static void flipAxes(double[] coords) {
+ double tmp = coords[0];
+ coords[0] = coords[1];
+ coords[1] = tmp;
+ }
+
private static void writeValue(WriteGraph graph, CSVRecord row, int index, Resource subject, Resource relation) throws DatabaseException {
private static void writeValue(WriteGraph graph, CSVRecord row, int index, Resource subject, Resource relation) throws DatabaseException {
String stringValue = row.get(index);
if (!stringValue.isEmpty()) {
try {
String stringValue = row.get(index);
if (!stringValue.isEmpty()) {
try {