* String str = formatValue(val);
*/
// TODO: fix scale
- double scale = 100000;
-// double scale = 1;
- double startLat = ModelledCRS.yToLatitude(start.getY() / scale);
- double startLon = ModelledCRS.xToLongitude(start.getX() / scale);
+ double scaleY = getTransform().getScaleY();
+ double scaleX = getTransform().getScaleX();
- double endLat = ModelledCRS.yToLatitude(end.getY() / scale);
- double endLon = ModelledCRS.xToLongitude(end.getX() / scale);
+ double startLat = ModelledCRS.yToLatitude(-start.getY() / scaleY);
+ double startLon = ModelledCRS.xToLongitude(start.getX() / scaleX);
+
+ double endLat = ModelledCRS.yToLatitude(-end.getY() / scaleY);
+ double endLon = ModelledCRS.xToLongitude(end.getX() / scaleX);
double[] startCoords = new double[] { startLon, startLat };
double[] endCoords = new double[] { endLon, endLat };
@Override
public void perform(WriteGraph graph) throws DatabaseException {
- builder.create(graph, startCoords, endCoords, padding / scale);
+ builder.create(graph, startCoords, endCoords, 1 / padding);
}
});