Re: [Qgis-user] wishing for accurate lattitude/longitude from a cell, phone

2020-06-02 Thread Nicolas Cadieux
Hi Garth,

Good point.  I expect this has more to do with the satellite constellation at 
the time of the measurement than anything else.  Some reading I have been doing 
suggest Glonass as being slightly less accurate.  This could be caused by 
atomic clock precision, or less accurate broadcasting of ephemeris. This could 
be checked in post processing with a proper GPS.   As I see it, Glonass is Most 
important when you don’t have enough GPS satellites in view like when working 
up north or in some settings when satellite are hidden from view (mountain, 
buildings...).  I don’t think a gps like the eTrex will improve Much if you go 
from 8 to 16 satellites If the first 8 are well positioned in the sky.

Planning ahead of time to know where and when to measure is always the best 
practice as I see it.

Nicolas Cadieux
Ça va bien aller!

> Le 2 juin 2020 à 13:56, Garth Fletcher  a écrit :
> 
> A QGIS reader pointed me to a Sep 2019 US Forest Service report,
> ,
> which compares the accuracy of various GPS instruments.
> 
> Their Garmin eTrex 30 section stated that the eTrex's accuracy was ~ 3X
> poorer when using GPS+GLONASS instead of GPS-only mode.  This seemed
> rather counter-intuitive.
> 
> I checked using my eTrex 20 by taking 38 measurements distributed over
> an 8 hour period at a precisely known location, half using GPS only and
> half using GPS+GLONASS modes. Canopy type probably "Light-Medium".
> 
> The results indicate that GPS+GLONASS does increase the accuracy, albeit
> only by a modest amount.  It  most certainly does not decrease it!
> 
> A plot of my results on a 1 meter grid, along with descriptive
> statistics, can be downloaded (69 KB) from:
> 
> 
> Cordially,
> -- 
> Garth Fletcher
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] wishing for accurate lattitude/longitude from a cell, phone

2020-06-02 Thread Garth Fletcher

A QGIS reader pointed me to a Sep 2019 US Forest Service report,
,
which compares the accuracy of various GPS instruments.

Their Garmin eTrex 30 section stated that the eTrex's accuracy was ~ 3X
poorer when using GPS+GLONASS instead of GPS-only mode.  This seemed
rather counter-intuitive.

I checked using my eTrex 20 by taking 38 measurements distributed over
an 8 hour period at a precisely known location, half using GPS only and
half using GPS+GLONASS modes. Canopy type probably "Light-Medium".

The results indicate that GPS+GLONASS does increase the accuracy, albeit
only by a modest amount.  It  most certainly does not decrease it!

A plot of my results on a 1 meter grid, along with descriptive
statistics, can be downloaded (69 KB) from:


Cordially,
--
Garth Fletcher
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Self inflicted python token revoke error: Python - google.auth.exceptions.RefreshError: ('invalid_grant: Token has been expired or revoked...…..)

2020-06-02 Thread Richard Duivenvoorde
Not sure what you mean by a Python toke, as I only am aware of Google
tokens...
So what I think is that a (Google-related) plugin is creating havoc.

So you could rename your profiles folder:

 C:/Users/Sean/AppData/Roaming/QGIS/QGIS3\profiles

Restart QGIS (which then should give you a fresh profile) and see if
that helps.
IF that is ok, and you miss your old settings/plugins you could try to
remove google related stuff from python/plugins...

HTH

Richard Duivenvoorde

On 6/1/20 12:03 PM, Sean Hill wrote:
> Unfortunate, self-inflicted problem, for which help would be
> appreciated.
> 
> __ __
> 
> SYSTEM
> 
> QGIS Version 3.12.3 Bucuresti
> 
> Installation from QGIS-OSGeo4W-3.12.3-1-Setup-x86_64.exe as a standalone
> version
> 
> QGIS broke when installing plug-ins (see below)
> 
> OS - Windows 7 Home
> 
> __ __
> 
> PROBLEM DESCRIPTION
> 
>   * Program was working well and had been used successfully for several
> days until then trying to install Google Earth, Google Maps and
> OpenLayers.
>   * Installed plug-ins, received a Python URL (with instruction to Copy
> and Paste into QGIS, which was done).
>   * Then received a Google Security message via email asking whether it
> was me.
>   * Accepted this, but then subsequently a few minutes later, because of
> a security concern (now admittedly unwarranted!) went into Google
> account and revoked access to Python (at that stage not
> understanding that this is a program requirement!).  I am now unable
> to run QGIS.
> 
> __ __
> 
> FIXES ATTEMPTED
> 
>   * Have tried Uninstalling QGIS and re-installing, to no effect.
>   * Tried Uninstalling and manually cleaning up “debris folders & files”
> left by Windows before re-installing, again to no effect.
>   * Have searched methods of re-obtaining Python token, most of which
> indicate a requirement to contact the app supplier to re-obtain a
> new one.
>   * Have seen that an API OAuth 2.0 is a possible solution, but have no
> idea as to how this could / would be used with QGIS.
> 
> __ __
> 
> EXPECTATION
> 
> To obtain a new Python token from Google via QGIS to allow QGIS to be
> reinstalled successfully.
> 
> __ __
> 
> ERROR SOURCE INFORMATION
> 
> The following error information has been copied from QGIS:
> 
> __ __
> 
> *Couldn't load plugin 'ee_plugin' due to an error when calling its
> classFactory() method*
> 
> *google.auth.exceptions.RefreshError: ('invalid_grant: Token has been
> expired or revoked.', '{\n  "error": "invalid_grant",\n 
> "error_description": "Token has been expired or revoked."\n}')*
> 
> Traceback (most recent call last):
>   File "C:/PROGRA~1/QGIS3~1.12/apps/qgis/./python\qgis\utils.py", line
> 334, in _startPlugin
>     plugins[packageName] = package.classFactory(iface)
>   File
> "C:/Users/Sean/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\__init__.py",
> line 25, in classFactory
>     from .ee_plugin import GoogleEarthEnginePlugin
>   File "C:/PROGRA~1/QGIS3~1.12/apps/qgis/./python\qgis\utils.py", line
> 743, in _import
>     mod = _builtin_import(name, globals, locals, fromlist, level)
>   File
> "C:/Users/Sean/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\ee_plugin.py",
> line 26, in
>     ee_plugin.ee_auth.init()
>   File
> "C:/Users/Sean/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\ee_auth.py",
> line 19, in init
>     ee.Initialize()
>   File
> "C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\__init__.py",
> line 123, in Initialize
>     ApiFunction.initialize()
>   File
> "C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\apifunction.py",
> line 154, in initialize
>     signatures = data.getAlgorithms()
>   File
> "C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py",
> line 952, in getAlgorithms
>     return send_('/algorithms', {}, 'GET')
>   File
> "C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py",
> line 1762, in send_
>     response, content = send_with_backoff()
>   File
> "C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py",
> line 1753, in send_with_backoff
>     url, method=opt_method, body=payload, headers=headers)
>   File
> "C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google_auth_httplib2.py",
> line 187, in request
>     self._request, method, uri, request_headers)
>   File
> "C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google\auth\credentials.py",
> line 124, in before_request
>     self.refresh(request)
>   File
> 

