Opened 9 years ago

Closed 7 years ago

#1260 closed defect (worksforme)

Georectifier: RMS broken

Reported by: q076256 Owned by: grass-dev@…
Priority: blocker Milestone: 7.0.0
Component: wxGUI Version: svn-trunk
Keywords: wingrass, gcp, georect Cc:
CPU: x86-32 Platform: MSWindows 2K

Description

Issue 1:
Rectifying raster maps in xy breaks when RMS is calculated. Raster map was imported and 6 RCP's defined. Whereas first rectification 1st order was set. Number of RCP's was increased up to 6. Now RMS selected - ok, then rectification set to 2nd order and RMS selected -> see following backtrace:

'ascii' codec can't decode byte 0xfc in position 44: ordinal not in range(128) Traceback (most recent call last):

File "c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-

mingw32/etc/gui/wxpython/gui_modules/gcpmanager.py", line 1292, in OnRMS

File "c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-

mingw32/etc/gui/wxpython/gui_modules/gcpmanager.py", line 1603, in RMSError

File "c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-

mingw32/etc/gui/wxpython/gui_modules/gcmd.py", line 573, in RunCommand?

File "c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-

mingw32/etc/gui/wxpython/gui_modules/gcmd.py", line 77, in init UnicodeDecodeError? : 'ascii' codec can't decode byte 0xfc in position 44: ordinal not in range(128)

Points File:

# Ground Control Points File
# 
# target location: ImportTiff
# target mapset: Imported
#	source		target		status
#	east	north	east	north	(1=ok, 0=ignore)
#-----------------------     -----------------------     ---------------
231.465005763 994.904350561     -120.0 50.0     1
303.590034425 6236.23223289     -120.0 51.0     1
6926.89994233 6240.63506344     -118.0 51.0     1
7001.69915 1005.996601     -118.0 50.0     1
3613.53113033 3595.71196078     -119.0 50.5     1
5280.275 4912.02606209     -118.5 50.75     1


Issue 2:
Now selection rectification 3d order immediately expands the GCP list with further 4 entries with 0 values, RMS selected shows message: not enough GCP's. Now rectification 2d order selected and RMS run -> same as up here.
Points File:

# Ground Control Points File
# 
# target location: ImportTiff
# target mapset: Imported
#	source		target		status
#	east	north	east	north	(1=ok, 0=ignore)
#-----------------------     -----------------------     ---------------
231.465005763 994.904350561     -120.0 50.0     1
303.590034425 6236.23223289     -120.0 51.0     1
6926.89994233 6240.63506344     -118.0 51.0     1
7001.69915 1005.996601     -118.0 50.0     1
3613.53113033 3595.71196078     -119.0 50.5     1
5280.275 4912.02606209     -118.5 50.75     1
0.0 0.0     0.0 0.0     0
0.0 0.0     0.0 0.0     0
0.0 0.0     0.0 0.0     0
0.0 0.0     0.0 0.0     0


At this time the GCP #7 can not be defined, a click in the map with setGCP always set the points in GCP #10 no matter what GCP entry in the list is selected.
Now added a 7th GCP and choosed rectification 2d order, RMS works fine. But if there are only 6 GCP activated the behavior is as in the 1st case up here. In this case there shall be a warning: not enough points, obviously for 2nd order 6 GCP are not enough[[BR]] Issue 3:
Removing one or more GCPs from the list, saving GCPs and end and restart Georectifier do not work, see trace below:

Traceback (most recent call last):

File "E:\Segeln\Karten_Digitalisieren\GRASS-7.0.SVN\etc\gu

i\wxpython\wxgui.py", line 254, in OnGCPManager gcpmanager.GCPWizard(self)

File "c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-

mingw32/etc/gui/wxpython/gui_modules/gcpmanager.py", line 240, in init

File "c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-

mingw32/etc/gui/wxpython/gui_modules/gcpmanager.py", line 896, in InitMapDisplay?

File "c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-

mingw32/etc/gui/wxpython/gui_modules/gcpmanager.py", line 1968, in LoadData?

File "c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-

mingw32/etc/gui/wxpython/gui_modules/gcpmanager.py", line 1222, in ReadGCPs IndexError? : list index out of range
Points File:

# Ground Control Points File
# 
# target location: ImportTiff
# target mapset: Imported
#	source		target		status
#	east	north	east	north	(1=ok, 0=ignore)
#-----------------------     -----------------------     ---------------
231.465006 994.904351     -120.0 50.0     1
303.590034 6236.232233     -120.0 51.0     1
6926.899942 6240.635063     -118.0 51.0     1
7001.69915 1005.996601     -118.0 50.0     1
3613.53113 3595.711961     -119.0 50.5     1
5280.275 4912.026062     -118.5 50.75     1
0.0 0.0     0.0      0
0.0 0.0     0.0      0
0.0 0.0     0.0      0
0.0 0.0     0.0      0


Workaround: Delete the empty entries in points AND in points_bak file and restart

Hint: Even more than one empty line at the end of one of the points files prevents Georectifier from starting up
Issue 4:
Removing a GCP form the the list does not clear the Backward error field.

Change History (9)

comment:1 Changed 9 years ago by q076256

