osm import (long,lat) <-> (x,y)

- previously was (long,lat) <-> (y,x), this one makes more sens
This commit is contained in:
philippe lhardy
2020-12-12 12:13:46 +01:00
parent 99d9aeb242
commit 71a1715094

View File

@@ -9,7 +9,6 @@ import org.artisanlogiciel.osm.Way;
import java.awt.*;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.List;
@@ -17,6 +16,10 @@ import java.util.List;
/**
* Take a way with resolved ref ( ie with NodeRef having non null getNode() )
* and create a Drawing from it.
*
* longitude will be x axis
* latitude will be y axis
*
*/
public class OsmToDrawing {
@@ -89,7 +92,7 @@ public class OsmToDrawing {
boundserror ++;
System.err.println("lon > minlon " + lon);
}
drawingLine.addPoint(new Point((int) ( (lat - refx)* mulx ) , (int) ( (lon - refy ) * muly) ));
drawingLine.addPoint(new Point((int) ( (lon - refy ) * muly), (int) ( (lat - refx)* mulx ) ));
}
return drawingLine;
}