source: josm/src/org/openstreetmap/josm/data/projection/Epsg4263.java@ 51

Last change on this file since 51 was 51, checked in by imi, 18 years ago
  • fixed server rounding problem
  • fixed bug, that save with filter does not add extension
  • fixed modified flag for data from server vs. data from disk
  • hacked "ConcurrentModifyException" (need to do this better)
File size: 536 bytes
Line 
1package org.openstreetmap.josm.data.projection;
2
3import org.openstreetmap.josm.data.GeoPoint;
4
5/**
6 * Directly use latitude / longitude values as x/y.
7 *
8 * @author imi
9 */
10public class Epsg4263 implements Projection {
11
12 public void latlon2xy(GeoPoint p) {
13 p.x = p.lon;
14 p.y = p.lat;
15 }
16
17 public void xy2latlon(GeoPoint p) {
18 p.lat = Math.round(p.y*MAX_SERVER_PRECISION)/MAX_SERVER_PRECISION;
19 p.lon = Math.round(p.x*MAX_SERVER_PRECISION)/MAX_SERVER_PRECISION;
20 }
21
22 @Override
23 public String toString() {
24 return "EPSG:4263";
25 }
26}
Note: See TracBrowser for help on using the repository browser.