Re: [Qgis-user] manual classification tool?

2020-06-02 Thread Raymond Nijssen

Hi Werner and others,

Yes, I ran into similar workflows before as well.

For now, I created a simple plugin where you can choose the layer, field 
and value to set. Then you just click-click-click all the features you 
want to set the value for. Only works in edit mode.


While finding a name for my plugin, I chose 'value painter' and then I 
found out that there's already a plugin called 'attribute painter'. It 
does something similar, but in a more complex way. I expect too complex 
for the qgis "noobs" I'm working with.


I'm not planning to upload the plugin to the QGIS repo, but the source 
code is on github:


https://github.com/raymondnijssen/valuepainter


There's also a short screencast demo there:
https://github.com/raymondnijssen/valuepainter/blob/master/docs/paint_tool_demo.webm


Cheers,
Raymond


On 28-05-2020 12:01, Werner Macho wrote:

Hi Raymond,

Sounds like a blogpost with a nice explanation, that is a problem I also 
have sometimes (though not with 17K).

Once you solved it it would be nice to have a manual howto get there.

regards
Werner

On Thu, May 28, 2020 at 11:58 AM Alexandre Neto > wrote:


Yup, hidden widget was what I was thinking.

A custom python form can probably provide what you want. I think you
will be able to listen to that specific field widget and close the
form when it changes

Alex

A quinta, 28/05/2020, 10:50, Raymond Nijssen mailto:r.nijs...@terglobo.nl>> escreveu:

Ah, I found it! (With a little help from Richard..)

There is a widget type "Hidden" that prevents showing up on the
form.

Still, if anyone knows of a way that also not needs to close the
form
with an OK, could save me 17k extra mouse clicks. Using actions
maybe?

Thanks,
Raymond


On 28-05-2020 10:31, Raymond Nijssen wrote:
 > Hi Alex,
 >
 > Thanks, that is pretty close to what I'm looking for! I
didn't manage to
 > only show the widget for the field I want to edit though, so
I'm seeing
 > the entire form. I tried to find it in the Form and Fields
properties
 > and I tried to use hidden fields.
 >
 > Ray
 >
 > On 28-05-2020 09:24, Alexandre Neto wrote:
 >> Hi Raymond,
 >>
 >> Wouldn't the identify tool with auto open form with only the
class
 >> field widget available do that? Also, select tool with multi
edit form
 >> to classify several buildings in one go would save lots of
clicks.
 >>
 >> Alex
 >>
 >> A quinta, 28/05/2020, 07:38, Raymond Nijssen
mailto:r.nijs...@terglobo.nl>
 >> >> escreveu:
 >>
 >>     Does anyone know if there is a tool in QGIS to quickly
classify
 >>     features
 >>     manually?
 >>
 >>     I have a layer with 17,000 buildings, all need to be set
