[GRASS-user] Rectify error / maximum number of GCPs?

Benjamin Deschamps bdesc100 at gmail.com
Sun Mar 22 19:31:34 EDT 2009


Markus,

Changing all instances of "51" to "501" in Application > GRASS 6.4 >  
Contents > MacOS > etc > gm> georect.tcl fixed the error message, but  
GRASS still freezes, and none of the windows work. A look at the  
activity monitor reveals that the process i.rectify takes 99% of the  
CPU capacity... The same happens when I run i.rectify form the command  
line, but in that case I have the progress bar to let me know that  
something is happening.

Using i.group, i.target and i.rectify directly at the command prompt  
is now working, so I won't bother with the using the GUI. It just took  
me some time to realize that it had to be run from the source location  
when using the command line and from the target destination when using  
the GUI. Thanks for your help!

Benjamin

On 22-Mar-09, at 3:27 PM, Markus Neteler wrote:

> On Sat, Mar 21, 2009 at 1:21 AM, Benjamin Deschamps <bdesc100 at gmail.com 
> > wrote:
>>
>> I am trying to georectify RADARSAT-2 imagery in GRASS 6.4.0RC3 (Mac  
>> OS 10.5).
>> The imagery is accompanied by 350 GCPs. When using the GUI  
>> georectify tool I
>> get the following error when I click on the "start georectifying"  
>> button:
>>
>> can't read "xy(51)": no such element in array
>> can't read "xy(51)": no such element in array
>>    while executing
>> "$xy($gcpnum) insert     0 "[lindex $fields 0] [lindex $fields 1]""
>>    (procedure "GRMap::get_gcp" line 34)
>>    invoked from within
>> "GRMap::get_gcp"
>>    (procedure "GRMap::gcpwin" line 119)
>>    invoked from within
>> "GRMap::gcpwin"
>>    (procedure "GRMap::refmap" line 33)
>>    invoked from within
>> "GRMap::refmap"
>>    ("uplevel" body line 1)
>>    invoked from within
>> "uplevel \#0 $cmd"
>>    (procedure "Button::_release" line 18)
>>    invoked from within
>> "Button::_release .grstart.mf.frame.start.a"
>>    (command bound to event)
>>
>>
>> Is there a limit of 50 GCPs?
>
> It looks like that. But I don't know why (I'm not the author of this  
> code):
>
> grep 51 gui/tcltk/gis.m/georect*
> gui/tcltk/gis.m/georect.tcl:    for {set gcpnum 1} {$gcpnum < 51 } {
> incr gcpnum } {
> gui/tcltk/gis.m/georect.tcl:            if {$gcpnum == 51} {break}
> gui/tcltk/gis.m/georect.tcl:    for {set gcpnum 1} {$gcpnum < 51 } {
> incr gcpnum } {
> gui/tcltk/gis.m/georect.tcl:    for {set gcpnum 1} {$gcpnum < 51 } {
> incr gcpnum } {
> gui/tcltk/gis.m/georect.tcl:            for {set gcpnum 1} {$gcpnum <
> 51 } { incr gcpnum } {
> gui/tcltk/gis.m/georect.tcl:    for {set gcpnum 1} {$gcpnum < 51 } {
> incr gcpnum } {
>
> You could just edit the file (it is in the GRASS installation  
> somewhere)
> and replace 51 to say, 501 and try again.
>
> Please report if that works for you.
>
> Markus



More information about the grass-user mailing list