Closed grl-sage closed 1 year ago
Looks like I got bit by a QGIS API enhancement. You are right that it does not work with QGIS 3.16.16 and it doesn't work until QGIS 3.20. If you can upgrade to 3.22 or 3.28 you will find that it works. Note that in two weeks 3.28 will become the next long term release. In the meantime I think I will go back and get rid of QgsRectangle in the code and manually draw the rectangles so that it will work for older versions of QGIS. This may take a week or two because I am quite busy at the moment.
OK. Thanks.
We just released our software with 3.16.16. We are behind on keeping up with QGIS versions. Didn’t have time for testing our plugin with a newer version. I found it interesting QGIS considers a LTR only one year. That’s not really long term.
We will not be looking to update our plugin again til July. And then we will look to 3.28.
Thanks for replying. Will look for an update to your plugin in a couple of weeks.
I also installed Lat Lon Tools and it looks like the copy coordinate and zoom to coordinate is covered in that tool and it has so much more functionality. Is there any plan to include the MGRS Grid Zone Designator into that tool?
Is there any reason why you don’t have the Grid Zone Designator available through the toolbar; only accessible through plugins menu?
@.***
From: C Hamilton @.> Sent: Friday, February 17, 2023 2:26 PM To: NationalSecurityAgency/qgis-mgrs-plugin @.> Cc: Catania, Luke A ERDC-RDE-GRL-VA CIV @.>; Author @.> Subject: Re: [NationalSecurityAgency/qgis-mgrs-plugin] Error running MGRS Grid Zone Designator (Issue #1)
Looks like I got bit by a QGIS API enhancement. You are right that it does not work with QGIS 3.16.16 and it doesn't work until QGIS 3.20. If you can upgrade to 3.22 or 3.28 you will find that it works. Note that in two weeks 3.28 will become the next long term release. In the meantime I think I will go back and get rid of QgsRectangle in the code and manually draw the rectangles so that it will work for older versions of QGIS. This may take a week or two because I am quite busy at the moment.
— Reply to this email directly, view it on GitHubBlockedhttps://github.com/NationalSecurityAgency/qgis-mgrs-plugin/issues/1#issuecomment-1435133488Blocked, or unsubscribeBlockedhttps://github.com/notifications/unsubscribe-auth/ADFFN7G36IUYTZXTWBDTPQDWX7GDXANCNFSM6AAAAAAU5KEPNIBlocked. You are receiving this because you authored the thread.Message ID: @.**@.>>
I just released version 3.0.3 and tested it with QGIS 3.10 and it works for the older versions of QGIS.
For a little history I had a person who wanted separate MGRS icons and zoom to capabilities from those in Lat Lon Tools. They wanted to be using Lat Lon Tool for their normal coordinates and MGRS tools for MGRS only coordinates. That is why I pulled out the code for MGRS Tools from Lat Lon Tools to make a separate plugin. This has its own complications because now there are two tools that essentially do the same thing (through Lat Lon Tools settings) so what should be in MGRS Tools and what should be in Lat Lon Tools? I had decided if it was MGRS specific I would only include it in MGRS Tools which is why I have not included the grid zone designator in Lat Lon Tools.
This is solved so I am closing the ticket.
I noticed this option is only available from the drop down menu and not via the toolbar. Is that by design? And when I run it I get the error below.
QGIS version: 3.16.16-Hannover QGIS code revision: f5778a89 Qt version: 5.15.2 GDAL version: 3.4.1 GEOS version: 3.10.0-CAPI-1.16.0 PROJ version: Rel. 8.2.1, January 1st, 2022 Processing algorithm… Algorithm 'MGRS Grid Zone Designator' starting… Input parameters: { 'Output' : 'TEMPORARY_OUTPUT', 'Polar' : True, 'Style' : True }
Traceback (most recent call last): File "C:\Users/RDTECLAC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\mgrs\mgrsgzd.py", line 61, in processAlgorithm self.exportPolygon(sink, -180, -90, 180, 10, 'A') File "C:\Users/RDTECLAC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\mgrs\mgrsgzd.py", line 111, in exportPolygon rect = QgsRectangle(lon, lat, lon+width, lat+height, False) TypeError: QgsRectangle(): arguments did not match any overloaded call: overload 1: too many arguments overload 2: too many arguments overload 3: argument 1 has unexpected type 'int' overload 4: argument 1 has unexpected type 'int' overload 5: argument 1 has unexpected type 'int'
Execution failed after 0.03 seconds
Loading resulting layers Algorithm 'MGRS Grid Zone Designator' finished