[Qgis-developer] QGIS remote control API
Luigi Pirelli
luipir at gmail.com
Tue Mar 14 15:29:52 PDT 2017
you can already open a project from command line, so what you need is
only to create project template, use it and start qgis on this
project.... btw if you want a more sophisticated bridge to have
control on qgis, you can simply run a plugin that start a python
simple http server (as in RemoteControl plugin) at which to send your
commands. The plugin listener will dispatch the correct execution to
qgis (it would make sense to have a plugin with commands as plugins ;)
expanding your idea the plugin can setup a webrtc client that receive
pushed stream data from a relay server => e.g. IoT devices sending
data streams.... I did a proof of concept just to test and works, it's
just few line of code... most of the code would be what to do with
these commands or data stream.
IMHO it's not necessary to have it as a core feature
cheers
Luigi Pirelli
**************************************************************************************************
* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Mastering QGIS 2nd Edition:
* https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition
**************************************************************************************************
On 14 March 2017 at 18:51, Barry Rowlingson
<b.rowlingson at lancaster.ac.uk> wrote:
> I'm doing some spatial analysis with R. I've read in a shapefile:
>
> > data = shapefile("input.shp")
>
> then I've done some analysis:
>
> > data$stats = something(data)
>
> Now I want to map it. I can use R's plot function, but that's not
> interactive, hard to add background layers and style, no labelling,
> cartography etc. I could use leaflet, but that requires JS code to get
> anything custom. So I write a shapefile:
>
> > shapefile(data, "output.shp")
>
> Start QGIS, load the shapefile, realise all my column names have been
> mashed to 12 characters (or whatever), style it. Go "huh" and think.
> Back to R. Repeat.
>
> With a QGIS remote control API I could do something like:
>
> > addQgisLayer(data)
>
> and *bang* there it is in Qgis. With data flow in that direction, Qgis
> is a cartographic display for R's spatial data. But data flow could go
> the other way - so that Qgis layers could be easily read back into R
> spatial data.
>
> In theory you could wrap the entire Python API to the remote control
> API. At that point the use cases are almost like any Python QGIS use
> cases, except expanded to any language or system that can send a web
> request. R, Matlab, JS, perl, ruby.. even Python if you want to be
> slightly perverse and can't run from the python interpreter.
>
> Barry
>
>
>
>
>
>
>
>
>
>
>
>
> On Tue, Mar 14, 2017 at 3:35 PM, Tom Chadwin <tom.chadwin at nnpa.org.uk> wrote:
>> What are some example use cases?
>>
>> Tom
>>
>>
>>
>> -----
>> Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon
>> --
>> View this message in context: http://osgeo-org.1560.x6.nabble.com/QGIS-remote-control-API-tp5312091p5312279.html
>> Sent from the QGIS - Developer mailing list archive at Nabble.com.
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the Qgis-developer
mailing list