Revision 29000 branches/v2_0_0_prep/libraries/libJCRS/src/org/gvsig/crs/CrsGT.java
CrsGT.java | ||
---|---|---|
216 | 216 |
return datum; |
217 | 217 |
} |
218 | 218 |
|
219 |
public Rectangle2D getExtent(Rectangle2D extent, double scale, |
|
220 |
double wImage, double hImage, double changeUnits, double dpi) { |
|
221 |
// TODO Auto-generated method stub |
|
222 |
return null; |
|
223 |
} |
|
224 |
|
|
225 | 219 |
public Color getGridColor() { |
226 | 220 |
return gridColor; |
227 | 221 |
} |
... | ... | |
375 | 369 |
return getAbrev()+":proj@"+sourceParams+"@"+targetParams; |
376 | 370 |
} |
377 | 371 |
|
378 |
public Rectangle2D getExtent(Rectangle2D arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6) { |
|
379 |
// TODO Auto-generated method stub |
|
380 |
return null; |
|
381 |
} |
|
372 |
public Rectangle2D getExtent(Rectangle2D extent,double scale,double wImage,double hImage,double mapUnits,double distanceUnits,double dpi) { |
|
373 |
double w =0; |
|
374 |
double h =0; |
|
375 |
double wExtent =0; |
|
376 |
double hExtent =0; |
|
377 |
if (isProjected()) { |
|
378 |
w = ((wImage / dpi) * 2.54); |
|
379 |
h = ((hImage / dpi) * 2.54); |
|
380 |
wExtent =w * scale*distanceUnits/ mapUnits; |
|
381 |
hExtent =h * scale*distanceUnits/ mapUnits; |
|
382 | 382 |
|
383 |
}else { |
|
384 |
w = ((wImage / dpi) * 2.54); |
|
385 |
h = ((hImage / dpi) * 2.54); |
|
386 |
wExtent =(w*scale*distanceUnits)/ (mapUnits*1852.0*60.0); |
|
387 |
hExtent =(h*scale*distanceUnits)/ (mapUnits*1852.0*60.0); |
|
388 |
} |
|
389 |
double xExtent = extent.getCenterX() - wExtent/2; |
|
390 |
double yExtent = extent.getCenterY() - hExtent/2; |
|
391 |
Rectangle2D rec=new Rectangle2D.Double(xExtent,yExtent,wExtent,hExtent); |
|
392 |
return rec; |
|
393 |
} |
|
394 |
|
|
383 | 395 |
} |
Also available in: Unified diff