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

Markus Neteler neteler at osgeo.org
Sun Mar 22 15:27:41 EDT 2009


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