- Timestamp:
- 2017-04-10T10:31:38+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/imagery/ReprojectionTile.java
r11860 r11882 111 111 112 112 ImageWarp.PointTransform pointTransform = pt -> { 113 EastNorth target = new EastNorth(pbTargetAligned.minEast + (pt.getX()) * scale,114 pbTargetAligned.maxNorth - (pt.getY()) * scale);113 EastNorth target = new EastNorth(pbTargetAligned.minEast + pt.getX() * scale, 114 pbTargetAligned.maxNorth - pt.getY() * scale); 115 115 EastNorth sourceEN = projServer.latlon2eastNorth(projCurrent.eastNorth2latlon(target)); 116 double x 2= source.getTileSize() *116 double x = source.getTileSize() * 117 117 (sourceEN.east() - pbServer.minEast) / (pbServer.maxEast - pbServer.minEast); 118 double y 2= source.getTileSize() *118 double y = source.getTileSize() * 119 119 (pbServer.maxNorth - sourceEN.north()) / (pbServer.maxNorth - pbServer.minNorth); 120 return new Point2D.Double(x 2, y2);120 return new Point2D.Double(x, y); 121 121 }; 122 122 123 123 // pixel coordinates of tile origin and opposite tile corner inside the target image 124 124 // (tile may be deformed / rotated by reprojection) 125 EastNorth en00Current = projCurrent.latlon2eastNorth(projServer.eastNorth2latlon( new EastNorth(en00Server.getX(), en00Server.getY())));126 EastNorth en11Current = projCurrent.latlon2eastNorth(projServer.eastNorth2latlon( new EastNorth(en11Server.getX(), en11Server.getY())));125 EastNorth en00Current = projCurrent.latlon2eastNorth(projServer.eastNorth2latlon(en00Server)); 126 EastNorth en11Current = projCurrent.latlon2eastNorth(projServer.eastNorth2latlon(en11Server)); 127 127 Point2D p00Img = new Point2D.Double( 128 128 (en00Current.east() - pbTargetAligned.minEast) / scale,
Note:
See TracChangeset
for help on using the changeset viewer.