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?
If I click to ignore the error, it loads the GCP table with the 50 first
points. When I click the button to georectify, GRASS freezes, and nothing is
added to the wgs84 location. If I edit the POINTS file manually and remove
the blank line below the 50th point, I don't get the error message.
My steps have been:
1) create a location in wgs84 lat/long coordinates
2) import the dataset to a new location using r.in.gdal, indicating to use
wgs84 location for GCP projection
3) re-open grass in the wgs84 location and open georectify menu
4) Select the other mapset where data was imported (PERMANENT shows up in
the box)
5) Select the group from that mapset
6) Select on the maps form that group
7) Click "start georeferencing"
Thanks, Benjamin
--
View this message in context: http://n2.nabble.com/Rectify-error---maximum-number-of-GCPs--tp2511830p2511830.html
Sent from the Grass - Users mailing list archive at Nabble.com.
On Sat, Mar 21, 2009 at 1:21 AM, Benjamin Deschamps <bdesc100@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
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@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
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
Benjamin,
On Mon, Mar 23, 2009 at 12:31 AM, Benjamin Deschamps <bdesc100@gmail.com> wrote:
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.
Does it really freeze or is it just busy (and badly communicating
that it is busy)?
Please open a ticket for this with the details we collected so far.
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.
Right (and i.rectify should use the CPU, no?).
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!
No problem - we just need a trace in the bugtracker to not forget
about it...
thanks
Markus
Benjamin
On 22-Mar-09, at 3:27 PM, Markus Neteler wrote:
On Sat, Mar 21, 2009 at 1:21 AM, Benjamin Deschamps <bdesc100@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
Markus,
Its hard to tell. The "rectify" button stays depressed, and I loose the capacity to close other windows, add layers, access menus in the main interface, etc. Will open a ticket...
Benjamin
On 23-Mar-09, at 3:57 AM, Markus Neteler wrote:
Benjamin,
On Mon, Mar 23, 2009 at 12:31 AM, Benjamin Deschamps <bdesc100@gmail.com> wrote:
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.
Does it really freeze or is it just busy (and badly communicating
that it is busy)?
Please open a ticket for this with the details we collected so far.
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.
Right (and i.rectify should use the CPU, no?).
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!
No problem - we just need a trace in the bugtracker to not forget
about it...
thanks
Markus
Benjamin
On 22-Mar-09, at 3:27 PM, Markus Neteler wrote:
On Sat, Mar 21, 2009 at 1:21 AM, Benjamin Deschamps <bdesc100@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
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
On 23/03/09 12:34, Benjamin Deschamps wrote:
Markus,
Its hard to tell. The "rectify" button stays depressed, and I loose the capacity to close other windows, add layers, access menus in the main interface, etc.
This is "normal", i.e. this is how the window behaves currently. For some reason the georeferencer is modal, i.e. blocks everything else. But I agree that this is not how it should be.
Will open a ticket...
Yes, please do.
Moritz