Changeset 35094 in osm for applications/editors/josm/plugins
- Timestamp:
- 2019-08-21T00:42:37+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/jrenderpgsql/src/jrenderpgsql/JrenderPgsql.java
r35091 r35094 264 264 265 265 double west = (xtile) * MERCATOR_WIDTH / pow - MERCATOR_OFFSET; 266 double east = (xtile + 1) * MERCATOR_WIDTH / pow - MERCATOR_OFFSET;266 double east = (xtile * 1.0 + tilesize / 256 / scale) * MERCATOR_WIDTH / pow - MERCATOR_OFFSET; 267 267 double north = (pow - ytile) * MERCATOR_WIDTH / pow - MERCATOR_OFFSET; 268 double south = (pow - ytile - 1) * MERCATOR_WIDTH / pow - MERCATOR_OFFSET;268 double south = (pow * 1.0 - ytile * 1.0 - tilesize / 256 / scale) * MERCATOR_WIDTH / pow - MERCATOR_OFFSET; 269 269 270 270 // request data from PostGIS … … 386 386 // tile x/y pixel coordinates. 387 387 388 final double mile = 330.0 * pow / 16384.0 * scale; 389 388 390 ChartContext context = new ChartContext() { 389 391 public Point2D getPoint(Snode coord) { 390 392 double x = border + (radlon2x(coord.lon) - west) * 256 * scale * pow / MERCATOR_WIDTH; 391 393 double y = tilesize + border - ((radlat2y(coord.lat) - south) * scale * 256 * pow / MERCATOR_WIDTH); 392 System.out.println("point convert from " + Math.toDegrees(coord.lat)+","+Math.toDegrees(coord.lon)+" to "+x+","+y);393 394 return new Point2D.Double(x, y); 394 395 } 395 396 396 397 public double mile(Feature feature) { 397 return 21600 / 256 / pow / scale;398 return mile; 398 399 } 399 400
Note:
See TracChangeset
for help on using the changeset viewer.