Revision 3142 trunk/extensions/extGeoreferencing/src/com/iver/cit/gvsig/fmap/layers/FLyrPoints.java
FLyrPoints.java | ||
---|---|---|
544 | 544 |
} |
545 | 545 |
|
546 | 546 |
/** |
547 |
* Calcula el RMS para el punto de la posici?n pos |
|
548 |
* @param pos Posici?n |
|
549 |
* @return RMS en forma de String |
|
550 |
*/ |
|
551 |
public String calcRMS(int pos){ |
|
552 |
return "0"; |
|
553 |
} |
|
554 |
|
|
555 |
/** |
|
556 |
* Calcula el residuo en X para el punto de la posici?n pos |
|
557 |
* @param pos Posici?n |
|
558 |
* @return residuo Y en forma de String |
|
559 |
*/ |
|
560 |
public String calcResX(int pos){ |
|
561 |
double resX = 0D; |
|
562 |
GeoPoint gp = this.getPoint(pos); |
|
563 |
resX = Math.sqrt((gp.mapPoint.getX() - gp.pixelPoint.getX()) * (gp.mapPoint.getX() - gp.pixelPoint.getX())); |
|
564 |
return String.valueOf(resX); |
|
565 |
} |
|
566 |
|
|
567 |
/** |
|
568 |
* Calcula el residuo en Y para el punto de la posici?n pos |
|
569 |
* @param pos Posici?n |
|
570 |
* @return residuo Y en forma de String |
|
571 |
*/ |
|
572 |
public String calcResY(int pos){ |
|
573 |
return "0"; |
|
574 |
} |
|
575 |
|
|
576 |
/** |
|
577 |
* |
|
578 |
* @return |
|
579 |
*/ |
|
580 |
public String calcTotal(){ |
|
581 |
return "0"; |
|
582 |
} |
|
583 |
|
|
584 |
/** |
|
547 | 585 |
* Busca el punto en la capa FLyrPoint que corresponde con la posicion pos |
548 | 586 |
* y carga la informaci?n de este en el panel de informaci?n pasado por par?metro. |
549 | 587 |
* @param pos Posici?n del punto |
... | ... | |
588 | 626 |
dialog.getZoomControlRight().setCenterPoint(getCenterPoint(pos, true)); |
589 | 627 |
dialog.getZoomControlRight().setNewViewPort(getMiniExtent(pos, true)); |
590 | 628 |
dialog.getZoomControlRight().draw(); |
629 |
|
|
630 |
//Calculamos los errores |
|
631 |
String s = calcRMS(pos); |
|
632 |
int index = s.indexOf("."); |
|
633 |
if(index != -1) |
|
634 |
dialog.setRMS(s.substring(0, index + 7)); |
|
635 |
else |
|
636 |
dialog.setRMS(s); |
|
637 |
|
|
638 |
s = calcResX(pos); |
|
639 |
index = s.indexOf("."); |
|
640 |
if(index != -1) |
|
641 |
dialog.setResX(s.substring(0, index + 7)); |
|
642 |
else |
|
643 |
dialog.setResX(s); |
|
644 |
|
|
645 |
s = calcResY(pos); |
|
646 |
index = s.indexOf("."); |
|
647 |
if(index != -1) |
|
648 |
dialog.setResY(s.substring(0, index + 7)); |
|
649 |
else |
|
650 |
dialog.setResY(s); |
|
651 |
|
|
652 |
s = calcTotal(); |
|
653 |
index = s.indexOf("."); |
|
654 |
if(index != -1) |
|
655 |
dialog.setTotal(s.substring(0, index + 7)); |
|
656 |
else |
|
657 |
dialog.setTotal(s); |
|
658 |
|
|
591 | 659 |
} |
592 | 660 |
|
593 | 661 |
/** |
Also available in: Unified diff