Additional Info to Issue 1
Test with g.transform showed a strange behaviour!
called with order=1 and 2 GCPs => Error msg: "Not enough points"
called with order=2 and 6 GCPs => Error msg: "Error in executing g.transform"
It would be very helpful if the error msg of the called module, here g.transform show up in georectifier instead of writing to console output.

Module gcpmanager.py
proc CheckGCPcount

       if (self.GCPcount < 3 and self.gr_order == 1) or \
            (self.GCPcount < 6 and self.gr_order == 2) or \
            (self.GCPcount < 10 and self.gr_order == 3):


the code do not reflect the comment! There is no test for checked GCPs, so there can be tens of GCPs, but none is checked, the code breaks - in stead of popping up a window with the error msg!!

Hope that helps

Best regards

Manfred Dill

comment:2 Changed 9 years ago by hamish

Keywords: wingrass gcp georect added
Owner: changed from developer to grass-dev@…

.fix bug owner.

comment:3 Changed 7 years ago by neteler

A series of fixes have been applied in the past months, see

http://trac.osgeo.org/grass/log/grass/branches/releasebranch_6_4/gui/wxpython/gcp

comment:4 Changed 7 years ago by neteler

q076256, could you please try again with a current winGRASS 7 binary package? Available from

http://grass.osgeo.org/download/software/ms-windows/

comment:5 Changed 7 years ago by mlennert

Resolution: worksforme
Status: newclosed

As we haven't heard anything from the OP in years, and no one seems to have confirmed the bug, I'm closing it. Reopen if needed.

comment:6 Changed 7 years ago by hamish

Resolution: worksforme
Status: closedreopened

Please confirm bugs as fixed before closing them.

thanks, Hamish

comment:7 in reply to:  description Changed 7 years ago by mlennert

Replying to q076256:

Issue 1:
Rectifying raster maps in xy breaks when RMS is calculated. Raster map was imported and 6 RCP's defined. Whereas first rectification 1st order was set. Number of RCP's was increased up to 6. Now RMS selected - ok, then rectification set to 2nd order and RMS selected -> see following backtrace:

'ascii' codec can't decode byte 0xfc in position 44: ordinal not in range(128) Traceback (most recent call last):

File "c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-

mingw32/etc/gui/wxpython/gui_modules/gcpmanager.py", line 1292, in OnRMS

File "c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-

mingw32/etc/gui/wxpython/gui_modules/gcpmanager.py", line 1603, in RMSError

File "c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-

mingw32/etc/gui/wxpython/gui_modules/gcmd.py", line 573, in RunCommand?

File "c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-

mingw32/etc/gui/wxpython/gui_modules/gcmd.py", line 77, in init UnicodeDecodeError? : 'ascii' codec can't decode byte 0xfc in position 44: ordinal not in range(128)

This is (was) an encoding error. From the pathnames, it seems that the OP works in a German environment. The po files for the gcp manager (notably the message about not enough GCPs) contains special characters in German. I just tried to reproduce in a French environment and the message shows up correctly. But that's in Debian GNU/Linux, not Windows.

Issue 2:
Now selection rectification 3d order immediately expands the GCP list with further 4 entries with 0 values, RMS selected shows message: not enough GCP's. Now rectification 2d order selected and RMS run -> same as up here.

I don't understand why here the message would work for 3rd order, but not for 2d order.

At this time the GCP #7 can not be defined, a click in the map with setGCP always set the points in GCP #10 no matter what GCP entry in the list is selected.

I cannot reproduce this, at least no on Debian GNU/Linux.

Now added a 7th GCP and choosed rectification 2d order, RMS works fine. But if there are only 6 GCP activated the behavior is as in the 1st case up here. In this case there shall be a warning: not enough points, obviously for 2nd order 6 GCP are not enough[[BR]]

There is a warning. Apparently it failed at the time because of encoding issues.

Issue 3:
Removing one or more GCPs from the list, saving GCPs and end and restart Georectifier do not work, see trace below:

Again, I cannot reproduce this in Debian GNU/Linux. ISTR a similar issue a couple years, but that was solved. Cannot find trace of it, though.

Hint: Even more than one empty line at the end of one of the points files prevents Georectifier from starting up

Cannot reproduce in Debian GNU/Linux.

Issue 4:
Removing a GCP form the the list does not clear the Backward error field.

Cannot reproduce in Debian GNU/Linux.

Could someone try to reproduce these issues in Windows ?

comment:8 Changed 7 years ago by mlennert

I've just tested the georectifier on WinXP in French and in German and have not been able to reproduce any of the 4 issues. I do believe that in light of the age of the original post and the fact that I cannot reproduce any of the errors and that no one else has been able to in the last 3 years and that the OP has not reacted to two calls for confirmation in the last 5 months, this ticket can be closed.

comment:9 in reply to:  8 Changed 7 years ago by mlennert

Resolution: worksforme
Status: reopenedclosed

Replying to mlennert:

I've just tested the georectifier on WinXP in French and in German and have not been able to reproduce any of the 4 issues. I do believe that in light of the age of the original post and the fact that I cannot reproduce any of the errors and that no one else has been able to in the last 3 years and that the OP has not reacted to two calls for confirmation in the last 5 months, this ticket can be closed.

Closing this ticket, again.

Note: See TracTickets for help on using tickets.