Re: [Qgis-user] Actions HowTo
Hi, This is what I call a great group of exchange : I am impressed by your reactivity. So thanks for your answers. Nathan Woodrow gave me the way, it works fine. I just do not have the use of windows (usually using Linux) and had no knowledges about this cmd comand. - Mail original - De: "Asmus Harder" À: qgis-user@lists.osgeo.org Cc: den...@free.fr Envoyé: Mardi 6 Mars 2012 13:55:40 Objet: Re: [Qgis-user] Actions HowTo Hi Denis, Importand ist, that if you have spaces in the folder names, you have to use the double quote (") at the beginning and the end of the string. Like the example from Nathan: "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" "http://ficheinfoterre.brgm.fr/InfoterreFiche/ficheBss.action?id=%indice"; Asmus > Von: Nathan Woodrow > Denis, > > This is how I normally launch the default browser in windows using QGIS > actions. > > cmd /c start URL > > if you want to launch Chrome, this might work > > cmd /c start "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" > URL > > reference for cmd start http://ss64.com/nt/start.html > > - Nathan > > On Tue, Mar 6, 2012 at 9:31 PM, wrote: > > > Hi, > > > > Well, at the moment I am using QGIS within windows system (both French > > GUI). I tried to set up the following action : > > - open chrome > > - open the url > > http://ficheinfoterre.brgm.fr/InfoterreFiche/ficheBss.action?id=%indice > > Where indice is a field of the layer. > > > > So I tried diferent ways : > > C:/Program Files (x86)/Google/Chrome/Application/chrome.exe > > http://ficheinfoterre.brgm.fr/InfoterreFiche/ficheBss.action?id=%indice > > C:/Program Files (x86)/Google/Chrome/Application/chrome.exe > > C:/Program\ Files\ (x86)/Google/Chrome/Application/chrome.exe > > chrome.exe > > > > ... and I always get the following popup window : Impossible to lunch > > command > > > > Is there any trick for that ? > > Thanks a lot. > > > > Denis > > > > - Mail original - > > De: "Paolo Cavallini" > > À: "qgis-user" > > Envoyé: Jeudi 1 Mars 2012 10:22:51 > > Objet: [Qgis-user] Actions HowTo > > > > Hi all. > > We are writing a short howto for the new actions. We would like to add > > some more > > complex example that the usual "open the browser with this argument", > > possibly using > > coordinates and functions. Ideas and suggestions welcome. > > All the best, and thanks. > > -- > > Paolo Cavallini - Faunalia > > www.faunalia.eu > > Full contact details at www.faunalia.eu/pc > > ___ > > Qgis-user mailing list > > Qgis-user@lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/qgis-user > > ___ > > Qgis-user mailing list > > Qgis-user@lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/qgis-user > > -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Actions HowTo
Hi Paulo, > Hi all. > We are writing a short howto for the new actions. We would like to add > some more > complex example that the usual "open the browser with this argument", > possibly using > coordinates and functions. Ideas and suggestions welcome. This one is not particularly complex, but I think it would be good to include in standard tutorials or the user manual, as a lot of people would find it useful: With the new tools to run an action directly when clicking on a feature, you can reimplement the functionality of the showhideimg plugin (and the old "raster catalog" plugin?). 1) When you have a lot of raster layers spread over a wide area, build an index polygon layer with a polygon each raster extent, and the raster filename / path in an attribute field. You can do this using gdaltindex (in QGIS "Raster>Miscellaneous>Tile index"). 2) Set up an action something like this (I'm using the syntax for QGIS master): qgis.utils.iface.addRasterLayer('[% "location" %]',os.path.basename('[% "location" %]')) Now when you use the action tool it loads the raster image for the location that you click. There are two issues though: (a) If there are overlapping features, the built-in "Run feature action" tool in QGIS master only runs the action for the first feature found (#5126). Similarly, the "hotlink" plugin only runs one action on one feature each time - but at least it lists all the possible actions, so you know that there are overlapping features. (b) Unfortunately, if "Settings>Options>General>Add new layers to selected or current group" is not set, or the tile index is not in a group, then QGIS always selects a new layer when it is added. So unless you set that option and put the tile index in a group, if you then want to load raster images for another location (perhaps an adjacent tile) you need to click on the tile index layer before using the action tool again. I'm filed http://hub.qgis.org/issues/5125 about this inconsistency, but I'm not sure which behaviour is intended. If QGIS *is* intended to automatically select new layers when they are added, then I guess it wouldn't be too hard to write an action that would load the raster layer and then select the index layer again. The other feature of the showhideimg plugin is that if you click in the same area again it turns the raster layer off. I guess this could also be implemented in the layer action with a bit of work... Regards, Alister ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Actions HowTo
Hi Denis, Importand ist, that if you have spaces in the folder names, you have to use the double quote (") at the beginning and the end of the string. Like the example from Nathan: "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" "http://ficheinfoterre.brgm.fr/InfoterreFiche/ficheBss.action?id=%indice"; Asmus > Von: Nathan Woodrow > Denis, > > This is how I normally launch the default browser in windows using QGIS > actions. > > cmd /c start URL > > if you want to launch Chrome, this might work > > cmd /c start "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" > URL > > reference for cmd start http://ss64.com/nt/start.html > > - Nathan > > On Tue, Mar 6, 2012 at 9:31 PM, wrote: > > > Hi, > > > > Well, at the moment I am using QGIS within windows system (both French > > GUI). I tried to set up the following action : > > - open chrome > > - open the url > > http://ficheinfoterre.brgm.fr/InfoterreFiche/ficheBss.action?id=%indice > > Where indice is a field of the layer. > > > > So I tried diferent ways : > > C:/Program Files (x86)/Google/Chrome/Application/chrome.exe > > http://ficheinfoterre.brgm.fr/InfoterreFiche/ficheBss.action?id=%indice > > C:/Program Files (x86)/Google/Chrome/Application/chrome.exe > > C:/Program\ Files\ (x86)/Google/Chrome/Application/chrome.exe > > chrome.exe > > > > ... and I always get the following popup window : Impossible to lunch > > command > > > > Is there any trick for that ? > > Thanks a lot. > > > > Denis > > > > - Mail original - > > De: "Paolo Cavallini" > > À: "qgis-user" > > Envoyé: Jeudi 1 Mars 2012 10:22:51 > > Objet: [Qgis-user] Actions HowTo > > > > Hi all. > > We are writing a short howto for the new actions. We would like to add > > some more > > complex example that the usual "open the browser with this argument", > > possibly using > > coordinates and functions. Ideas and suggestions welcome. > > All the best, and thanks. > > -- > > Paolo Cavallini - Faunalia > > www.faunalia.eu > > Full contact details at www.faunalia.eu/pc > > ___ > > Qgis-user mailing list > > Qgis-user@lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/qgis-user > > ___ > > Qgis-user mailing list > > Qgis-user@lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/qgis-user > > -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Actions HowTo
Hi Denis, On Tue, Mar 6, 2012 at 12:31 PM, wrote: > I tried to set up the following action > ... and I always get the following popup window : Impossible to lunch command what QGis version are you using? The syntax to put field's value into an action changed in QGis master. Regards. > > Is there any trick for that ? > Thanks a lot. > > Denis > > - Mail original - > De: "Paolo Cavallini" > À: "qgis-user" > Envoyé: Jeudi 1 Mars 2012 10:22:51 > Objet: [Qgis-user] Actions HowTo > > Hi all. > We are writing a short howto for the new actions. We would like to add some > more > complex example that the usual "open the browser with this argument", > possibly using > coordinates and functions. Ideas and suggestions welcome. > All the best, and thanks. > -- > Paolo Cavallini - Faunalia > www.faunalia.eu > Full contact details at www.faunalia.eu/pc > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-user > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-user -- Giuseppe Sucameli ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Actions HowTo
Denis, This is how I normally launch the default browser in windows using QGIS actions. cmd /c start URL if you want to launch Chrome, this might work cmd /c start "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" URL reference for cmd start http://ss64.com/nt/start.html - Nathan On Tue, Mar 6, 2012 at 9:31 PM, wrote: > Hi, > > Well, at the moment I am using QGIS within windows system (both French > GUI). I tried to set up the following action : > - open chrome > - open the url > http://ficheinfoterre.brgm.fr/InfoterreFiche/ficheBss.action?id=%indice > Where indice is a field of the layer. > > So I tried diferent ways : > C:/Program Files (x86)/Google/Chrome/Application/chrome.exe > http://ficheinfoterre.brgm.fr/InfoterreFiche/ficheBss.action?id=%indice > C:/Program Files (x86)/Google/Chrome/Application/chrome.exe > C:/Program\ Files\ (x86)/Google/Chrome/Application/chrome.exe > chrome.exe > > ... and I always get the following popup window : Impossible to lunch > command > > Is there any trick for that ? > Thanks a lot. > > Denis > > - Mail original - > De: "Paolo Cavallini" > À: "qgis-user" > Envoyé: Jeudi 1 Mars 2012 10:22:51 > Objet: [Qgis-user] Actions HowTo > > Hi all. > We are writing a short howto for the new actions. We would like to add > some more > complex example that the usual "open the browser with this argument", > possibly using > coordinates and functions. Ideas and suggestions welcome. > All the best, and thanks. > -- > Paolo Cavallini - Faunalia > www.faunalia.eu > Full contact details at www.faunalia.eu/pc > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-user > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-user > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Actions HowTo
Hi, Well, at the moment I am using QGIS within windows system (both French GUI). I tried to set up the following action : - open chrome - open the url http://ficheinfoterre.brgm.fr/InfoterreFiche/ficheBss.action?id=%indice Where indice is a field of the layer. So I tried diferent ways : C:/Program Files (x86)/Google/Chrome/Application/chrome.exe http://ficheinfoterre.brgm.fr/InfoterreFiche/ficheBss.action?id=%indice C:/Program Files (x86)/Google/Chrome/Application/chrome.exe C:/Program\ Files\ (x86)/Google/Chrome/Application/chrome.exe chrome.exe ... and I always get the following popup window : Impossible to lunch command Is there any trick for that ? Thanks a lot. Denis - Mail original - De: "Paolo Cavallini" À: "qgis-user" Envoyé: Jeudi 1 Mars 2012 10:22:51 Objet: [Qgis-user] Actions HowTo Hi all. We are writing a short howto for the new actions. We would like to add some more complex example that the usual "open the browser with this argument", possibly using coordinates and functions. Ideas and suggestions welcome. All the best, and thanks. -- Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at www.faunalia.eu/pc ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Actions HowTo
Hi all. We are writing a short howto for the new actions. We would like to add some more complex example that the usual "open the browser with this argument", possibly using coordinates and functions. Ideas and suggestions welcome. All the best, and thanks. -- Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at www.faunalia.eu/pc ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user