Revision 42543 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.projection/org.gvsig.projection.cresques/org.gvsig.projection.cresques.impl/src/main/java/org/cresques/impl/geo/Mercator.java
Mercator.java | ||
---|---|---|
70 | 70 |
Epps2 = p[7]; |
71 | 71 |
} |
72 | 72 |
|
73 |
@Override |
|
73 | 74 |
public String getAbrev() { |
74 | 75 |
return abrev; |
75 | 76 |
} |
... | ... | |
96 | 97 |
|
97 | 98 |
/** |
98 | 99 |
* |
100 |
* @param eli |
|
101 |
* @param name |
|
102 |
* @return |
|
99 | 103 |
*/ |
100 | 104 |
public static IProjection getProjectionByName(IDatum eli, String name) { |
101 | 105 |
if (name.indexOf("ME") < 0) { |
... | ... | |
107 | 111 |
|
108 | 112 |
/** |
109 | 113 |
* |
114 |
* @param x |
|
115 |
* @param y |
|
116 |
* @return |
|
110 | 117 |
*/ |
118 |
@Override |
|
111 | 119 |
public Point2D createPoint(double x, double y) { |
112 | 120 |
return new ProjPoint(this, x, y); |
113 | 121 |
} |
114 | 122 |
|
115 | 123 |
/** |
116 | 124 |
* |
117 |
* @param uPt
|
|
125 |
* @param mPt
|
|
118 | 126 |
* @return |
119 | 127 |
*/ |
128 |
@Override |
|
120 | 129 |
public Point2D toGeo(Point2D mPt) { |
121 | 130 |
GeoPoint gPt = new GeoPoint(); |
122 | 131 |
|
... | ... | |
160 | 169 |
/** |
161 | 170 |
* |
162 | 171 |
* @param gPt |
163 |
* @param uPt
|
|
172 |
* @param mPt
|
|
164 | 173 |
* @return |
165 | 174 |
*/ |
175 |
@Override |
|
166 | 176 |
public Point2D fromGeo(Point2D gPt, Point2D mPt) { |
167 | 177 |
double sl = Math.sin(((GeoPoint) gPt).Latitude.ToRadians()); |
168 | 178 |
double cl = Math.cos(((GeoPoint) gPt).Latitude.ToRadians()); |
... | ... | |
329 | 339 |
} |
330 | 340 |
} |
331 | 341 |
|
342 |
@Override |
|
332 | 343 |
public void drawGrid(Graphics2D g, ViewPortData vp) { |
333 | 344 |
generateGrid(g, vp.getExtent(), vp.getMat()); |
334 | 345 |
grid.setColor(gridColor); |
... | ... | |
338 | 349 |
/* (non-Javadoc) |
339 | 350 |
* @see org.cresques.cts.IProjection#getScale(double, double, double, double) |
340 | 351 |
*/ |
352 |
@Override |
|
341 | 353 |
public double getScale(double minX, double maxX, double width, double dpi) { |
342 | 354 |
Projection prj = Geodetic.getProjection((Ellipsoid) getDatum()); |
343 | 355 |
GeoPoint pt1 = (GeoPoint) prj.createPoint(1.0, 0.0); |
... | ... | |
355 | 367 |
return scale; |
356 | 368 |
} |
357 | 369 |
|
370 |
@Override |
|
358 | 371 |
public ICoordTrans getCT(IProjection dest) { |
359 | 372 |
// TODO Auto-generated method stub |
360 | 373 |
return null; |
361 | 374 |
} |
362 | 375 |
|
376 |
@Override |
|
363 | 377 |
public Rectangle2D getExtent(Rectangle2D extent, double scale, double wImage, double hImage, double mapUnits,double distanceUnits, double dpi) { |
364 | 378 |
Projection prj = Geodetic.getProjection((Ellipsoid) getDatum()); |
365 | 379 |
GeoPoint pt1 = (GeoPoint) prj.createPoint(1.0, 0.0); |
... | ... | |
385 | 399 |
/* (non-Javadoc) |
386 | 400 |
* @see org.cresques.cts.IProjection#getFullCode() |
387 | 401 |
*/ |
402 |
@Override |
|
388 | 403 |
public String getFullCode() { |
389 | 404 |
return getAbrev(); |
390 | 405 |
} |
Also available in: Unified diff