- Timestamp:
- 2018-12-20T17:45:54+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/SyncEditorLayerIndex.groovy
r14554 r14576 757 757 myprintln "* Different number of shapes (${s.size()} != ${js.size()}): ${getDescription(j)}" 758 758 } else { 759 for(def nums = 0; nums < s.size(); ++nums) {760 def ep = s[nums].getPoints()761 def jp = js[nums].getPoints()762 if(ep.size() != jp.size()) {763 myprintln "* Different number of points for shape ${nums+1} (${ep.size()} ! = ${jp.size()})): ${getDescription(j)}"764 } else {765 for(def nump = 0; nump < ep.size(); ++nump) {766 def ept = ep[nump]767 def jpt = jp[nump]768 if(Math.abs(ept.getLat()-jpt.getLat()) > 0.00001 || Math.abs(ept.getLon()-jpt.getLon()) > 0.00001) {769 myprintln "* Different coordinate for point ${nump+1} of shape ${nums+1}: ${getDescription(j)}"770 nump = ep.size()771 num = s.size()759 boolean[] edone = new boolean[s.size()] 760 boolean[] jdone = new boolean[js.size()] 761 for(def enums = 0; enums < s.size(); ++enums) { 762 def ep = s[enums].getPoints() 763 for(def jnums = 0; jnums < js.size() && !edone[enums]; ++jnums) { 764 def jp = js[jnums].getPoints() 765 if(ep.size() == jp.size() && !jdone[jnums]) { 766 boolean err = false; 767 for(def nump = 0; nump < ep.size() && !err; ++nump) { 768 def ept = ep[nump] 769 def jpt = jp[nump] 770 if(Math.abs(ept.getLat()-jpt.getLat()) > 0.00001 || Math.abs(ept.getLon()-jpt.getLon()) > 0.00001) 771 err = true 772 772 } 773 if(!err) { 774 edone[enums] = true 775 jdone[jnums] = true 776 break 777 } 778 } 779 } 780 } 781 for(def enums = 0; enums < s.size(); ++enums) { 782 def ep = s[enums].getPoints() 783 for(def jnums = 0; jnums < js.size() && !edone[enums]; ++jnums) { 784 def jp = js[jnums].getPoints() 785 if(ep.size() == jp.size() && !jdone[jnums]) { 786 boolean err = false; 787 for(def nump = 0; nump < ep.size() && !err; ++nump) { 788 def ept = ep[nump] 789 def jpt = jp[nump] 790 if(Math.abs(ept.getLat()-jpt.getLat()) > 0.00001 || Math.abs(ept.getLon()-jpt.getLon()) > 0.00001) { 791 def numtxt = ((enums == jnums) ? "${enums+1}" : "${enums+1}/${jnums+1}") 792 myprintln "* Different coordinate for point ${nump+1} of shape $numtxt: ${getDescription(j)}" 793 break 794 } 795 } 796 edone[enums] = true 797 jdone[jnums] = true 798 break 799 } 800 } 801 } 802 for(def enums = 0; enums < s.size(); ++enums) { 803 def ep = s[enums].getPoints() 804 for(def jnums = 0; jnums < js.size() && !edone[enums]; ++jnums) { 805 def jp = js[jnums].getPoints() 806 if(!jdone[jnums]) { 807 def numtxt = ((enums == jnums) ? "${enums+1}" : "${enums+1}/${jnums+1}") 808 myprintln "* Different number of points for shape $numtxt (${ep.size()} ! = ${jp.size()})): ${getDescription(j)}" 809 edone[enums] = true 810 jdone[jnums] = true 811 break 773 812 } 774 813 }
Note:
See TracChangeset
for help on using the changeset viewer.