to 1 of 5
 >>     values. I'm thinking about making a (quick and dirty)
plugin that:
 >>
 >>     - On clicking the building shows a popup menu with the 5
choices
 >>     - Clicking the choice would update the value and change
the color
 >>     (redraw)
 >>
 >>     Every click less really counts here. I already set up a
form
 >> widget but
 >>     also having the location of the menu near the building
polygon is way
 >>     more efficient. (I mean, no need to cross the screen
with your mouse
 >>     cursor.)
 >>
 >>     Thanks!
 >>
 >>     Raymond
 >>     ___
 >>     Qgis-user mailing list
 >> Qgis-user@lists.osgeo.org 
>
 >>     List info:
https://lists.osgeo.org/mailman/listinfo/qgis-user
 >>     Unsubscribe:
https://lists.osgeo.org/mailman/listinfo/qgis-user
 >>
 > ___
 > Qgis-user mailing list
 > Qgis-user@lists.osgeo.org 
 > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
 > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org 
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org 

[Qgis-user] Self inflicted python token revoke error: Python - google.auth.exceptions.RefreshError: ('invalid_grant: Token has been expired or revoked...…..)

2020-06-02 Thread Sean Hill
Unfortunate, self-inflicted problem, for which help would be appreciated.



SYSTEM

QGIS Version 3.12.3 Bucuresti

Installation from QGIS-OSGeo4W-3.12.3-1-Setup-x86_64.exe as a standalone
version

QGIS broke when installing plug-ins (see below)

OS - Windows 7 Home



PROBLEM DESCRIPTION

   - Program was working well and had been used successfully for several
   days until then trying to install Google Earth, Google Maps and OpenLayers.
   - Installed plug-ins, received a Python URL (with instruction to Copy
   and Paste into QGIS, which was done).
   - Then received a Google Security message via email asking whether it
   was me.
   - Accepted this, but then subsequently a few minutes later, because of a
   security concern (now admittedly unwarranted!) went into Google account and
   revoked access to Python (at that stage not understanding that this is a
   program requirement!).  I am now unable to run QGIS.



FIXES ATTEMPTED

   - Have tried Uninstalling QGIS and re-installing, to no effect.
   - Tried Uninstalling and manually cleaning up “debris folders & files”
   left by Windows before re-installing, again to no effect.
   - Have searched methods of re-obtaining Python token, most of which
   indicate a requirement to contact the app supplier to re-obtain a new one.
   - Have seen that an API OAuth 2.0 is a possible solution, but have no
   idea as to how this could / would be used with QGIS.



EXPECTATION

To obtain a new Python token from Google via QGIS to allow QGIS to be
reinstalled successfully.



ERROR SOURCE INFORMATION

The following error information has been copied from QGIS:



*Couldn't load plugin 'ee_plugin' due to an error when calling its
classFactory() method*

*google.auth.exceptions.RefreshError: ('invalid_grant: Token has been
expired or revoked.', '{\n  "error": "invalid_grant",\n
"error_description": "Token has been expired or revoked."\n}')*

Traceback (most recent call last):
  File "C:/PROGRA~1/QGIS3~1.12/apps/qgis/./python\qgis\utils.py", line 334,
in _startPlugin
plugins[packageName] = package.classFactory(iface)
  File
"C:/Users/Sean/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\__init__.py",
line 25, in classFactory
from .ee_plugin import GoogleEarthEnginePlugin
  File "C:/PROGRA~1/QGIS3~1.12/apps/qgis/./python\qgis\utils.py", line 743,
in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File
"C:/Users/Sean/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\ee_plugin.py",
line 26, in
ee_plugin.ee_auth.init()
  File
"C:/Users/Sean/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\ee_auth.py",
line 19, in init
ee.Initialize()
  File
"C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\__init__.py",
line 123, in Initialize
ApiFunction.initialize()
  File
"C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\apifunction.py",
line 154, in initialize
signatures = data.getAlgorithms()
  File
"C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py",
line 952, in getAlgorithms
return send_('/algorithms', {}, 'GET')
  File
"C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py",
line 1762, in send_
response, content = send_with_backoff()
  File
"C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py",
line 1753, in send_with_backoff
url, method=opt_method, body=payload, headers=headers)
  File
"C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google_auth_httplib2.py",
line 187, in request
self._request, method, uri, request_headers)
  File
"C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google\auth\credentials.py",
line 124, in before_request
self.refresh(request)
  File
"C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google\oauth2\credentials.py",
line 152, in refresh
self._scopes,
  File
"C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google\oauth2\_client.py",
line 241, in refresh_grant
response_data = _token_endpoint_request(request, token_uri, body)
  File
"C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google\oauth2\_client.py",
line 115, in _token_endpoint_request
_handle_error_response(response_body)
  File
"C:\Users\Sean\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google\oauth2\_client.py",
line 60, in _handle_error_response
raise exceptions.RefreshError(error_details, response_body)
google.auth.exceptions.RefreshError: ('invalid_grant: Token has been
expired or