Re: [Qgis-user] How do I pass parameters to grass7 algorithms with Processing.run?
On 10 April 2018 at 20:25, Stephen Boschwrote: > Hi Nyall: > > On Tue, Apr 10, 2018 at 2:20 AM, Nyall Dawson > wrote: >> >> On 10 April 2018 at 01:03, Stephen Bosch wrote: >> >> > I've tried calling the algorithm this way: >> > >> >> file_grid_r = processing.run("grass7:v.to.rast", {'INPUT': grid_v, >> >> 'type': >> >> 0, 'use': 1, 'GRASS_REGION_PARAMETER': extent}, feedback=None) >> > >> >> Looks correct >> >> > But it fails. On the console, I see >> > >> >> sys:1: ResourceWarning: unclosed > >> family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, >> >> laddr=('127.0.0.1', 41358), raddr=('127.0.0.1', 37307)> >> >> That can be ignored - it's unrelated. > > > (Messages like this occur only when the process exits with a code other than > 0.) > > I should add that, without using the debugger, I wouldn't be able to see the > error at all. Is that intended behaviour? Is there any way to turn it on? > The absence of exceptions and tracebacks make things fail silently, which > can have nasty consequences. > >> >> > >> > If I step through the code in PyCharm and trace the exception, I see an >> > AttributeError: 'NoneType' object has no attribute 'messageBar'. >> >> Where is this thrown? I suspect the problem is because you're passing >> "feedback=None" and somewhere there's code which is expecting a valid >> feedback object. Can you let me know which line the exception is >> thrown on and I'll fix? > > > It is thrown in line 42 of MessageBarProgress.py: > __init__ [MessageBarProgress.py:42] id:94435226437000 Thanks, fixed in https://github.com/qgis/QGIS/commit/d5573a5a7bf5a32490b50f528da10c6f58871eab > > After correcting the statement to the following: > >> file_grid_r = QgsRasterLayer() >> processing.run("grass7:v.to.rast", {'input': grid_v, 'type': 0, 'use': 1, >> 'GRASS_REGION_PARAMETER': extent, >> 'output': file_grid_r, >> 'GRASS_REGION_CELLSIZE_PARAMETER': >> 0.008333, >> 'GRASS_SNAP_TOLERANCE_PARAMETER': -1, >> 'GRASS_MIN_AREA_PARAMETER': 0.000100}, >> feedback=QgsProcessingFeedback()) > > > I get the message > >> Unable to execute algorithm >> Incorrect parameter value for output The OUTPUT parameter should be set to the path to save the result, e.g. 'd:\blahblah.tif": processing.run("grass7:v.to.rast", {'input': grid_v, 'type': 0, 'use': 1, 'GRASS_REGION_PARAMETER': extent, 'output': 'd:\blah.tif', 'GRASS_REGION_CELLSIZE_PARAMETER': 0.008333, 'GRASS_SNAP_TOLERANCE_PARAMETER': -1, 'GRASS_MIN_AREA_PARAMETER': 0.000100}, feedback=QgsProcessingFeedback()) processing.run will return a dict a results, and inside that you'll automatically have a QgsRasterLayer loaded corresponding to this output. E.g. params = { ., 'OUTPUT': 'd:\blah.tif' } results = processing.run('grass7:v.to.rast', params, feedback ) my_raster_layer = results['OUTPUT'] assert my_raster_layer.isValid() Here my_raster_layer will be a QgsRasterLayer, ready for further processing or adding to the project for visualisation. I'm pondering whether we should automatically set output locations to temporary files if they aren't specified. E.g. if you don't set OUTPUT to 'd:\blah.tif', it'll fill it in automatically with a .tif file in your temp folder... Nyall > I've tried a couple of variations (specifying 'output' as an index and > assigning it to a variable while setting 'output': None in the dictionary, > for example) and get the same error. > > In my 2.x code, I just used the index and assigned the return to a variable. > The implementation of v.to.rast for QGIS 3 Processing seems to require a > value for output, and simply putting an variable doesn't work either (it > complains that the variable is undefined). > > With a few more hints, I'm sure I'll get the hang of this ;-) > > Thanks > > Stephen ___ 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] QGIS Annual General Meeting - 2018
Dear QGIS Community We recently held our 2018 QGIS Annual General Meeting. The minutes of this meeting are available [1] for all to view. As I have previously announced, I have decided to step down as chair of the PSC this year, so this email is my last official act as QGIS Chair. Thank you all for the kind words and deeds of support you gave me during my time as project chair. I would like to welcome our new QGIS Board Chair: Paolo Cavallini, and our new QGIS Board Vice-Chair and QGIS PSC Member, Marco Bernasocchi. In case you are not familiar with Paolo and Marco, you can find short introductions to them below. I am pleased also to say that the project governance is in good hands with Richard Duivenvoorde, Jürgen Fischer, Andreas Neumann and Anita Graser kindly making themselves available to serve on the PSC for another two years. It is also great to know that our project founder, Gary Sherman, continues to serve on the PSC as honorary PSC member. Gary set the standard for our great project culture and it is great to have his continued presence. QGIS has been growing from strength to strength, backed by a really amazing community of kind and collaborative users, developers, contributors and funders. I am looking forward to seeing how it continues to grow and flourish and I am excited and confident it will do so with Paolo acting as the project chair and representative. Rock on QGIS! — Paolo Cavallini: I got involved in QGIS long ago, first as an user, then more and more deeply in various activities, initiating and supporting various plugins and core functions (e.g. GDAL Tools, DB Manager), opening and managing bugs, taking care of GRASS modules, handling the trademark registration, etc . I acted as Finance and Marketing Advisor for several years. Currently I manage the plugin approval process. Motivation: It's such a pleasure building up, in a truly cooperative and democratic way, together with truly intelligent people, a tool that enables people to freely do their job or pursue their interests, that I cannot resist helping as much as I can. — Marco Bernasocchi (http://berna.io @mbernasocchi) I am an open source advocate, consultant, teacher and developer. My background is in geography with a specialization in geographic information science. I live in Switzerland in a small Romansh speaking mountain village where I love scrambling around the mountains to enjoy the feeling of freedom it gives me. I’m a very communicative person, I fluently speak Italian, German, French English and Spanish and love travelling. I work as director of OPENGIS.ch which I founded in 2011. Since 2015 I share the company ownership with Matthias Kuhn. At OPENGIS.ch LLC we (4 superstar devs and myself) develop, train and consult our client on any aspect related to QGIS. My first QGIS (to be correct for that time QuantumGIS) ever was “Simon (0.6)” during my BSc when the University of Zurich was teaching us propriertary products and I started looking around for Open Source alternatives. In 2008, when starting my MSc, I made the definitive switch to ubuntu and I started working more and more with QGIS Metis (0.11) and ended developing some plugins and part of Globe as my Masters thesis. Since three years the University of Zurich invites me to hold two seminars on Entrepreneurship and Open Source. In November 2011 I attended my first Hackfest in Zürich where I started porting all QGIS dependencies and developing QGIS for Android under a Google Summer of Code. A couple of years and a lot of work later QField was born. Since then I’ve always tried to attend at least to one Hackfest per year to be able to feel first hand the strong bonds within our very welcoming community. In 2013 i was lucky enough to have a release named after a suggestion I saved you all from having QGIS 2.0 - Hönggerberg and giving you instead QGIS 2.0 - Dufour Beside my long story with QGIS as user and passionate advocate I have a long story as QGIS service provider where we are fully committed to its stability, feature richness and sustainable development. Furthermore, as WorldBank consultant I am lucky enough to be sent now and then to spread the QGIS goodness in less fortunate countries. Motivation: One of my main motivation to be part of the PSC is to help QGIS keep this incredible growth rate by being even more attractive to new community members, sponsors and large/corporate users. To achieve this, key is maintaining the right balance between sustainable processes (that guarantee the great quality QGIS has been known for) and an interesting and motivating grassroot project where community members can bloom and enjoy contributing in their most creative ways. — [1] https://drive.google.com/file/d/1Rsjw6MJGnEHV6czL2CtLVJmCl7MPMY57/view?usp=sharing Regards --- Tim Sutton Outgoing QGIS Project Steering Committee Chair t...@qgis.org
[Qgis-user] Some questions for my project
Hey everyone, I am new to QGIS and GIS and general and I hope to find some answers for my project. First I want to create my own map with an own coordinate system in QGIS. For this I am working with the training manual right now to get a good overview of everything QGIS has to offer. Afterwards I want to transfer this map on a Raspberry Pi 3 Model B. From what I heard, others already got this done and I think this should also be possible for me. What my question is now about, is that I want to receive position data (coordinates) from another program (not a GPS) on the raspberry and track that position on my map. Even better with a visualization on my desktop. Another thing I want to do is something like a navigation system, where I can give coordinates to the map and get a live navigation back from it. Is something like pushing your own Position data on the map while being online generally possible? How should I start working on it and where might I find more Information about that? I hope I am even at the right place here for this. If not I am sorry and hope you guys will correct me! ___ 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-it-user] modificare dati filtrati
Luca Puglisi wrote > Buonasera, > > filtrando i dati di un layer sulla base di un valore di un attributo, > non e' piu' possibile editare tale layer. Tuttavia spesso e' necessario > ridurre il numero degli elementi selezionati per poterli visualizzare > adeguatamente, fare verifiche del caso e quindi modificare qualcosa > nella tabella degli attributi: c'e' un escamotage che si puo' > utilizzare? Sto usando QGis 2.18. É un bug che ho segnalato da mesi. Saluti - https://pigrecoinfinito.wordpress.com/ -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html ___ QGIS-it-user mailing list QGIS-it-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/qgis-it-user
[QGIS-it-user] modificare dati filtrati
Buonasera, filtrando i dati di un layer sulla base di un valore di un attributo, non e' piu' possibile editare tale layer. Tuttavia spesso e' necessario ridurre il numero degli elementi selezionati per poterli visualizzare adeguatamente, fare verifiche del caso e quindi modificare qualcosa nella tabella degli attributi: c'e' un escamotage che si puo' utilizzare? Sto usando QGis 2.18. Grazie per eventuali suggerimenti Luca --- Questa e-mail è stata controllata per individuare virus con Avast antivirus. https://www.avast.com/antivirus ___ QGIS-it-user mailing list QGIS-it-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/qgis-it-user
Re: [Qgis-user] How to Prevent GeoPackage file from updating modified date when viewed in a Qgis project when it is not being edited
Me wrote: > Bingo! Seems it's exactly the 2.18 issue. I'll backport it this afternoon > (unless you guys are faster) and ensure it helps. Ooops, not today, as I just realized I don't have GDAL 2 in my ld QGIS2 dev environment (and Qt4 in my current one). I'll sort it out before the 2.18.19 release. Borys ___ 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] How do I pass parameters to grass7 algorithms with Processing.run?
Hi Nyall: On Tue, Apr 10, 2018 at 2:20 AM, Nyall Dawsonwrote: > On 10 April 2018 at 01:03, Stephen Bosch wrote: > > > I've tried calling the algorithm this way: > > > >> file_grid_r = processing.run("grass7:v.to.rast", {'INPUT': grid_v, > 'type': > >> 0, 'use': 1, 'GRASS_REGION_PARAMETER': extent}, feedback=None) > > > > Looks correct > > > But it fails. On the console, I see > > > >> sys:1: ResourceWarning: unclosed >> family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, > >> laddr=('127.0.0.1', 41358), raddr=('127.0.0.1', 37307)> > > That can be ignored - it's unrelated. > (Messages like this occur only when the process exits with a code other than 0.) I should add that, without using the debugger, I wouldn't be able to see the error at all. Is that intended behaviour? Is there any way to turn it on? The absence of exceptions and tracebacks make things fail silently, which can have nasty consequences. > > > > If I step through the code in PyCharm and trace the exception, I see an > > AttributeError: 'NoneType' object has no attribute 'messageBar'. > > Where is this thrown? I suspect the problem is because you're passing > "feedback=None" and somewhere there's code which is expecting a valid > feedback object. Can you let me know which line the exception is > thrown on and I'll fix? > It is thrown in line 42 of MessageBarProgress.py: __init__ [MessageBarProgress.py:42] id:94435226437000 In the meantime try passing a feedback object: > >feedback = QgsProcessingFeedback() > That seemed to correct the messageBar error, thanks. After correcting the statement to the following: file_grid_r = QgsRasterLayer() > processing.run("grass7:v.to.rast", {'input': grid_v, 'type': 0, 'use': 1, > 'GRASS_REGION_PARAMETER': extent, > 'output': file_grid_r, > 'GRASS_REGION_CELLSIZE_PARAMETER': > 0.008333, > 'GRASS_SNAP_TOLERANCE_PARAMETER': -1, > 'GRASS_MIN_AREA_PARAMETER': 0.000100}, > feedback=QgsProcessingFeedback()) > I get the message Unable to execute algorithm > Incorrect parameter value for output > I've tried a couple of variations (specifying 'output' as an index and assigning it to a variable while setting 'output': None in the dictionary, for example) and get the same error. In my 2.x code, I just used the index and assigned the return to a variable. The implementation of v.to.rast for QGIS 3 Processing seems to require a value for output, and simply putting an variable doesn't work either (it complains that the variable is undefined). With a few more hints, I'm sure I'll get the hang of this ;-) Thanks Stephen ___ 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] Ubuntu 14.04 debian-ltr install fails with "gnutls_handshake() failed: Handshake failed"
When they say an old version is out of support, it really is. it takes way too much work to build and maintain packages for all the different current distros, never mind out of support ones. Because the version you get from this repo is 2.14, which is no longer supported. On 10/04/18 06:00, co...@froggatt.com wrote: Hi. I am trying to install QGis for the first time on Ubuntu Trusty 14.04. I am getting the following error when running apt-get update, "gnutls_handshake() failed: Handshake failed" (see console log below) I have followed instructions from https://qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu and added following entries to |/etc/apt/sources.list| deb https://qgis.org/debian-ltr trusty main deb-src https://qgis.org/debian-ltr trusty main $sudo apt-get update ... Ign https://packagecloud.io jessie/main Translation-en_GB Ign https://packagecloud.io jessie/main Translation-en Ign https://qgis.org trusty InRelease Ign https://qgis.org trusty Release.gpg Ign https://qgis.org trusty Release Err https://qgis.org trusty/main Sources gnutls_handshake() failed: Handshake failed Err https://qgis.org trusty/main amd64 Packages gnutls_handshake() failed: Handshake failed Err https://qgis.org trusty/main i386 Packages gnutls_handshake() failed: Handshake failed Ign https://qgis.org trusty/main Translation-en_GB Ign https://qgis.org trusty/main Translation-en W: Failed to fetch https://qgis.org/debian-ltr/dists/trusty/main/source/Sources gnutls_handshake() failed: Handshake failed W: Failed to fetch https://qgis.org/debian-ltr/dists/trusty/main/binary-amd64/Packages gnutls_handshake() failed: Handshake failed W: Failed to fetch https://qgis.org/debian-ltr/dists/trusty/main/binary-i386/Packages gnutls_handshake() failed: Handshake failed E: Some index files failed to download. They have been ignored, or old ones used instead. $ I have also tried adding the repository public key but it made no difference. Any help, ideas or pointers in this would be greatly appreciated. thanks, Colin __ Reduce - Reuse - Recyclehttp://www.freecycle.org/ http://www.recycle-more.co.uk/ http://yorkrecycling.net/ ___ 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] Sth similar to GEarthView in qgis3
What about the QuickMapServices plugin ? For Google you need to get the contributed pack in the settings. Didier > Le 10 avr. 2018 à 09:53, Piotr Kaniaa écrit : > > Hi! > I look for "sth" similar to GEarthView plugin's functionality in qgis3 - > maybe there is some python code, that could do the "magic"? > ___ > 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] Ubuntu 14.04 debian-ltr install fails with "gnutls_handshake() failed: Handshake failed"
Am 09.04.18 um 20:00 schrieb co...@froggatt.com: Hi. I am trying to install QGis for the first time on Ubuntu Trusty 14.04. I am getting the following error when running apt-get update, "gnutls_handshake() failed: Handshake failed" (see console log below) I have followed instructions from https://qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu and added following entries to /etc/apt/sources.list deb https://qgis.org/debian-ltr trusty main deb-src https://qgis.org/debian-ltr trusty main $sudo apt-get update... Ign https://packagecloud.io jessie/main Translation-en_GB Ign https://packagecloud.io jessie/main Translation-en Ign https://qgis.org trusty InRelease Ign https://qgis.org trusty Release.gpg Ign https://qgis.org trusty Release Err https://qgis.org trusty/main Sources gnutls_handshake() failed: Handshake failed Err https://qgis.org trusty/main amd64 Packages gnutls_handshake() failed: Handshake failed Err https://qgis.org trusty/main i386 Packages gnutls_handshake() failed: Handshake failed Ign https://qgis.org trusty/main Translation-en_GB Ign https://qgis.org trusty/main Translation-en W: Failed to fetch https://qgis.org/debian-ltr/dists/trusty/main/source/Sources gnutls_handshake() failed: Handshake failed Looks like an SSL problem. Make sure to have all updates from the main ubuntu repo installed before trying to install QGIS. And maybe update from trusty to xenial. HTH, Andre Joost ___ 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] How to Prevent GeoPackage file from updating modified date when viewed in a Qgis project when it is not being edited
On mardi 10 avril 2018 08:11:30 CEST Richard Duivenvoorde wrote: > On 09-04-18 22:22, Even Rouault wrote: > > Or perhaps have some option in a dialog box somewhere! "I promise that I > > will not edit this file in any concurrent session, or in this session, so > > you can safely open it in DELETE mode" ? Or spend more time digging again > > into the details of sqlite locking to see if we could make a clever use > > of it, and/or possibly improving it in sqlite itself (rather involved!) > > I would be ok with an option in the dialog, though it is hard to promise > that somebody *else* will not open it too in a non readonly mode, in a > networked work environment ... You'll have issues with sqlite in a networking environment, as WAL cannot work in that context (QGIS does some effort to detect if the file location is a network driver or not, before deciding to turn WAL on). So you'll get the default journaling behaviour, which is lock prone. > > Is it a possibility (at least on linux) to look at the file permissions? > That would open the possibility to put a read-only (permissioned) file, > and in that way you would promise to not edit/delete? Just tested: QGIS can open file a read-only .gpkg on Linux (it will fallback to the default journaling mode), and presumably on Windows as well. Or were you talking about some side car files that would be used to application level locking ? -- Spatialys - Geospatial professional services http://www.spatialys.com ___ 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] 3D View Crash and Bug Reporting
I am using v3.0.1 and when I rotate a 3D view, QGIS crashes. I have tried to use the bug reporting system but I cannot seem to register. It says it has sent me a confirmatory email, but it never arrives. Cheers Grant Grant Boxer Perth, Western Australia ___ 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] Sth similar to GEarthView in qgis3
Hi! I look for "sth" similar to GEarthView plugin's functionality in qgis3 - maybe there is some python code, that could do the "magic"? ___ 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] How to Prevent GeoPackage file from updating modified date when viewed in a Qgis project when it is not being edited
Thanks a lot! Dnia wtorek, 10 kwietnia 2018 09:01:56 CEST Alessandro Pasotti pisze: > See: > > https://github.com/qgis/QGIS/commit/ 1d4c6061a8a5512092041aafea14a8a32247d046 > #diff-e89106528fe0226767dfccab355e44dc > > but I'm afraid this wasn't all of it. Bingo! Seems it's exactly the 2.18 issue. I'll backport it this afternoon (unless you guys are faster) and ensure it helps. Regards, Borys ___ 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] How to Prevent GeoPackage file from updating modified date when viewed in a Qgis project when it is not being edited
Dnia wtorek, 10 kwietnia 2018 08:11:48 CEST Alessandro Pasotti pisze: > Hi, I also faced this problem when Implementing gpkg support in the QGIS > browser panel: when the file browser scanned the folder, it opened the > gpkg, which in turn changed its file stats and made the directory watcher > think that something has changed in the directory, which in turns started > scanning again in a delicious endless loop :) > > I think I solved this with a kind of locker for the directory scan thread, > but it was't easy. Ah so this it the loop in 2.18... Could you recall that commit that fixed it in 3.0? I understand it's not trivial to backport it to 2.18? Regards, Borys ___ 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] How to Prevent GeoPackage file from updating modified date when viewed in a Qgis project when it is not being edited
> Hi Borys, > > Are you sure that this is also a problem with 2.x? > > If I remember correctly 2.x browser panel does not open gpkg for scanning > contents, this feature was added for 3.x. It doesn't show the GPKG contents, but it starts the loop (sometimes?) when scanning a directory containing a GPKG. Now I recall also a rush in the system file browser - like the wal and shm files were repeatedly removed and created back. I don't remember with which QGIS version and which OS I observed it, but I'll try to reproduce it. Regards, Borys PS. Shouldn't we move to the developer ML? :) ___ 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] How to Prevent GeoPackage file from updating modified date when viewed in a Qgis project when it is not being edited
See: https://github.com/qgis/QGIS/commit/1d4c6061a8a5512092041aafea14a8a32247d046#diff-e89106528fe0226767dfccab355e44dc but I'm afraid this wasn't all of it. See also: https://github.com/qgis/QGIS/commit/bcb48f2bdc8f274cbc68f376489430f45e0b17d1#diff-e89106528fe0226767dfccab355e44dc On Tue, Apr 10, 2018 at 8:55 AM, Nyall Dawsonwrote: > On 10 April 2018 at 16:47, Alessandro Pasotti wrote: > > On Tue, Apr 10, 2018 at 8:33 AM, Borys Jurgiel > > wrote: > >> > >> Dnia wtorek, 10 kwietnia 2018 08:11:48 CEST Alessandro Pasotti pisze: > >> > >> > >> > >> > Hi, I also faced this problem when Implementing gpkg support in the > QGIS > >> > >> > browser panel: when the file browser scanned the folder, it opened the > >> > >> > gpkg, which in turn changed its file stats and made the directory > >> > watcher > >> > >> > think that something has changed in the directory, which in turns > >> > started > >> > >> > scanning again in a delicious endless loop :) > >> > >> > > >> > >> > I think I solved this with a kind of locker for the directory scan > >> > thread, > >> > >> > but it was't easy. > >> > >> > >> > >> Ah so this it the loop in 2.18... Could you recall that commit that > fixed > >> it in 3.0? I understand it's not trivial to backport it to 2.18? > > > > > > Hi Borys, > > > > Are you sure that this is also a problem with 2.x? > > > > If I remember correctly 2.x browser panel does not open gpkg for scanning > > contents, this feature was added for 3.x. > > I've seen this with recent versions of 2.18 > > Nyall > -- Alessandro Pasotti w3: www.itopen.it ___ 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] How to Prevent GeoPackage file from updating modified date when viewed in a Qgis project when it is not being edited
On 10 April 2018 at 16:47, Alessandro Pasottiwrote: > On Tue, Apr 10, 2018 at 8:33 AM, Borys Jurgiel > wrote: >> >> Dnia wtorek, 10 kwietnia 2018 08:11:48 CEST Alessandro Pasotti pisze: >> >> >> >> > Hi, I also faced this problem when Implementing gpkg support in the QGIS >> >> > browser panel: when the file browser scanned the folder, it opened the >> >> > gpkg, which in turn changed its file stats and made the directory >> > watcher >> >> > think that something has changed in the directory, which in turns >> > started >> >> > scanning again in a delicious endless loop :) >> >> > >> >> > I think I solved this with a kind of locker for the directory scan >> > thread, >> >> > but it was't easy. >> >> >> >> Ah so this it the loop in 2.18... Could you recall that commit that fixed >> it in 3.0? I understand it's not trivial to backport it to 2.18? > > > Hi Borys, > > Are you sure that this is also a problem with 2.x? > > If I remember correctly 2.x browser panel does not open gpkg for scanning > contents, this feature was added for 3.x. I've seen this with recent versions of 2.18 Nyall ___ 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] How to Prevent GeoPackage file from updating modified date when viewed in a Qgis project when it is not being edited
On Tue, Apr 10, 2018 at 8:33 AM, Borys Jurgielwrote: > Dnia wtorek, 10 kwietnia 2018 08:11:48 CEST Alessandro Pasotti pisze: > > > > > Hi, I also faced this problem when Implementing gpkg support in the QGIS > > > browser panel: when the file browser scanned the folder, it opened the > > > gpkg, which in turn changed its file stats and made the directory watcher > > > think that something has changed in the directory, which in turns started > > > scanning again in a delicious endless loop :) > > > > > > I think I solved this with a kind of locker for the directory scan > thread, > > > but it was't easy. > > > > Ah so this it the loop in 2.18... Could you recall that commit that fixed > it in 3.0? I understand it's not trivial to backport it to 2.18? > Hi Borys, Are you sure that this is also a problem with 2.x? If I remember correctly 2.x browser panel does not open gpkg for scanning contents, this feature was added for 3.x. -- Alessandro Pasotti w3: www.itopen.it ___ 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] How to Prevent GeoPackage file from updating modified date when viewed in a Qgis project when it is not being edited
On Tue, Apr 10, 2018 at 12:07 AM, rjwillsonwrote: > Thanks Even, > > It definitely doesn't sound like an easy solution. > > I wonder how others deal with it and maybe someone in the developers list > will have some ideas > > I have just been applying band aid fixes for the last year to prevent the > gpkgs from updating themselves but yesterday I discovered the beauty of > storing rasters in the gpkg format. Unfortunately the rasters make the > gpkgs large and so I can't have them just start uploading on a field tablet > via cell connection when they get viewed in Q or other app like Roam. > > Hi, I also faced this problem when Implementing gpkg support in the QGIS browser panel: when the file browser scanned the folder, it opened the gpkg, which in turn changed its file stats and made the directory watcher think that something has changed in the directory, which in turns started scanning again in a delicious endless loop :) I think I solved this with a kind of locker for the directory scan thread, but it was't easy. I feel that it would be really useful is we could open a gpkg from GDAL in read-only mode without creating the WAL, expecially without creating the WAL in the same directory (but I guess this is by design, buried deep into sqlite code). -- Alessandro Pasotti w3: www.itopen.it ___ 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] How to Prevent GeoPackage file from updating modified date when viewed in a Qgis project when it is not being edited
On 09-04-18 22:22, Even Rouault wrote: > Or perhaps have some option in a dialog box somewhere! "I promise that I will > not edit this file in any concurrent session, or in this session, so you can > safely open it in DELETE mode" ? Or spend more time digging again into the > details of sqlite locking to see if we could make a clever use of it, and/or > possibly improving it in sqlite itself (rather involved!) I would be ok with an option in the dialog, though it is hard to promise that somebody *else* will not open it too in a non readonly mode, in a networked work environment ... Is it a possibility (at least on linux) to look at the file permissions? That would open the possibility to put a read-only (permissioned) file, and in that way you would promise to not edit/delete? There have been other issues also with the wal-files (eg browser was also rescanning dirs etc), so it would be cool to come up with / invest in a good solution? Regards, Richard ___ 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