x is longitude y is latitude
and y axis is reversed in maze ( (0,0) is upper left square of maze ). Signed-off-by: philippe lhardy <philippe.lhardy@astrolabe.coop>
This commit is contained in:
@@ -37,9 +37,10 @@ public class OsmToDrawing {
|
|||||||
|
|
||||||
public OsmToDrawing(OsmReader reader, int mulx, int muly)
|
public OsmToDrawing(OsmReader reader, int mulx, int muly)
|
||||||
{
|
{
|
||||||
this.refx = reader.getMinlat();
|
this.refx = reader.getMinlon();
|
||||||
|
this.refy = reader.getMaxlat();
|
||||||
|
|
||||||
this.minlat = reader.getMinlat();
|
this.minlat = reader.getMinlat();
|
||||||
this.refy = reader.getMinlon();
|
|
||||||
this.minlon = reader.getMinlon();
|
this.minlon = reader.getMinlon();
|
||||||
this.maxlat = reader.getMaxlat();
|
this.maxlat = reader.getMaxlat();
|
||||||
this.maxlon = reader.getMaxlon();
|
this.maxlon = reader.getMaxlon();
|
||||||
@@ -92,7 +93,7 @@ public class OsmToDrawing {
|
|||||||
boundserror ++;
|
boundserror ++;
|
||||||
System.err.println("lon > minlon " + lon);
|
System.err.println("lon > minlon " + lon);
|
||||||
}
|
}
|
||||||
drawingLine.addPoint(new Point((int) ( (lon - refy ) * muly), (int) ( (lat - refx)* mulx ) ));
|
drawingLine.addPoint(new Point((int) ( ( lon - refx ) * mulx), (int) ( ( refy - lat ) * muly ) ));
|
||||||
}
|
}
|
||||||
return drawingLine;
|
return drawingLine;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user