Revision 29000 branches/v2_0_0_prep/libraries/libJCRS/src/org/gvsig/crs/Crs.java
Crs.java | ||
---|---|---|
647 | 647 |
return epsg_code; |
648 | 648 |
} |
649 | 649 |
|
650 |
/** |
|
651 |
* |
|
652 |
*/ |
|
653 |
public Rectangle2D getExtent(Rectangle2D extent, double scale, double wImage, double hImage, double changeUnits, double dpi) { |
|
654 |
// TODO Auto-generated method stub |
|
655 |
return null; |
|
656 |
} |
|
657 |
|
|
658 | 650 |
public String getFullCode() { |
659 | 651 |
if (this.sourceTrParams == null && this.targetTrParams == null) |
660 | 652 |
return getAbrev(); |
... | ... | |
669 | 661 |
} |
670 | 662 |
|
671 | 663 |
|
672 |
public Rectangle2D getExtent(Rectangle2D arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6) { |
|
673 |
// TODO Auto-generated method stub |
|
674 |
return null; |
|
675 |
} |
|
664 |
public Rectangle2D getExtent(Rectangle2D extent,double scale,double wImage,double hImage,double mapUnits,double distanceUnits,double dpi) { |
|
665 |
double w =0; |
|
666 |
double h =0; |
|
667 |
double wExtent =0; |
|
668 |
double hExtent =0; |
|
669 |
if (isProjected()) { |
|
670 |
w = ((wImage / dpi) * 2.54); |
|
671 |
h = ((hImage / dpi) * 2.54); |
|
672 |
wExtent =w * scale*distanceUnits/ mapUnits; |
|
673 |
hExtent =h * scale*distanceUnits/ mapUnits; |
|
674 |
|
|
675 |
}else { |
|
676 |
w = ((wImage / dpi) * 2.54); |
|
677 |
h = ((hImage / dpi) * 2.54); |
|
678 |
wExtent =(w*scale*distanceUnits)/ (mapUnits*1852.0*60.0); |
|
679 |
hExtent =(h*scale*distanceUnits)/ (mapUnits*1852.0*60.0); |
|
680 |
} |
|
681 |
double xExtent = extent.getCenterX() - wExtent/2; |
|
682 |
double yExtent = extent.getCenterY() - hExtent/2; |
|
683 |
Rectangle2D rec=new Rectangle2D.Double(xExtent,yExtent,wExtent,hExtent); |
|
684 |
return rec; |
|
685 |
} |
|
686 |
|
|
676 | 687 |
private Proj4 getProj4() { |
677 | 688 |
if (proj4 == null) |
678 | 689 |
try { |
Also available in: Unified diff