Re: [QGIS-Developer] Error trying to import linear_model from sklearn in Qgis

2019-10-25 Thread Akbar Gumbira
Even though it works fine on my local (QGIS 3.8.3, Mac, Python 3.7, sklearn
0.21.3), I often encountered that error, most of the time related to floats
operation (e.g np.float32 not JSON serializable)

Python Console

Use iface to access QGIS API interface or Type help(iface) for more info

Security warning: typing commands from an untrusted source can lead to data
> loss and/or leak

>> from sklearn import linear_model

>> import numpy as np

>> X = np.random.randint(10, size=(10, 2))

>> Y = np.random.rand(10, 1)

>> X.shape, Y.shape

((10, 2), (10, 1))

>> reg = linear_model.LinearRegression().fit(X, Y)




On Fri, Oct 25, 2019 at 12:30 AM Xavier Corredor Llano <
xavier.corredor.ll...@gmail.com> wrote:

> Hello everyone,
>
> I don't know if this is a bug in Qgis or it happens only to me.
>
> The linear_model from sklearn works perfectly outside Qgis, but when I try
> to import that library inside python shell in Qgis it's not possible:
>
> To reproduce the error is just when you import the library like this:
> from sklearn import linear_model
>
> The error:
> RecursionError: maximum recursion depth exceeded
>
> Does anyone have the same problem? any ideas?
>
> (using Qgis 3.8.3, sklearn 0.21.3, python 3.7.4 and Archlinux)
>
> Xavier
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



-- 

*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Welcome Ismail Sunni for this year's GSoC

2019-05-08 Thread Akbar Gumbira
Congratulations Ismail! Keep making QGIS cool! :-)

On Tue, May 7, 2019 at 11:54 PM Martin Dobias  wrote:

> Hi all
>
> It is my pleasure to announce that this year's Google Summer of Code
> program will include a project from Ismail Sunni to work on several
> QGIS 3D improvements:
> https://summerofcode.withgoogle.com/projects/#5265985207009280
>
> Looking forward to having Ismail working on this project!
>
> Cheers
> Martin
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



-- 

*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Transfer Ownership of QGIS Resource Sharing plugin

2018-03-26 Thread Akbar Gumbira
Dear QGIS Developers,

I feel ashamed to write this, but for the betterment of the QGIS community,
I think this is for the best.

Nowadays I am working mostly on ML problems, I rarely get the chance to
work on QGIS (ok, I just checked the last checked out upstream QGIS and it
is almost 1 year ago - please don't throw something at me :)). Every once
in a while, I would get emails asking about some issues in the plugin -
which I always thought I would be able to spend some time to fix the
problem, but in reality it is not the case.

So, with this email, I am asking if there is someone willing to maintain it
with better care? I am happy to transfer it if it would be well taken care
of.

Regards

-- 

*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Just in time: Seeking mentors for development of a Deep Learning model applied to Remote Sensing Data

2018-03-23 Thread Akbar Gumbira
Don't forget to also research some things (or maybe other developers who
know will comment on this thread right away), that:

   1. Even when users want to train a model themselves, the environment in
   Python Plugin wouldn't make it easy e.g. for running on GPU
   2. Designing a network is an art in itself. The goal of the plugin
   should be clear, to facilitate users who are familiar with DL or for
   general QGIS users? to create really good models or to apply the models? (I
   feel that if it is the first, QGIS is not the best framework to do it)
   3. Transfer learning is not out of the box (I wrote my thesis about
   this). It depends on many things from the architecture itself to the data
   that it was originally trained on. Things like this would not interest
   general QGIS users in my opinion.

It would also help if you make more detailed use cases so people would
understand about what this plugin will do.

Good luck!

Cheers

On Fri, Mar 23, 2018 at 3:35 PM, Evandro Carrijo <evandro.taqu...@gmail.com>
wrote:

> Hello Akbar,
>
> This is an important remark. The Plugin could provide three scenarios at
> all:
>
>1. Train the model from scratch (when there's sufficient computational
>resources);
>2. Use Transfer Learning, that is, use models with pre-trained weights;
>3. Like you suggest, fetch the desired model from a *zoo platform* suitable
>to his data.
>
> An important caveat, although, is that the models can be very
> region-specific, that is when the scenarios 1 and 2 are applicable. Also,
> user can fetch well consolidated models from the *model zoo platform* as
> basis and tune their models as of them.
>
> I'm going to write my proposal right away, so that ideas are going to take
> place. As soon as I have the first version of it I will share with you guys.
>
> Thank your for you precious advices!
>
> Cheers
>
> 2018-03-23 11:12 GMT-03:00 Akbar Gumbira <akbargumb...@gmail.com>:
>
>> Hi (again),
>>
>>
>>> The RNN model can then be shipped into a QGIS Plugin with a convenient
>>> interface such that one could accomplish the following tasks:
>>>
>>>- Select the input data;
>>>
>>>
>>>- Adjust some model hyperparameters (if desirable);
>>>
>>>
>>>- Train the RNN;
>>>
>>>
>>>- Export the generated model for persistence;
>>>
>>>
>>>- Use the model to produce a LCLU map for the specified targets.
>>>
>>> The idea is to start a new Plugin that use not only RNN models, but, in
>>> the future, incorporate many other novel approaches to perform accurate LCLU
>>> maps, like semantic segmentation using U-Nets and a combination of the two
>>> approaches.
>>>
>> Not everyone probably wants (or has the resources) to train the data. Why
>> not, for example, have a model zoo platform where users can share their
>> models for particular defined classifications? or will the training always
>> be lightweight and instant?
>>
>> Cheers
>>
>>
>> On Fri, Mar 23, 2018 at 2:52 PM, Evandro Carrijo <
>> evandro.taqu...@gmail.com> wrote:
>>
>>> Hello there!
>>>
>>> I'm a Computer Science Master's Degree student whose research if focused
>>> on Deep Learning algorithms applied to Remote Sensing. Currently working at
>>> the Laboratory of Image Processing and Geoprocessing
>>> <https://github.com/lapig-ufg> settled at Federal University of Goiás -
>>> Brazil. I'm also member of the High Performance Computing group of the same
>>> university (more information here
>>> <http://dgp.cnpq.br/dgp/espelhogrupo/7985061476854055>).
>>>
>>> Below I present an idea to explain how I can contribute to OSGeo/QGIS
>>> community and I'm seeking for mentors interested in assist my development.
>>> Please, feel free to argue me any matter about the project idea.
>>>
>>> I would also appreciate a lot if you guys indicate a potential
>>> interested mentor to my project idea.
>>>
>>> Hope there's some Interested ones out there!
>>>
>>> Idea
>>>
>>> The increasing number of sensors orbiting the earth is systematically
>>> producing larger volumes of data, with better spatiotemporal resolutions.
>>> To deal with that, better accurate machine learning approaches, such as
>>> Deep Learning (DL), are needed to transform raw data into applicable
>>> Information. Several DL architectures (e.g. CNN, semantic segmentation)
>>> rely only at spatial dimension to perform, for exampl

Re: [QGIS-Developer] Just in time: Seeking mentors for development of a Deep Learning model applied to Remote Sensing Data

2018-03-23 Thread Akbar Gumbira
Hi (again),


> The RNN model can then be shipped into a QGIS Plugin with a convenient
> interface such that one could accomplish the following tasks:
>
>- Select the input data;
>
>
>- Adjust some model hyperparameters (if desirable);
>
>
>- Train the RNN;
>
>
>- Export the generated model for persistence;
>
>
>- Use the model to produce a LCLU map for the specified targets.
>
> The idea is to start a new Plugin that use not only RNN models, but, in
> the future, incorporate many other novel approaches to perform accurate LCLU
> maps, like semantic segmentation using U-Nets and a combination of the two
> approaches.
>
Not everyone probably wants (or has the resources) to train the data. Why
not, for example, have a model zoo platform where users can share their
models for particular defined classifications? or will the training always
be lightweight and instant?

Cheers


On Fri, Mar 23, 2018 at 2:52 PM, Evandro Carrijo <evandro.taqu...@gmail.com>
wrote:

> Hello there!
>
> I'm a Computer Science Master's Degree student whose research if focused
> on Deep Learning algorithms applied to Remote Sensing. Currently working at
> the Laboratory of Image Processing and Geoprocessing
> <https://github.com/lapig-ufg> settled at Federal University of Goiás -
> Brazil. I'm also member of the High Performance Computing group of the same
> university (more information here
> <http://dgp.cnpq.br/dgp/espelhogrupo/7985061476854055>).
>
> Below I present an idea to explain how I can contribute to OSGeo/QGIS
> community and I'm seeking for mentors interested in assist my development.
> Please, feel free to argue me any matter about the project idea.
>
> I would also appreciate a lot if you guys indicate a potential interested
> mentor to my project idea.
>
> Hope there's some Interested ones out there!
>
> Idea
>
> The increasing number of sensors orbiting the earth is systematically
> producing larger volumes of data, with better spatiotemporal resolutions.
> To deal with that, better accurate machine learning approaches, such as
> Deep Learning (DL), are needed to transform raw data into applicable
> Information. Several DL architectures (e.g. CNN, semantic segmentation)
> rely only at spatial dimension to perform, for example, land-cover/land-use
> (LCLU) maps, disregarding the temporal dependencies between pixels
> observations over the time. Also, high-res remote sensing data (e.g.
> Planet, Sentinel) may provide more consistent time-series, that can be use
> in the identification of important LCLU classes, like crop, pastureland and
> grasslands.
>
> This potential can be explored using Recurrent Neural Networks (RNN), a
> specific family of DL approaches which can take into account time
> dimension. A promising project idea would be implement a RNN approach (e.g.
> LSTM) to classify, for example, a Sentinel time-series, that will organize
> and preprocess the input data set (e.g. labeled time-series), calibrate and
> evaluate a RNN model, and finally classify an entire region (i.e. 2 or 3
> scenes) to produce a map for one or more LCLU class. It will be great
> evaluate the accuracy and the spatial consistent of a map produced with a
> RNN approach.
>
> The RNN model can then be shipped into a QGIS Plugin with a convenient
> interface such that one could accomplish the following tasks:
>
>
>- Select the input data;
>- Adjust some model hyperparameters (if desirable);
>- Train the RNN;
>- Export the generated model for persistence;
>- Use the model to produce a LCLU map for the specified targets.
>
> The idea is to start a new Plugin that use not only RNN models, but, in
> the future, incorporate many other novel approaches to perform accurate LCLU
> maps, like semantic segmentation using U-Nets and a combination of the two
> approaches.
>
> A simple example on classifying LCLU with two classes (pastureland and
> non-pastureland):
>
> [image: itapirapua]
> <https://user-images.githubusercontent.com/37085598/37687055-cc5236a8-2c78-11e8-8892-d113df44e235.jpg>
> *Target region (input)*
>
> [image: itapirapua_ref]
> <https://user-images.githubusercontent.com/37085598/37732806-ec792782-2d24-11e8-8ad9-18867768e998.jpg>
> *Generated LCLU map (output)*
> Best,
>
> Evandro Carrijo Taquary
> Federal University of Goiás
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 

*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Deleting Plugin Versions & Download Stats

2017-11-07 Thread Akbar Gumbira
Probably no. Plugin has its own counter downloads triggered from every
version download
https://github.com/qgis/QGIS-Django/blob/master/qgis-app/plugins/views.py#L882
and there is nothing to substract the number of download in that field
whenever the author delete the version (
https://github.com/qgis/QGIS-Django/blob/master/qgis-app/plugins/views.py#L796
)

Cheers

On Tue, Nov 7, 2017 at 9:24 PM, C Hamilton <adenacult...@gmail.com> wrote:

> If I delete some of my older plugin versions, does that also delete its
> download stats from the overall stats?
>
> I don't see any reason to keep some of the oldest versions of my plugins,
> but I don't particularly want to reduce the overall download stats either.
>
> Thanks,
>
> Calvin
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 

*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Which templating engine for QGIS Python Plugins?

2017-04-12 Thread Akbar Gumbira
Jinja is already packaged in QGIS so you wouldn't need to package it in
your plugin if you use it.

On Apr 12, 2017 15:27, "Stefan Keller"  wrote:

> Hi,
>
> I have at least two use cases for QGIS Python plugins where I see the
> need for "Templating in Python".
> Do you devs have any preferences (there are so many in Python..[1])?
> Jinja2?
>
> :Stefan
>
> [1] https://wiki.python.org/moin/Templating
> ___
> Qgis-developer mailing list
> Qgis-developer@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@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QGIS Resource Sharing - GSOC 2017 (?)

2017-03-29 Thread Akbar Gumbira
Hi All,

I apologize that I would not participate on this year's GSoC. I simply
don't have time to do a bit of research to make a good proposal on the
ideas above. And GSoC takes quite a lot of time even before the summer to
discuss and mock the proposal later to the community before coding period,
which I can't commit to, not until summer holiday. I hope QGIS will get
many interesting proposals from other students.

Cheers

On Mar 5, 2017 2:03 PM, "Luigi Pirelli" <lui...@gmail.com> wrote:

> On 2 March 2017 at 23:14, Akbar Gumbira <akbargumb...@gmail.com> wrote:
>
>> Getting the automatic digitizing tool to work against images (by doing
>>> edge detection or using some image processing smarts to predict where the
>>> user is wanting to digitizing)
>>>
>>
>> This is probably the most suitable item from the list that I can pick up
>> right away (I had image and speech recognition course last semester and
>> still 'hot' in my brain). Has there been any discussion about this?
>>
>
>
> IMHO would be fantastic... a huge amount of literature is available on
> that.
>
> IMHO would be fine a direct integration in Processing and heavy use of
> QgsTask for parallel feature extraction... or explore external
> modules/programs to be integrated in processing.
> Would make sense to add features to Semi Automatic Calssification plugin
> by Luca Congedo?
>
> 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
> 
> **
>
>
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Suggestion for GSoC project for QGIS

2017-03-17 Thread Akbar Gumbira
Hi Julia,

- Plugin for WCS2.0 in QGIS
> QGIS supports by default Web Coverage Service 1.0. A project could be to
> develop a plugin for supporting Web Coverage Service 2.0 in QGIS.

I am not sure since I just reinstalled my machine and I can't try it now (I
am building QGIS 2.18 now), but it seems that someone already builds the
plugin (?) (https://plugins.qgis.org/plugins/QgsWcsClient2/)

Cheers

On Wed, Mar 15, 2017 at 7:53 AM, Julia Wagemann <wagemann.ju...@gmx.de>
wrote:

> Hi all,
> my name is Julia Wagemann and I saw the call of OSGeo for Mentors for
> GSoC. I had a look to the proposed projects and I would be interested to be
> a mentor. I further have two ideas for projects and Helmut advised me to
> discuss these within the QGIS developers mailing list
>
> My background is in Environmental Informatics and I am currently working
> at the European Centre for Medium-Range Weather Forecasts in a project
> where we explore the opportunity to provide a more standardised and easier
> access to our data with the help of a OGC Web Coverage Service. I have
> experience with QGIS and lately, I am working a lot with Jupyter Notebooks.
> I have two ideas for projects for students to work on during GSoC:
>
> - Plugin for WCS2.0 in QGIS
> QGIS supports by default Web Coverage Service 1.0. A project could be to
> develop a plugin for supporting Web Coverage Service 2.0 in QGIS.
>
> - Examples of geospatial workflows in Jupyter Notebooks
> I am a strong advocate of Jupyter Notebooks and one project could be, in
> alignment with the project proposed for GRASS GIS (adding functionality for
> running GRASS GIS modules in Jupyter Notebooks), to develop a set of
> used-cases to show how Jupyter Notebooks are beneficial for the generation
> of entire geospatial data analysis workflows, from data access to data
> manipulation and data visualisation. Examples could harness QGIS, and in
> the best case, open data.
>
> What is you opinion about the suggestions and would you be interested in
> co-mentoring one of those?
> Thanks and I look forward to hearing from you.
> Best regards,
> Julia
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QGIS Resource Sharing - GSOC 2017 (?)

2017-03-03 Thread Akbar Gumbira
Hi Alex,

> I'm not aware about any discussion on this topic. Probably you can start
> one, if
> this item is interesting for you and you want to work on it during GSoC.


Are there core developers that I can poke around (and willing to be poked
:)) that already envision this topic?


 Hi Borys,

> Although I believe you'll choose the automatic digitizing tool, as it's
> incomparable more interesting,


I am not entirely sure yet. I am a pragmatic and would rather do something
that we know for sure will work.


> I hope you'll find some time later this Spring
> to sit down together and make a small brainstorming how to join them in the
> future. The plugin manager is waiting for my holiday to get some
> refactoring
> :)

Not sure about spring (I told my supervisor that I want to graduate one
semester faster. Gotta work hard this spring :)), but we can hack together
for sure in summer with some beach scenery in Gdańsk? :)

Cheers

On Fri, Mar 3, 2017 at 3:30 PM, Borys Jurgiel <li...@borysjurgiel.pl> wrote:

> Dnia czwartek, 2 marca 2017 16:54:34 Akbar Gumbira pisze:
> > - Making a unified sharing platform joining the plugin with
> > Plugin Manager *taking a deep breath*. This quite scares me as the plugin
> > manager has been running smoothly for years that probably no one has
> > complained about it.
>
> Although I believe you'll choose the automatic digitizing tool, as it's
> incomparable more interesting, I hope you'll find some time later this
> Spring
> to sit down together and make a small brainstorming how to join them in the
> future. The plugin manager is waiting for my holiday to get some
> refactoring
> :)
>
> Regards,
>
> Borys
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QGIS Resource Sharing - GSOC 2017 (?)

2017-03-02 Thread Akbar Gumbira
Hi Tim,

* Building on the work form Matthias Kuhn and Sandro Mani to improve and
> mainstream the QGIS Globe 3D plugin

* Adding support for mixed geometry layers to QGIS

* Get QGIS to work in one of the VR / AR platforms (Cardboard / Microsoft
> Hololens / Oculus Rift / HTC Vive) etc.
> * Making QGIS work with Tangible Landscape (as a replacement for Grass) -
> see https://tangible-landscape.github.io - doubly cool if you take
> advantage of the nice new stuff Nyall has been showing off at
> https://www.youtube.com/watch?v=2jsYRxmnWkI so that we can do spatial
> animations over the landscape
>

Oh wow, that Nyall stuff is super cool!

Getting the automatic digitizing tool to work against images (by doing edge
> detection or using some image processing smarts to predict where the user
> is wanting to digitizing)
>

This is probably the most suitable item from the list that I can pick up
right away (I had image and speech recognition course last semester and
still 'hot' in my brain). Has there been any discussion about this?

Cheers

On Thu, Mar 2, 2017 at 10:26 PM, Tim Sutton <t...@kartoza.com> wrote:

> Hi
>
> On 02 Mar 2017, at 5:54 PM, Akbar Gumbira <akbargumb...@gmail.com> wrote:
>
> Dear developers,
>
> Perhaps I need to do introduction again as anyone else. My name is Akbar
> Gumbira, studying Computer Science in Warsaw University of Technology and
> right now working on my thesis about Probabilistic Topic Models - in
> general inferring topics of given documents and I am trying to apply it on
> images (perhaps that could be of any relevance for QGIS?). I came into the
> GIS pool as a developer configuring and setting up that platform that must
> not be named for a couple of ministries and government agencies in
> Indonesia. I then started working on InaSAFE in 2013 that made me familiar
> with QGIS.
>
> Last year I developed QGIS Resource Sharing plugin as GSoC 2016 with Anita
> and Ale as the mentors. Since then, there has been some discussions about
> the development of this plugin. As I recall:
>
>- Replacing entirely processing scripts sharing from Processing plugin
>given the requirement that the plugin is already in core and works 
> smoothly.
>- Making a unified sharing platform joining the plugin with Plugin
>Manager *taking a deep breath*. This quite scares me as the plugin manager
>has been running smoothly for years that probably no one has complained
>about it.
>
> If this plugin is useful and you would like to see it developed, I would
> be happy to apply again for GSoC 2017 and perhaps we can start the
> discussion here so that I can make a clear proposal (the proposal can still
> change shape too in the duration of Community Bonding Period - the whole
> May). But if not (say the plugin is sufficient enough for users needs), I
> am also happy to just maintain it and getting it into core.
>
> I am looking forward for your feedback.
>
>
> My 2c is that I think we should let the resource sharing plugin get a
> little more used and established before extending its reach into other
> parts of the code base. This will probably only really start happening when
> 3.0 gets out in the wild
>
> You did do such a great job on last year's GSOC - why not look at some
> other areas of the codebase. I am sure there are plenty of ideas flying
> around but some you might consider:
>
> * Building on the work form Matthias Kuhn and Sandro Mani to improve and
> mainstream the QGIS Globe 3D plugin
> * Adding support for mixed geometry layers to QGIS
> * Get QGIS to work in one of the VR / AR platforms (Cardboard / Microsoft
> Hololens / Oculus Rift / HTC Vive) etc.
> * Making QGIS work with Tangible Landscape (as a replacement for Grass) -
> see https://tangible-landscape.github.io - doubly cool if you take
> advantage of the nice new stuff Nyall has been showing off at
> https://www.youtube.com/watch?v=2jsYRxmnWkI so that we can do spatial
> animations over the landscape
> * Getting the automatic digitizing tool to work against images (by doing
> edge detection or using some image processing smarts to predict where the
> user is wanting to digitizing)
>
> Thats my 5 minute brain dump, and probably not as cool a list as others
> will come up with :-)
>
> Regards
>
> Tim
>
>
>
> Cheers
> --
>
> *---*
> *Akbar Gumbira *
> *www.akbargumbira.com <http://www.akbargumbira.com/>*
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> —
>
>
>
>
>
>
>

[Qgis-developer] QGIS Resource Sharing - GSOC 2017 (?)

2017-03-02 Thread Akbar Gumbira
Dear developers,

Perhaps I need to do introduction again as anyone else. My name is Akbar
Gumbira, studying Computer Science in Warsaw University of Technology and
right now working on my thesis about Probabilistic Topic Models - in
general inferring topics of given documents and I am trying to apply it on
images (perhaps that could be of any relevance for QGIS?). I came into the
GIS pool as a developer configuring and setting up that platform that must
not be named for a couple of ministries and government agencies in
Indonesia. I then started working on InaSAFE in 2013 that made me familiar
with QGIS.

Last year I developed QGIS Resource Sharing plugin as GSoC 2016 with Anita
and Ale as the mentors. Since then, there has been some discussions about
the development of this plugin. As I recall:

   - Replacing entirely processing scripts sharing from Processing plugin
   given the requirement that the plugin is already in core and works smoothly.
   - Making a unified sharing platform joining the plugin with Plugin
   Manager *taking a deep breath*. This quite scares me as the plugin manager
   has been running smoothly for years that probably no one has complained
   about it.

If this plugin is useful and you would like to see it developed, I would be
happy to apply again for GSoC 2017 and perhaps we can start the discussion
here so that I can make a clear proposal (the proposal can still change
shape too in the duration of Community Bonding Period - the whole May). But
if not (say the plugin is sufficient enough for users needs), I am also
happy to just maintain it and getting it into core.

I am looking forward for your feedback.

Cheers
-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Merge QGIS Resource Sharing Plugin into core

2017-01-07 Thread Akbar Gumbira
Hi Ale and All,

First I want to apologize that I could not take a look at some PR's
recently for new styles, but Anita and Ale are doing great job giving some
time to look at them. So thanks to both!

Unfortunately the implementation is rather different.
> But of course I suggested Akbar to try to re-use any existing code from
> other parts of QGIS and I'm pretty sure he did

Yes, the implementation is quite different . IIRC I tried to put plugin as
a resource and it worked fine after creating its handler. But it was just a
'dirty curious' work. I need to take some time to think thoroughly the best
way to have them both in one big architecture.

I agree with Nyall too on both points. As I mentioned in the final report,
there are some room for improvements, one of them is to make a good set of
unittests (I am ashamed of myself as some people called me as the unittest
guy and yet I abandoned it on this plugin :)). And it's also not replacing
Style Manager.

Since I couldn't really give some love for this plugin right now (probably
until this summer), if anyone wants to maintain it, please let me know and
I will register you as collaborator. Ale and Anita are already contributors
too to the repository. And if there is a chance for me to work on this
again for GSoC 2017, I am eager to apply once more. But this is something
that I need to talk to my supervisor and depending on this semester result.
Or whether I need to take 'official' internship. So maybe in February I
will know exactly what to do for this summer. But for sure, I will keep my
eyes on this. So keep discussing :)

Cheers

On Fri, Jan 6, 2017 at 10:48 PM, Nyall Dawson <nyall.daw...@gmail.com>
wrote:

> On 7 January 2017 at 02:05, Alessandro Pasotti <apaso...@gmail.com> wrote:
> > Hi,
> >
> > I think the original idea for the plugin was eventually having it into
> core
> > as a Python core plugin.
> >
> > Any objections if we start the process to make it a core plugin for 3.x ?
> >
> > It will require some testing and minor tweaks of course.
>
> Obviously, it'll also need porting to PyQGIS 3 before it can be
> merged, and I'd want to make sure it's got sufficient unit tests in
> place to not add extra burden while the QGIS 3.x API
> breaks/refactorings are being performed.
>
> > IMHO if it will be merged into core, it should replace style manager,
> > Processing sharing code and Plugin Manager.
>
> I don't think this replaces style manager though. Style manager has
> also undergone significant work in 3.0 and is now really polished and
> smooth, so I don't want to see it go. I'd rather python hooks were
> added to style manager to allow the resource sharing plugin to
> integrate into the existing style manager dialog instead.
>
> Nyall
>
>
> >
> >
> > --
> > Alessandro Pasotti
> > w3:   www.itopen.it
> >
> > ___
> > Qgis-developer mailing list
> > Qgis-developer@lists.osgeo.org
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] standard way for custom plugin python dependencies

2016-09-22 Thread Akbar Gumbira
Hi Matthias,

Is there any pointer to the discussion? If it's possible for me to help, I
could may be make a proposal for next year GSoC on this :)

@Jachym: AFAIK, most plugins now just ship the needed libraries along with
it or ask the users to install them. There are some libraries that are
already shipped into QGIS from the core python plugins (e.g jinja), you
might want to check if what you need is there already.

On Sep 22, 2016 19:14, "Matthias Kuhn"  wrote:

> Hi Jachym,
>
> Unfortunately not. This has been discussed and is something that will
> certainly be added at some point but so far nobody implemented it
> (basically because of its cross-platform nature I think).
>
> Your possibilities are:
>
>  * Document and print nice warnings
>  * Ship the dependency packaged with your plugin
>  * Fix it by adding dependency management in QGIS
>
> Cheers
> Matthias
>
> On 09/22/2016 02:08 PM, Jachym Cepicky wrote:
> > Hi all,
> >
> > we've developed an (python) plugin for QGIS, which is somehow using
> > (among others) nice "requests" python library. We use it the standard way
> >
> > import requests
> >
> > But when we distributed the plugin to other computers, it turned out,
> > they do not have it installed.
> >
> > Is there any standard way, how to distribute dependencies along with
> > python plugin? Something in metadata.txt? Some requirements file?
> >
> > Thanks
> >
> > Jachym
> >
> >
> > ___
> > Qgis-developer mailing list
> > Qgis-developer@lists.osgeo.org
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] qgis crash using QThread in a plugin script

2016-09-13 Thread Akbar Gumbira
Just read your code again in stackexchange. If you want to have a new fresh
instance of your dialog every time you open the dialog, you need to
restructure your code. I think you use Plugin Builder and you instantiated
the dialog in the __init__ of the main file. You can remove the run method
and just open the dialog in the action.

On Wed, Sep 14, 2016 at 2:57 AM, Akbar Gumbira <akbargumb...@gmail.com>
wrote:

> Hi Sergio,
>
> It sounds like a new problem. Did removing the return fix the crash
> problem that happened before? As your problem now that it prints double
> letters, I am sure that you just need to clear some component's state
> before running the worker.
>
> Do you have the plugin somewhere on github? If you have, I'll try it myself
>
> Cheers
>
> On Sep 14, 2016 00:07, "Sergio Vignali" <vignalisergi...@gmail.com> wrote:
>
>> Hi Akbar,
>>
>> as you suggested I removed return but it didn't solve the problem...
>> I don't get it because when I open the dialog the first time I can play
>> with it changing word without problem
>> (I mean that I can insert a new word several time and when I push apply
>> everything works well).
>> I think it's something that I should destroy when closing the dialog...
>> but I don't find what!
>> Two strange behaviours that I found is that sometimes after restarting
>> the dialog if I insert the same word I inserted during the
>> last run the plugin works well or if I change word it writes double
>> items, like digiting "et" it inserts "ee" and "tt" and after it crashes,
>> but how it gets
>> the double letters in the loop?...
>> It's for sure something related to the restarting as if I use the plugin
>> reload it doesn't crash...
>> Any idea? Anyway thanks for your suggestion!
>>
>> All the best
>> s.
>>
>> 2016-09-10 10:42 GMT+02:00 Sergio Vignali <vignalisergi...@gmail.com>:
>>
>>> Hi Akbar,
>>> thank you for your answer, I'm abroad till Tuesday but I will test it
>>> asap and let you know.
>>> Best
>>>
>>> Il 09/set/2016 05:04, "Akbar Gumbira" <akbargumb...@gmail.com> ha
>>> scritto:
>>>
>>>> Hi Sergio,
>>>>
>>>> DId you fix already your problems? I am not sure if my answer is 100%
>>>> correct (so I don't post it in stackexchange) as  I didnt try it, but by
>>>> judging your code:
>>>>
>>>> If I click apply without entering anything in the QLineEdit the
>>>>> QgsMessageBar appears correctly but if I close the QDialog and I do the
>>>>> same the QgisMessageBar has two items (1 more, see picture)
>>>>
>>>>
>>>> Plugins initiallization happened when starting QGIS. So the plugin is
>>>> already instantiated (along with your dialog, message bar, etc). Restarting
>>>> (that is closing and opening again) the dialog in your code doesn't destroy
>>>> all the instances. That is why the message bar has the previous messages.
>>>> You can just clear the message bar once user opens the dialog.
>>>>
>>>> If I insert a word in the QLineEdit after opening the plugin for the
>>>>> second time, clicking on apply Qgis crashes.
>>>>
>>>>
>>>> This is not necessarily related to the crash :p:
>>>>
>>>>-
>>>>
>>>>word = unicode(self.dlg.inputedit.text())
>>>>
>>>>
>>>> But QString is stored in unicode, no need to recast it
>>>>
>>>> For the cause of the crash, I strongly believe this is the problem:
>>>>
>>>> def add_item(self, item):
>>>> self.list.addItem(item)
>>>> return
>>>>
>>>> Can you try to remove return there? I think it's forcing the thread to
>>>> go back to the main loop (plugin Run method)
>>>>
>>>> Cheers
>>>>
>>>>
>>>>
>>>> On Wed, Sep 7, 2016 at 1:57 PM, Sergio Vignali <
>>>> vignalisergi...@gmail.com> wrote:
>>>>
>>>>> I posted my problem in gis.stackexchange, (
>>>>> http://gis.stackexchange.com/questions/209602/qgis-crash-us
>>>>> ing-qthread-in-a-plugin-script).
>>>>> There you can find the full explanation of the problem and all the
>>>>> code I used... It would be great to get some feedbacks!
>>>>> Best
>>>>> s.
>>>>>

Re: [Qgis-developer] qgis crash using QThread in a plugin script

2016-09-13 Thread Akbar Gumbira
Hi Sergio,

It sounds like a new problem. Did removing the return fix the crash problem
that happened before? As your problem now that it prints double letters, I
am sure that you just need to clear some component's state before running
the worker.

Do you have the plugin somewhere on github? If you have, I'll try it myself

Cheers

On Sep 14, 2016 00:07, "Sergio Vignali" <vignalisergi...@gmail.com> wrote:

> Hi Akbar,
>
> as you suggested I removed return but it didn't solve the problem...
> I don't get it because when I open the dialog the first time I can play
> with it changing word without problem
> (I mean that I can insert a new word several time and when I push apply
> everything works well).
> I think it's something that I should destroy when closing the dialog...
> but I don't find what!
> Two strange behaviours that I found is that sometimes after restarting the
> dialog if I insert the same word I inserted during the
> last run the plugin works well or if I change word it writes double items,
> like digiting "et" it inserts "ee" and "tt" and after it crashes, but how
> it gets
> the double letters in the loop?...
> It's for sure something related to the restarting as if I use the plugin
> reload it doesn't crash...
> Any idea? Anyway thanks for your suggestion!
>
> All the best
> s.
>
> 2016-09-10 10:42 GMT+02:00 Sergio Vignali <vignalisergi...@gmail.com>:
>
>> Hi Akbar,
>> thank you for your answer, I'm abroad till Tuesday but I will test it
>> asap and let you know.
>> Best
>>
>> Il 09/set/2016 05:04, "Akbar Gumbira" <akbargumb...@gmail.com> ha
>> scritto:
>>
>>> Hi Sergio,
>>>
>>> DId you fix already your problems? I am not sure if my answer is 100%
>>> correct (so I don't post it in stackexchange) as  I didnt try it, but by
>>> judging your code:
>>>
>>> If I click apply without entering anything in the QLineEdit the
>>>> QgsMessageBar appears correctly but if I close the QDialog and I do the
>>>> same the QgisMessageBar has two items (1 more, see picture)
>>>
>>>
>>> Plugins initiallization happened when starting QGIS. So the plugin is
>>> already instantiated (along with your dialog, message bar, etc). Restarting
>>> (that is closing and opening again) the dialog in your code doesn't destroy
>>> all the instances. That is why the message bar has the previous messages.
>>> You can just clear the message bar once user opens the dialog.
>>>
>>> If I insert a word in the QLineEdit after opening the plugin for the
>>>> second time, clicking on apply Qgis crashes.
>>>
>>>
>>> This is not necessarily related to the crash :p:
>>>
>>>-
>>>
>>>word = unicode(self.dlg.inputedit.text())
>>>
>>>
>>> But QString is stored in unicode, no need to recast it
>>>
>>> For the cause of the crash, I strongly believe this is the problem:
>>>
>>> def add_item(self, item):
>>> self.list.addItem(item)
>>> return
>>>
>>> Can you try to remove return there? I think it's forcing the thread to
>>> go back to the main loop (plugin Run method)
>>>
>>> Cheers
>>>
>>>
>>>
>>> On Wed, Sep 7, 2016 at 1:57 PM, Sergio Vignali <
>>> vignalisergi...@gmail.com> wrote:
>>>
>>>> I posted my problem in gis.stackexchange, (
>>>> http://gis.stackexchange.com/questions/209602/qgis-crash-us
>>>> ing-qthread-in-a-plugin-script).
>>>> There you can find the full explanation of the problem and all the code
>>>> I used... It would be great to get some feedbacks!
>>>> Best
>>>> s.
>>>>
>>>> 2016-09-06 3:58 GMT+02:00 Akbar Gumbira <akbargumb...@gmail.com>:
>>>>
>>>>> It would be more helpful if you point to the code here. I had a
>>>>> problem with QThread (was initially inheriting QThread) but managed to fix
>>>>> the problem by creating workers and move the worker object to thread. This
>>>>> is a good article about multithreading in qgis
>>>>> https://snorfalorpagus.net/blog/2013/12/07/multithreading-in
>>>>> -qgis-python-plugins/
>>>>>
>>>>> On Sep 5, 2016 23:01, "Sergio Vignali" <vignalisergi...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Dear all,
>>>>>>
>>>>>> I wr

Re: [Qgis-developer] qgis crash using QThread in a plugin script

2016-09-08 Thread Akbar Gumbira
Hi Sergio,

DId you fix already your problems? I am not sure if my answer is 100%
correct (so I don't post it in stackexchange) as  I didnt try it, but by
judging your code:

If I click apply without entering anything in the QLineEdit the
> QgsMessageBar appears correctly but if I close the QDialog and I do the
> same the QgisMessageBar has two items (1 more, see picture)


Plugins initiallization happened when starting QGIS. So the plugin is
already instantiated (along with your dialog, message bar, etc). Restarting
(that is closing and opening again) the dialog in your code doesn't destroy
all the instances. That is why the message bar has the previous messages.
You can just clear the message bar once user opens the dialog.

If I insert a word in the QLineEdit after opening the plugin for the second
> time, clicking on apply Qgis crashes.


This is not necessarily related to the crash :p:

   -

   word = unicode(self.dlg.inputedit.text())


But QString is stored in unicode, no need to recast it

For the cause of the crash, I strongly believe this is the problem:

def add_item(self, item):
self.list.addItem(item)
return

Can you try to remove return there? I think it's forcing the thread to go
back to the main loop (plugin Run method)

Cheers



On Wed, Sep 7, 2016 at 1:57 PM, Sergio Vignali <vignalisergi...@gmail.com>
wrote:

> I posted my problem in gis.stackexchange, (http://gis.stackexchange.com/
> questions/209602/qgis-crash-using-qthread-in-a-plugin-script).
> There you can find the full explanation of the problem and all the code I
> used... It would be great to get some feedbacks!
> Best
> s.
>
> 2016-09-06 3:58 GMT+02:00 Akbar Gumbira <akbargumb...@gmail.com>:
>
>> It would be more helpful if you point to the code here. I had a problem
>> with QThread (was initially inheriting QThread) but managed to fix the
>> problem by creating workers and move the worker object to thread. This is a
>> good article about multithreading in qgis https://snorfalorpagus.net/blo
>> g/2013/12/07/multithreading-in-qgis-python-plugins/
>>
>> On Sep 5, 2016 23:01, "Sergio Vignali" <vignalisergi...@gmail.com> wrote:
>>
>>> Dear all,
>>>
>>> I wrote a python script that aims to execute neighbourhood statistics in
>>> raster layer. My script uses QThread to update a QList and a QProgressBar
>>> and everithing works fine if I run the script from PyCharm, the progressbar
>>> and the list are updated. The problem appears when I move my script in a
>>> Qgis plugin, the UI appears correctly but clicking OK the software
>>> crashes...
>>> I am using qgis 2.14 in a linux machine, do you have any advice?
>>>
>>> All the best
>>>
>>>
>>>
>>> --
>>> Sergio Vignali
>>>
>>>
>>> ___
>>> Qgis-developer mailing list
>>> Qgis-developer@lists.osgeo.org
>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>
>
>
> --
> Sergio Vignali
>
>


-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] qgis crash using QThread in a plugin script

2016-09-05 Thread Akbar Gumbira
It would be more helpful if you point to the code here. I had a problem
with QThread (was initially inheriting QThread) but managed to fix the
problem by creating workers and move the worker object to thread. This is a
good article about multithreading in qgis
https://snorfalorpagus.net/blog/2013/12/07/multithreading-in-qgis-python-plugins/

On Sep 5, 2016 23:01, "Sergio Vignali"  wrote:

> Dear all,
>
> I wrote a python script that aims to execute neighbourhood statistics in
> raster layer. My script uses QThread to update a QList and a QProgressBar
> and everithing works fine if I run the script from PyCharm, the progressbar
> and the list are updated. The problem appears when I move my script in a
> Qgis plugin, the UI appears correctly but clicking OK the software
> crashes...
> I am using qgis 2.14 in a linux machine, do you have any advice?
>
> All the best
>
>
>
> --
> Sergio Vignali
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] issue move to gh stalled

2016-09-02 Thread Akbar Gumbira
Hey Tim,

I just migrated the issues from Redmine to Github. I think there's nothing
left in the project there (https://hub.qgis.org/projects/qgis-django) to
migrate

Cheers

On Fri, Aug 26, 2016 at 3:33 AM, Tim Sutton <t...@kartoza.com> wrote:

> Hi
>
> On 23 Aug 2016, at 10:18 AM, Akbar Gumbira <akbargumb...@gmail.com> wrote:
>
> I could help migrating issues manually of qgis django repository to github
> (though it's not that much of a work) :)
>
>
> That would be great thanks Akbar - please do so if you haven't already
> done so!
>
> Regards
>
> Tim
>
> —
>
>
>
>
>
>
>
>
> *Tim Sutton*
>
> *Co-founder:* Kartoza
> *Project chair:* QGIS.org <http://qgis.org>
>
> Visit http://kartoza.com to find out about open source:
>
> Desktop GIS programming services
> Geospatial web development
> GIS Training
> Consulting Services
>
> *Skype*: timlinux
> *IRC:* timlinux on #qgis at freenode.net
>
> Kartoza is a merger between Linfiniti and Afrispatial
>
>


-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Qgis resource sharing VS processing for script sharing

2016-09-01 Thread Akbar Gumbira
Hi,

+1

But note that I am not proud of the current testing module of the plugin. I
haven't really created meaningful tests there (involving testing all kind
of repository and such) and I am not sure that some libraries (particularly
dulwich) is Python 3 ready. But if everyone says yes, I'll do what I can
help.

Cheers

On Thu, Sep 1, 2016 at 7:03 PM, Paolo Cavallini <cavall...@faunalia.it>
wrote:

> Il 01/09/2016 12:01, Alexander Bruy ha scritto:
> > 2016-09-01 14:57 GMT+03:00 Borys Jurgiel <li...@borysjurgiel.pl>:
> >> I believe it should be in core!
> >>
> >> As I'm going to improve the Plugin Manager [1], it may be a right time
> to
> >> refactor it and create an unified sharing platform. What do you think?
> >
> > A big +1 from me. IMHO better to develop unified sharing platform and use
> > it for all kind of resources.
>
> I think we all agree with this, please go.
> All the best.
>
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Qgis resource sharing VS processing for script sharing

2016-09-01 Thread Akbar Gumbira
Cześć Borys

I just opened the ticket and for point 1 and 2 we could totally reuse some
of my code. I already told Tim that we could definitely put a plugin as a
collection and when users install that collection, we moved it to the right
plugin directory.

I believe it should be in core!
> As I'm going to improve the Plugin Manager [1], it may be a right time to
> refactor it and create an unified sharing platform. What do you think?
> Borys
> [1] https://github.com/qgis/qgis3.0_api/issues/43


On Thu, Sep 1, 2016 at 6:57 PM, Borys Jurgiel <li...@borysjurgiel.pl> wrote:

> Dnia czwartek, 1 września 2016 09:21:56 Victor Olaya pisze:
> > 2) Have the resources sharing plugin as a core plugin (otherwise,a plain
> > Processing would be less capable than now). Is this among our plans? I
> > think this is a plugin that should be core and part of QGIS, but I don't
> > know if there is already a discussion about this going on...
>
> I believe it should be in core!
>
> As I'm going to improve the Plugin Manager [1], it may be a right time to
> refactor it and create an unified sharing platform. What do you think?
>
> Borys
>
> [1] https://github.com/qgis/qgis3.0_api/issues/43
>
> Btw. Alex, could you please assign that issue to me? I can't manage that
> repo.
>
>


-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Folder repetition of SVG symbols

2016-09-01 Thread Akbar Gumbira
Hi

Regarding this problem, I issued it here (http://hub.qgis.org/issues/15439)
but I can't open Redmine right now (down?).  It's easily reproducible (I
included the steps to reproduce it there). I felt that it should be easy to
fix.

Hi Neumann

> What I don't understand is why QGIS automatically adds such SVG folders
> without asking the user?
> I can understand that the central SVG folder of the application is
> automatically added by default - but why adding an SVG folder from the
> users folder by default? In my opinion this is bad behaviour by QGIS. Users
> should consciously add such settings and understand the implications.
> In my case QGIS added C:/Users/username/.qgis2/svg
> I never asked QGIS to do that and I never intend so store SVG symbols
> there. I add my symbols at folder locations where all of my local users can
> share and benefit from each others contributions, typically, shared
> resources.
> I also have the same issue that I usually have 3-5 parallel QGIS
> installations on my Windows machine and I get the central folder of each of
> them. Not very nice ... and it slows down QGIS. Shouldn't QGIS leave
> settings as they are if the .qgis2 settings folder already exists?


Before QGIS 2.16 those paths are already saved in this object
(mDefaultSvgPaths),
and are used already in other features (e.g the tree when selecting SVG for
setting SVG marker) it's just that in QGIS 2.16, those paths are added in
the dialog in Option in SVG Path. I am not sure the reason behind that but
perhaps it's for explicitness (?)

On Thu, Sep 1, 2016 at 8:09 PM, Neumann, Andreas <a.neum...@carto.net>
wrote:

> Hi,
>
> What I don't understand is why QGIS automatically adds such SVG folders
> without asking the user?
>
> I can understand that the central SVG folder of the application is
> automatically added by default - but why adding an SVG folder from the
> users folder by default? In my opinion this is bad behaviour by QGIS. Users
> should consciously add such settings and understand the implications.
>
> In my case QGIS added C:/Users/username/.qgis2/svg
>
> I never asked QGIS to do that and I never intend so store SVG symbols
> there. I add my symbols at folder locations where all of my local users can
> share and benefit from each others contributions, typically, shared
> resources.
>
> I also have the same issue that I usually have 3-5 parallel QGIS
> installations on my Windows machine and I get the central folder of each of
> them. Not very nice ... and it slows down QGIS. Shouldn't QGIS leave
> settings as they are if the .qgis2 settings folder already exists?
>
> Andreas
>
> On 2016-09-01 14:55, Richard Duivenvoorde wrote:
>
> On 01-09-16 14:32, matteo wrote:
>
> Hi all,
>
> I have a weird problem. I noticed that the SVG filling in the vector
> styling took a lot to load the symbols (really a lot) causing sometimes
> the crashing of QGIS.
>
> So I discovered that I have the same App Symbol and User Symbols (empty)
> folders repeated 5 many times. Same folder, same symbols, same path
> (/usr/share/qgis/svg and /home/matteo/.qgis2/svg).
>
> I never added new symbols (fresh QGIS master_2 compiled yesterday) on a
> Ubuntu 16.04 machine.
>
> Is this behavior normal or have I some strange configuration?
>
>
> Yep, I have seen this before... we even spoke about it in Bonn.. one of
> the ideas was that this maybe was when you run multiple instances of
> QGIS or install a new version while another is running or so??
>
> Regards,
>
> Richard
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Qgis resource sharing VS processing for script sharing

2016-08-31 Thread Akbar Gumbira
Hi Michaël,

To be honest, when I implemented it to support sharing python processing
scripts (https://github.com/akbargumbira/qgis_resources_sharing/issues/11),
I didn't really think much about this concern that you raise. The one in
processing toolbox is very nice and focused only on the processing scripts.
The only thing missing from the one in the toolbox is to search the script
itself (?) If the number of the scripts is getting bigger, users would
probably find it hard to search for scripts they are looking for. The idea
itself is from Ale and Victor, so perhaps they can share their vision?

Cheers


On Thu, Sep 1, 2016 at 1:17 AM, kimaidou <kimai...@gmail.com> wrote:

> Hi QGIS folks,
>
> Since the release of the great plugin "Qgis resource sharing" (1) (2) & (3)
> we can share many resources, and processing scripts are among them.
>
> We have also another Processing dedicated github repo for sharing Python
> scripts, R scripts and models (4)
>
> Regarding this current situation, what should we tell users and
> developpers who want to share Processing scripts ? What shoud they use to
> share their scripts ?
>
> Once the new plugin will be able to let users share R scripts and
> processing models, could we get rid of the historical Processing sharing
> tool ?
>
> Thanks in advance for your ideas about this topic.
>
> Cheers
> Michaël
>
>
> (1) https://github.com/akbargumbira/qgis_resources_
> sharing/releases/tag/v0.5.1
> (2) http://www.akbargumbira.com/qgis_resources_sharing/
> (3) https://github.com/qgis/QGIS-Resources
>
> (4) https://github.com/qgis/QGIS-Processing
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] issue move to gh stalled

2016-08-23 Thread Akbar Gumbira
I could help migrating issues manually of qgis django repository to github
(though it's not that much of a work) :)

Cheers

On Aug 23, 2016 5:50 AM, "Tim Sutton"  wrote:
>
> Hi Richard and Devs:
>
>
>> On 22 Aug 2016, at 1:43 PM, Richard Duivenvoorde 
wrote:
>>
>> Hi Devs,
>>
>> I'm not able to do redmine2github issue stuff (which I promissed to do
:-( )
>>
>> Not enough brainpower, and to many issues to solve.
>
>
> We discussed this at length at the PSC meeting - our plan to move forward
is:
>
> 1) Lease a new Hetzner VPS for Redmine
> 2) Deploy the latest redmine + the OAUTH plugin on it
> 3) Migrate existing content from the old redmine to the new
> 4) Discontinue any repos, wikis etc. in redmine except for the QGIS code
base
>
>
> If anyone out there is able to help with this migration process your help
will be most appreciated.
>
> Running the newer redmine will hopefully provide a little more modern
experience whilst still satisfying the needs of those who wish to benefit
from its feature set.
>
> Regards
>
> Tim
>
>
>>
>> Regards,
>>
>> Richard
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> —
>
>
>
>
>
>
>
>
> Tim Sutton
>
> Co-founder: Kartoza
> Project chair: QGIS.org
>
> Visit http://kartoza.com to find out about open source:
>
> Desktop GIS programming services
> Geospatial web development
> GIS Training
> Consulting Services
>
> Skype: timlinux
> IRC: timlinux on #qgis at freenode.net
>
> Kartoza is a merger between Linfiniti and Afrispatial
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Broken Python Plugins on QGIS 2.16 Ubuntu 16

2016-08-20 Thread Akbar Gumbira
Hi,

I just knew about this problem (which actually has been there for quite
some time). It seems that the released QGIS 2.16 for Ubuntu 16 is packaged
without QtWebKit. I see that other plugins: lrs, InaSAFE, qgis2web,
QuickOSM (and many others probably) are affected too.

   - LRS: https://github.com/blazek/lrs/issues/9
   - QGIS2web: https://github.com/tomchadwin/qgis2web/issues/309
   - QGIS Resource Sharing:
   https://github.com/akbargumbira/qgis_resources_sharing/issues/25
   - Quick OSM: https://github.com/3liz/QuickOSM/issues/84


I tried to compile QGIS without QtWebKit and I could replicate the issue.
The problem is that as python plugin developers, we couldn't do much as the
QtWebKit module from python side is actually there. I thought I could just
try to import QtWebKit and if it's failed just use QTextBrowser. But the
crash happened when we try to call some methods (and we couldn't catch it
from the python side). Of course for some plugins they might be able to
compensate this (either using QTextBrowser as an alternative or just remove
it). Personally for my plugin, I would hesitate to replace QWebView with
QTextBrowser as this problem only affects Ubuntu 16 users with the released
QGIS 2.16. Of course we could check the host, but again some users also
compile QGIS themselves.

So, what should we do to overcome this issue? Is there perhaps a flag (e.g
telling if QGIS is compiled with/without webkit) that we can use?

Cheers

-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] ubuntu 2.16 packages core dump

2016-08-20 Thread Akbar Gumbira
Hi,

Any further news about this? Sorry asking the same question :)

Cheers

On Wed, Jul 20, 2016 at 11:16 AM, matteo <matteo.ghe...@gmail.com> wrote:

> Hi guys,
> any news on this error?
>
> tried to change the repo with those for the 2.14 and I'm not
> experiencing the same error..
>
> Thanks
>
> Matteo
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] GSoC Last Report - QGIS Resource Sharing Plugin

2016-08-15 Thread Akbar Gumbira
Hi Ale,

> Thanks you for all your hard work on this plugin!
> It was a good time working with you.

Thanks, it's nice to work with you too. Sorry if sometimes I think too much
of possibilities though I know that you already gave me direction most of
the time :)

Hi Anita

> Thanks everyone for the great work, particularly you Akbar! I really
> enjoyed working with you.
> Looking forward to putting this new plugin to good use in the upcoming
> weeks.

Thanks, I hope I could publish the plugin today. The last 2 day I've been
testing on Windows and I think it's all fine.

Hi Tim,

> Thank you so much for everything. This has been a really well run GSOC
> project - both from your side and from the input and mentoring you have
> received from Ale, Anita, Richard and others who have pitched in. I hope
> you will be back for more next year, and stick around in the project to
> contribute and participate in the community further. Why not consider
> making a pitch for the QGIS grant programme[1] next?

Thanks, but I think I will just maintain the plugin and maintain the django
site (if there's anything to fix) , and perhaps next year I'll apply for
GSoC again.

Cheers



On Sun, Aug 14, 2016 at 10:07 PM, Tim Sutton <t...@kartoza.com> wrote:

> Hi
>
> Thank you so much for everything. This has been a really well run GSOC
> project - both from your side and from the input and mentoring you have
> received from Ale, Anita, Richard and others who have pitched in. I hope
> you will be back for more next year, and stick around in the project to
> contribute and participate in the community further. Why not consider
> making a pitch for the QGIS grant programme[1] next?
>
> [1] http://blog.qgis.org/2016/08/04/qgis-grants-call-for-applications/
>
> Regards
>
> Tim
>
>
> On 14 Aug 2016, at 6:42 PM, Akbar Gumbira <akbargumb...@gmail.com> wrote:
>
> Hi All,
>
> This is my last report of the GSoC project. I would like to thank Ale and
> Anita as my mentors, Richard (esp. for allowing me to visit his hackerspace
> in Denhaag and taking me to Indonesian restaurant :)), Tim, Martin, and
> everyone from QGIS community.
>
> *Brief Description*
> The project idea is to make svg, symbol, and style sharing easier. The
> idea of the implementation is changed (from the web service architecture to
> distributed directory based repository system). Nevertheless, the aim of
> the project is still the same.
>
> *The state of the project before my GSoC*
> There was not any tool that allows QGIS users to do this.
>
> *The addition that your project brought to the software*
> With this new plugin it's easier to share resources among QGIS users and
> hopefully we will have rich collections (whether it's icons, svg, images)
> to make cool maps.
>
> *Links to access the relevant code and documentation for the user to get
> started with testing your application.*
> I put these in the slide, but I will write it again:
>
>- Slide: http://www.akbargumbira.com/slide_gsoc2016
>- Plugin VCS:  https://github.com/akbargumbira/qgis_resources_sharing
><https://github.com/akbargumbira/qgis_resources_sharing>
>- Plugin Test Repository: https://github.com/akbargumbira/qgis_
>resources_data
>- Plugin Documentation: http://www.akbargumbira.com/qgis_
>resources_sharing
>
> *Slide*
> I hope this slide is informative enough for people who don't follow the
> project from the beginning: http://www.akbargumbira.com/slide_gsoc2016
>
> Note that I haven't published the plugin to the plugin manager. Will do
> later tonight or tomorrow.
>
> Cheers
> --
>
> *---*
> *Akbar Gumbira *
> *www.akbargumbira.com <http://www.akbargumbira.com/>*
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> —
>
>
>
>
>
>
>
>
> *Tim Sutton*
>
> *Co-founder:* Kartoza
> *Project chair:* QGIS.org <http://qgis.org>
>
> Visit http://kartoza.com to find out about open source:
>
> Desktop GIS programming services
> Geospatial web development
> GIS Training
> Consulting Services
>
> *Skype*: timlinux
> *IRC:* timlinux on #qgis at freenode.net
>
> Kartoza is a merger between Linfiniti and Afrispatial
>
>


-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Report 11 - QGIS Resources Sharing Tools

2016-08-08 Thread Akbar Gumbira
Hi Richard,

Of course it's back to the community how the tools will be used. I agree
that it's a good idea to provide default QGIS styling that is also in line
with the training manual. But at the end of this GSoC, besides publishing
the plugin and the documentation, I want to also provide some collections
that users can use. I think those 3 collections that I mentioned won't take
much time to prepare.

Cheers

On Mon, Aug 8, 2016 at 10:43 AM, Richard Duivenvoorde <rdmaili...@duif.net>
wrote:

> On 08-08-16 10:37, Akbar Gumbira wrote:
> > Hi Paolo,
> >
> > After checking the links in the tickets:
> >
> >   * US National Park Service
> > https://www.nps.gov/hfc/carto/map-symbols.cfm_._ It's in AI file,
> > need to extract each SVG one by one
> >   * From gfoss.it <http://gfoss.it> link, most of the SVGs are too
> > small, they need to be edited first. But probably we can make a
> > script to fit all the svgs
> >   o alberi/trees- Empty SVGs(?)
> >   o geologia/geology
> > <http://gfoss.it/userfiles/file/simboli_geologici_tar.gz>- small
> > SVGs
> >   o meteorologia/meteorology
> > <http://gfoss.it/userfiles/file/Meteorology_tar.gz>- small SVGs
> >   o frecce del nord/north arrows
> > <http://gfoss.it/userfiles/file/N_Arrows_tar.gz> This is nice, I
> > can manage it right away
> >   * http://gis-lab.info/qa/qgis-symbols.html -I don't understand at all,
> > it's in Russian cyrillic
> >   * Road-signs.zip is all good with nice and clear README. I can make
> > the collection right away
> >   * https://mapicons.mapsmarker.com/category/markers/ - the icons are
> > all in PNGs, need to convert it first
> >   * http://ngmdb.usgs.gov/fgdc_gds/geolsymstd/download.php - They are in
> > pdf, AI format, need to extract manualy
> >   * https://github.com/mapbox/maki - Nice, I can import them
> >
> > I'll make the road-signs, frecce del nord/north arrows, mapbox maki
> > collections for now
>
> Hi Akbar,
>
> Having one nice full blown repo is nice to have as testing repo. But I
> would not invest your precious time in converting half baken styling
> examples for now.
>
> Should we (as in: not only you, but some community members too) try to
> create the 'default QGIS styling' repo? Which then could include some
> maps (data?) from the training manual based on those styling?
>
> Feel free to do whatever you think is necessary off course, but creating
> repo's is something I would move to the community :-)
> Better to give them good docs on HOW to do it then to ti yourself?
>
> Regards,
>
> Richard Duivenvoorde
>
> ___________
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Report 11 - QGIS Resources Sharing Tools

2016-08-08 Thread Akbar Gumbira
Hi Paolo,

After checking the links in the tickets:


   - US National Park Service https://www.nps.gov/hfc/carto/map-symbols.cfm
   *.* It's in AI file, need to extract each SVG one by one
   - From gfoss.it link, most of the SVGs are too small, they need to be
   edited first. But probably we can make a script to fit all the svgs
  - alberi/trees - Empty SVGs(?)
  - geologia/geology
  <http://gfoss.it/userfiles/file/simboli_geologici_tar.gz> - small SVGs
  - meteorologia/meteorology
  <http://gfoss.it/userfiles/file/Meteorology_tar.gz> - small SVGs
  - frecce del nord/north arrows
  <http://gfoss.it/userfiles/file/N_Arrows_tar.gz> This is nice, I can
  manage it right away
   - http://gis-lab.info/qa/qgis-symbols.html - I don't understand at all,
   it's in Russian cyrillic
   - Road-signs.zip is all good with nice and clear README. I can make the
   collection right away
   - https://mapicons.mapsmarker.com/category/markers/ - the icons are all
   in PNGs, need to convert it first
   - http://ngmdb.usgs.gov/fgdc_gds/geolsymstd/download.php - They are in
   pdf, AI format, need to extract manualy
   - https://github.com/mapbox/maki - Nice, I can import them

I'll make the road-signs, frecce del nord/north arrows, mapbox maki
collections for now

Cheers

On Sat, Aug 6, 2016 at 7:27 AM, Paolo Cavallini <cavall...@faunalia.it>
wrote:

> Il 05/08/2016 22:55, Akbar Gumbira ha scritto:
> >   * If anyone has some good collections that should be added in the
> > official repository, please let me know, I can spend some time to
> > manage the collections
>
> Please have a look here:
> http://hub.qgis.org/issues/7981
> http://hub.qgis.org/issues/4
> Thanks.
>
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Report 11 - QGIS Resources Sharing Tools

2016-08-05 Thread Akbar Gumbira
HI,

This is the report for the 11th week of GSoC.

*What did you get done this week?*

   - *Implemented Remote HTTP(s) ZIP Handle. *User can make a repository in
   HTTPS with zip collections inside that repository.
   - *Implemented Authentication.*This is only useful for Remote ZIP
   handler as other handlers (git, filesystem) use diferent protocol
   - *Added some verification if downloaded collections exist in the file
   system - *if not uninstall the collection
   - *Wrote unittests*

I made a short video to demonstrate how remote zip handler and
authentication can be useful here: https://youtu.be/xBiI3OGy6zs

*What do you plan on doing next week?*



   - Some small tasks: more unittests, add pep8, file header, scripts for
   packaging
   - Documentation
   - Meet with Richard to make some collections

*Are you blocked on anything?*
No

*Other Thought*

   - If anyone has some good collections that should be added in the
   official repository, please let me know, I can spend some time to manage
   the collections
   - I still haven't made the tool possible for the collections to point to
   different handlers (zip, git) in a repository. There is something dubious
   with this. Why would users want to put the collections in different places
   in the first place? I'll also need to refactor classes as this changes what
   the repository claass is responsible for, and we need to make collections
   handler too (whether it's pointing to zip remote, git, filesystem, etc). I
   don't think this is worth the effort
   - I was thinking that maybe it's better for users to specify the type of
   the repository first (whether it's git, filesystem, or remote zip
   repository) and validate the url based on that selection. Rather than
   guessing what the handler is from the given url. WIth this, we can also
   give users more options from selected handler, e.g if they choose the git
   repository, in what branch the repository is (right now it's hardcoded to
   master branch).
   - The summary of the installation might be really useful (so that after
   installations, users know what and where the resources are installed). This
   is better not a one-time summary, so that when user clicks an installed
   collection, they still can see the summary.
   - Add composer template resource handler. Probably copying the composers
   to the user's local composer template directory is enough?

Hmm sorry if I am just braindumping here :) Have a nice weekend.

Regards
-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Report 10 - QGIS Resources Sharing Tools

2016-08-01 Thread Akbar Gumbira
Hi Matthias,

I think I missed your point before. I think I will add a flag in the
metadata that users need to put, to state whether the repository is using
the same protocol as the metadata or not. This way it could be more
portable to use the repository in different protocol. For example users can
clone a repository from git and use that repository in the local without
having to change the metadata file itself.

Cheers



On Mon, Aug 1, 2016 at 11:13 AM, Akbar Gumbira <akbargumb...@gmail.com>
wrote:

> Hi Matthias,
>
>
>> I guess support for relative URLs should be trivial and make the
>> repositories more portable. And as far as I can see it should be
>> possible to have relative and absolute paths side-by-side, no?
>
> If it's a matter of portability, users can still put the metadata inside
> the repository itself (if they put the repository in a directory based e.g
> git/local file system). It's just that they need to explicitly put the
> metadata URI in the settings when adding a repository.
>
> If users want to make a zip collections, they need to put the metadata
> somewhere else outside the zip. I agree with Ale though that most users
> probably prefer this, they can just put a zip and the metadata file in
> dropbox or google drive for example.
>
> Cheers
>
> On Mon, Aug 1, 2016 at 10:56 AM, Matthias Kuhn <matth...@opengis.ch>
> wrote:
>
>> Hi
>>
>> > In general, I feels that this is a better approach also in the sense
>> > that "explicit is better than implicit", we provide explicit URIs
>> > instead of delegate guessing them to the software layer.
>>
>> I guess support for relative URLs should be trivial and make the
>> repositories more portable. And as far as I can see it should be
>> possible to have relative and absolute paths side-by-side, no?
>>
>> Regards
>> Matthias
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
> --
>
> *---*
> *Akbar Gumbira *
> *www.akbargumbira.com <http://www.akbargumbira.com>*
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Report 10 - QGIS Resources Sharing Tools

2016-08-01 Thread Akbar Gumbira
Hi Matthias,


> I guess support for relative URLs should be trivial and make the
> repositories more portable. And as far as I can see it should be
> possible to have relative and absolute paths side-by-side, no?

If it's a matter of portability, users can still put the metadata inside
the repository itself (if they put the repository in a directory based e.g
git/local file system). It's just that they need to explicitly put the
metadata URI in the settings when adding a repository.

If users want to make a zip collections, they need to put the metadata
somewhere else outside the zip. I agree with Ale though that most users
probably prefer this, they can just put a zip and the metadata file in
dropbox or google drive for example.

Cheers

On Mon, Aug 1, 2016 at 10:56 AM, Matthias Kuhn <matth...@opengis.ch> wrote:

> Hi
>
> > In general, I feels that this is a better approach also in the sense
> > that "explicit is better than implicit", we provide explicit URIs
> > instead of delegate guessing them to the software layer.
>
> I guess support for relative URLs should be trivial and make the
> repositories more portable. And as far as I can see it should be
> possible to have relative and absolute paths side-by-side, no?
>
> Regards
> Matthias
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Report 10 - QGIS Resources Sharing Tools

2016-08-01 Thread Akbar Gumbira
Ok thanks Ale. I'll focus on separating metadata handler and repository
handler this week.

Cheers

On Mon, Aug 1, 2016 at 10:24 AM, Alessandro Pasotti <apaso...@gmail.com>
wrote:

> On Mon, Aug 1, 2016 at 10:17 AM, Akbar Gumbira <akbargumb...@gmail.com>
> wrote:
>
>> Hi Ale
>>
>>
>>> Thanks for your report Akbar!
>>>
>>
>>
>>> I'm sorry if you've not taken into account my repeated calls to keep
>>> authentication and proxy support in the primary goals. As I explained you
>>> this is very important for some companies and organizations that needs
>>> authenticated endpoints in their networks.
>>>
>>
>>
>>> If this plugin will not use this feature, the a.m. organization will not
>>> be able to use it (and they will not invest any time or resources in its
>>> maintainance or future development), they will just build their own sharing
>>> solution.
>>>
>>
>>
>>> For this reason I've been pushing since the very beginning to use
>>> QgsNetworkAccessManager for all network calls, in order to be able to use
>>> QGIS proxy settings and authentication plugins.
>>
>>
>> Agreed. In the network class, I used QgsNetworkAccessManager. The tricky
>> part is the Dulwich's porcelain used to interact with git repositories. For
>> this, I think we need to do it manually through git configuration to use
>> proxy.
>>
>
>
> In this case we will loose authentication, but I guess it's not a great
> issue: I don't think that git will be the preferred sharing protocol in
> case of authenticated repos.
>
>
>
>>
>> The algorithm could be:
>>> # Browsing:
>>> - for each the repo url:
>>>- if it does not point to a metadata.ini file
>>>   - get the metadata address from the URL
>>>- if we have an handler to retrieve the metadata.ini
>>>   - retrieve the metadata.ini
>>>- else
>>>   - error
>>> #Installing
>>> - if the metadata does not contain a download URL for the collection
>>> - build the collection download URL from the repo URL and protocol
>>> and collection name
>>> - if we have an handler to retrieve the collection
>>> - download and install
>>> - else
>>> - error
>>
>>
>> I was thinking to separate between Metadata Handler and Repository
>> Handler as they don't have any correlation. For example, the metadata could
>> be in an ftp and the repository could be in git. Doing if else (treating
>> the only one git case: that the repository URL is a git repository and
>> building a metadata URL from that URL is not that worth it). So when users
>> add a repository, they add the metadata url. What do you think?
>>
>>
>
> It looks good to me, browsing metadata and installing a collection are two
> separate steps (in time and scope) and it's worth splitting the URLs into
> different protocol, if needed.
>
> Of course, for most repos, the handler and protocol will just be the same
> for both operations.
>
> In general, I feels that this is a better approach also in the sense that
> "explicit is better than implicit", we provide explicit URIs instead of
> delegate guessing them to the software layer.
>
> Cheers
>
> --
> Alessandro Pasotti
> w3:   www.itopen.it
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Report 10 - QGIS Resources Sharing Tools

2016-07-30 Thread Akbar Gumbira
*What did you get done this week?*

   - *Implemented style resource handler*

User can now also put style (qml file) in the collection.


   - *Fixed issues on windows*

It should be testable now on Windows. There is an issue on windows while
downloading the repository using ssh. I haven't prevented that (e.g
restricting to use https only when adding a repository in the settings -
but I guess it's easier to do this rather than checking if the host has ssh
installed)


   - *Wrote some documentation* (
   http://www.akbargumbira.com/qgis_resources_sharing/)


   - *Implemented file system handler*

User can now use repository in the local file system. The URI should have
this format: file://. On Windows it looks something
like this *file://C:/home/akbar/repo. *On linux: *file:///home/akbar/repo*.
This could be useful for:


   - Testing if the repository works fine before pushing to
  github/bitbucket (user can try to add a repo in the stting
pointing to the
  filesystem)
  - In case someone wants to use private repo, they can pull it to
  their local machine, and just use that local clone
  - Sharing the repository on the network

*What do you plan on doing next week?*

   - Documentation and unittests
   - Using QGIS authentication system in the settings tab when adding a
   repository (this would be easy in the case of fetching metadata from the
   repository, but might be tricky for cloning/pulling repository itself)
   - Ale and I had a talk on friday and zip repository handler might be
   useful for users (i.e the author makes a zip of the repository on publish
   it somewhere online). With the current implementation of repository handler
   (the metadata must be inside the repository itself), this might take some
   effort to implement. We don't want to download the whole zip just to get
   the metadata file. Ale's idea is to separate the metadata and in the
   metadata, additional things has to be defined: the protocol (e.g git, file
   system handler, or ftp, scp maybe in the future), and the location of the
   repository itself. I am a bit hesitant with this idea from the beginning
   (Ale already suggested this before :)) as I think the metadata and the
   repository must be in the same directory. It's nice to not have the
   protocol and the location of the repository statically defined. As I
   mentioned earlier with file system handler, user now can clone private
   repository in github/bitbucket and use file system handler. There's no need
   to change the metadata of the repository before using it (this is needed if
   we want to take Ale's idea). Anyway, I'll think about this over the weekend
   and see if I could implement this on time and still have time to polish
   things up.


*Are you blocked on anything?*
No, just need to have more opinions on the situation I mentioned above.

Have a nice weekend. Cheers!
-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Cleaning up the QEP list

2016-07-26 Thread Akbar Gumbira
Hi Andreas,

For my QEP I am not sure how to proceed with the ticket. It has gone 180
degrees from the concept written in QEP. Should I close it or edit the
ticket?

Cheers

On Mon, Jul 25, 2016 at 11:17 AM, Neumann, Andreas <a.neum...@carto.net>
wrote:

> Hi all, Hi Nathan,
>
> I am looking at the QEPs from time to time that and I think it needs a
> little attention. Quite a few proposals would be ready to make a decision.
> Some QEPs are ready but lack funding. Perhaps we can introduce a new label
> stating "Needs funds" or something similar? It would help potential funders
> to pick things they like to see implemented. Quite a few of the proposals
> are already implemented, sometimes even if they don't have the "Accepted
> label" - i guess some of the implementations had time pressure due to the
> 2.16 list and thus couldn't wait for voting/acceptance.
>
> Devs want to start working on many of the issues mentioned in the QEPs -
> so decisions need to be taken in a timely manner.
>
> Here are some of my personal suggestions for changes / closings:
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/42 (Compulsory
> Unit Tests for Core Changes) - discussion stalled - but I think now would
> be the perfect timing to implement this proposal.
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/40 (Geometry
> redesign) - was implemented already 2 or 3 versions ago - should be
> accepted and closed
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/59 (aggregate
> functions) is accepted, implemented - it can be closed
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/58 (QGIS
> Styles, Symbols ans SVG Markers Sharing Repository) - is currently being
> implemented by Akbar - shouldn't it be voted on/accepted?
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/53 (WFS
> provider enhancements) - is already implemented and should be closed
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/49 (Label
> mask) - would be ready to implement, but lacks funding (add the new "Needs
> funds" label?)
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/46 (Labling
> path) - would be ready to implement, but lacks funding (add the new
> "Needs funds" label?)
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/45 (Long term
> releases) - implemented - should be closed
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/43 (Rename
> Compositions to Print Layouts) - would be good to be addressed during work
> for 3.x - can we continue discussion and vote on it?
>
>  - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/39 (Layout
> rework (composer v2)) - Nyall wants to start on this - so it should be
> discussed and accepted
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/38 (Inheritable
> property collections) - unsure about the status here, apparently it has a
> prototype implementation. How does this relate to the variable system
> introduced recently?
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/37 (Fields
> and Forms Redesign) - would be a good candidate to be implemented during
> QGIS 3.x - probably lacks funding
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/35 (Authentication
> configuration system with master password) - already implemented. Should be
> accetped and closed.
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/32 (Add QGIS
> server access control interface for python plugins) - already implemented.
> Should be accepted and closed:
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/31 (QGIS
> Legal Entity) - accepted by Loomio vote and mostly implemented. Should be
> acepted and closed.
>
> - https://github.com/qgis/QGIS-Enhancement-Proposals/issues/29 (QGIS 3.0)
> - discussion maybe a bit outdated? Close?
>
>
>
> It would be good, if we, as the project would take the QEPs a bit more
> seriously and maintain them accordingly. Seems like some devs do, some
> don't. Any comments?
>
> Thanks and greetings,
>
> Andreas
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Report 9 - QGIS Resources Sharing Tools

2016-07-24 Thread Akbar Gumbira
Hi All,

This is the report for the 9th week of my GSoC project for QGIS. I also
made a video to explain the state of the tools, I hope it could help
https://youtu.be/77fglr3C2TU (especially for Richard :))

*What did you get done this week?*

   - Implemented processing scripts handler
   - Implemented another approach to deal with threads
   - Created collection test data
   - Moved documentation from documentup to jekyll github page (
   http://www.akbargumbira.com/qgis_resources_sharing/)
   - Implemented preview of the collection
   - Fixed some layout problem reported by Ale

*What do you plan on doing next week?*
I plan to:

   - Implement repository handler to deal with local file system
   - Implement style resource handler
   - Write tests
   - Write documentation

But I'll call Ale on Monday, if he's available, to talk about what I should
do this week

*Are you blocked on anything?*
No, but I think I need people testing the tool. So, if you're interested to
test it, you can clone the project right here
https://github.com/akbargumbira/qgis_resources_sharing to your local QGIS
directory. It would be helpful for me if there's someone testing on Windows
and Mac. I still have 4 weeks left to polish things up.

Cheers
-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] plugins.qgis.org star vote feeback

2016-07-20 Thread Akbar Gumbira
There is a ticket related here https://hub.qgis.org/issues/6478. We had a
discussion whether we should have the feedbacks on our side or usea 3rd
party plugin such as disqus, but it did not go much further than that.

Cheers

On Wed, Jul 20, 2016 at 4:45 PM, Paolo Cavallini <cavall...@faunalia.it>
wrote:

> Il 20/07/2016 16:40, C Hamilton ha scritto:
> > I don't know if it is possible, but it would be really nice if there
> > were a way to get feedback on what a user likes or especially what the
> > user dislikes when they vote on a QGIS plugin. If they give it a 1, 2,
>
> Hi,
> agreed, this would be a very nice feature (even though we should be
> careful about the potential implication - remember we have a potential
> user base in the order of 100k users). Could you please open a feature
> req, or much better help us coding it?
> All the best.
>
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Report 8 - QGIS Symbology Sharing Tools

2016-07-17 Thread Akbar Gumbira
Hi All,

This is the report for the 8th week of my GSoC project.

*What did you get done this week?*

   - Implemented symbol handler and resolved the dependency problem to the
   image/svg used by the symbol. So in a symbol we can svg/image from the
   collection itself, from the other collections installed, from default
   package data, or from url.
   - Started implementing handler for processing scripts
   - Fixed some issues related to directory management

*What do you plan on doing next week?*

   - Continue working on processing scripts handler so that we can put
   processing scripts in the resource directory (wondering now if we should
   rename the tools to something like 'QGIS Resource Sharing Tools'
   - Figure out a way to grab windows and test the tool
   - Create collection test data and implement some comprehensive unittests
   - Write documentation

*Are you blocked on anything?*
No. I think the tool is in a decent state that now importing symbol and svg
is working nicely.

-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Modifying image path for any vector symbols using svg/image

2016-07-14 Thread Akbar Gumbira
Hi,

I am trying to comprehensively modify image/svg paths of any kind of vector
symbol that is possible to use svg/image (QgsFillSymbolV2, QgsLineSymbolV2,
QgsMarkerSymbolV2). With the symbol layers (QgsSymbolLayerV2) possibilities
of the symbol, I got this breakdown:

For SVG Marker

> - QgsMarkerSymbolLayerV2
> -- QgsSVGMakerSymbolLayerV2
> --- .*path(), .setPath()*

For SVG marker line:

- QgsLineSymbolLayerV2
>  -- QgsMarkerLineSymbolLayerV2

   --- *.subSymbol().symbolLayers()* -> *QgsSymbolLayerV2* (run this
breakdown again)

For Fill symbol:

- QgsFillSymbolLayerV2
> -- QgsImageFillSymbolLayer
> --- QgsRasterFillSymbolLayer
>  *.imageFilePath(), .setImageFilePath()*
> --- QgsSVGFillSymbolLayer
>  *.svgFilePath(), .setSvgFilePath()*


Do I miss other possibilities? or perhaps is there an easier way to modify
the path?

Cheers
-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Adding symbols through API needs QGIS restarts to show up

2016-07-12 Thread Akbar Gumbira
Hi Martin,

Thanks, seems to work. I read a bit the cpp code in Style Manager DIalog
that it will load the default style when showing up the dialog. So I
thought once it's written correctly to the database, it will not have this
problem. Thanks for the explanation, it's clear now what the API's are
meant to do.

On Tue, Jul 12, 2016 at 7:57 PM, Martin Dobias <wonder...@gmail.com> wrote:

> Hi Akbar
>
> On Tue, Jul 12, 2016 at 7:49 PM, Akbar Gumbira <akbargumb...@gmail.com>
> wrote:
> > Hi,
> >
> > I am trying to add symbols/colorramps through Python API and I have a
> > problem that after adding symbol/colorramps, the added symbols/colorramps
> > don't show up in Style Manager right away. The symbols are added in the
> > symbology-ng-style.db, but the added symbols show up once I restart QGIS
>
> Try this instead:
>
> style = QgsStyleV2.defaultStyle()
> style.addSymbol("ABC", my_symbol)
>
> The default style is the one loaded on start and used throughout QGIS
> application, so if you modify it, the changes will be immediately
> visible in the GUI and will be saved automatically.
>
> Cheers
> Martin
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Adding symbols through API needs QGIS restarts to show up

2016-07-12 Thread Akbar Gumbira
Hi,

I am trying to add symbols/colorramps through Python API and I have a
problem that after adding symbol/colorramps, the added symbols/colorramps
don't show up in Style Manager right away. The symbols are added in the
symbology-ng-style.db, but the added symbols show up once I restart QGIS

This is more or less the code:

style_manager = QgsStyleV2()
> style_manager.load(QgsApplication.userStyleV2Path())
> # Adding symbols here
> style_manager.addSymbol(symbol_name, symbol, True)
> # Perhaps this works, load the db again
> style_manager.load(QgsApplication.userStyleV2Path())


Is there something in the API that I could call to trigger the dialog to
show up the changes after adding the symbols?


-- 

*-------*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] compiling 2.16

2016-07-12 Thread Akbar Gumbira
Got the same problem here too. This was the same problem that I encountered
in master some time ago (
https://gist.github.com/akbargumbira/4221338b4b3042dcc144cd78aeb6ca69)

On Tue, Jul 12, 2016 at 10:47 AM, Richard Duivenvoorde <rdmaili...@duif.net>
wrote:

>
> Clean checkout for branche release-2_16, and normal compile:
>
> [ 82%] Generating ui_dialogAbout.py
> Traceback (most recent call last):
>   File "../../../../../scripts/pyuic-wrapper.py", line 26, in 
> import qgis.PyQt.uic.pyuic
> ImportError: No module named qgis.PyQt.uic.pyuic
>
> python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/build.make:117:
> recipe for target 'python/plugins/GdalTools/tools/ui_dialogAbout.py' failed
> make[2]: *** [python/plugins/GdalTools/tools/ui_dialogAbout.py] Error 1
> CMakeFiles/Makefile2:5074: recipe for target
> 'python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/all'
> failed
> make[1]: ***
> [python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/all]
> Error 2
> Makefile:160: recipe for target 'all' failed
> make: *** [all] Error 2
>
> is this an ordering problem?
>
> Regards,
>
> Richard
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Unicode type QGIS_RELEASE_NAME and QGIS_VERSION

2016-07-12 Thread Akbar Gumbira
>
> As a general rule of thumb: don't cast to other types if there is no
> requirement, that will help to prevent such issues and make the upcoming
> upgrade to python 3 much easier.

Yes, this should be Python 2.xx's developer haiku: *Bytes on the outside,
unicode on the inside. Encode/decode at the edges. *It's a bad habit in
Python 2.xx to cast to str when the string probably could contain accented
chars (e.g doing *str(layer.source()*). But in Python 3, str is unicode,
most of problem would probably be gone. For some strategies, perhaps what
we did in InaSAFE could be useful, see the 3rd comment in this PR:
https://github.com/inasafe/inasafe/pull/1674

On Tue, Jul 12, 2016 at 9:35 AM, Matthias Kuhn <matth...@opengis.ch> wrote:

> Hi Minoru
>
> On 07/12/2016 03:01 AM, Minoru Akagi wrote:
> > Hi,
> >
> > Just a quick note for python plugin devs.
> >
> > I received an error report related to QGis.QGIS_VERSION constant [1].
> > In QGIS 2.16, QGis.GIS_RELEASE_NAME and QGis.QGIS_VERSION constants
> > have been changed to unicode type. I guess that the change is
> > necessary for unicode release name support.
>
> I don't think the type has changed. Before python just converted it
> silently because the conversion of a pure ascii unicode string was trivial.
> Compare:
>
> >>> str(u'Essen')
> 'Essen'
> >>> str(u'Nødebo')
> Traceback (most recent call last):
>   File "", line 1, in 
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in
> position 1: ordinal not in range(128)
>
> As a general rule of thumb: don't cast to other types if there is no
> requirement, that will help to prevent such issues and make the upcoming
> upgrade to python 3 much easier.
>
> Matthias
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Report 7 - QGIS Symbology Sharing Tools

2016-07-10 Thread Akbar Gumbira
Hi All,

This is the report for the 7th week of my GSoC project

*What did you get done this week?*

   - Implemented resources handler (base class and the SVG handler). This
   classes are responsible to import resources in to QGIS.
   - Did some refactoring
   - Set up documentation here: www.akbargumbira.com/qgis_symbology_sharing

*What do you plan on doing next week?*

   - FIx some issues (#8
   <https://github.com/akbargumbira/qgis_symbology_sharing/issues/8>, #9
   <https://github.com/akbargumbira/qgis_symbology_sharing/issues/9>) and
   minor stuffs (filter collections to only show collections compatible with
   user's QGIS version)
   - Step back and think again about the approach to import resources in to
   QGIS since I think the current approach won't work if we want all the
   resources in the collection to link correctly before and after
   installation. Before installation is when user prepares the collection
   (SVG, styles, and symbols) before pushing to the repository. After
   installation is when users install the collection through the plugin after
   the author shares the collection.

*Are you blocked on anything?*
I am blocked on:

   - How to import symbol and colorramp in to QGIS (was thinking to create
   a group for a collection, a child group for each xml file in a collection,
   and put all the symbols and colorramps in the child group in Style
   Manager). But the name of the symbol must be unique no matter what the
   group is (This is set as the constraint of the symbology-ng-style.db
   - Haven't figured out a way for the resources to link each other
   correctl (2nd point for what I will do next week). The problem is, when
   user sets up a collection (put SVG, create symbols and styles for that
   SVGs, and push to the repository), the symbols/styles that use that SVGs
   might use absolute path. If it's possible, I need to make it use relative
   path and ensure that before and after installation, the relative path works.

There is also a bug I believe in the QGIS for importing symbols and
colorramps from the xml file and directly save in the group (it doesn't add
the imported symbols/colorramps to the group).

Other things in Style Manager that is not intuitive right now:

   - Deleting a parent group doesn't delete child group(s)
   - Selecting a parent group doesn't show all the items from the child
   group(s)

Cheers

-- 

*-------*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Report 6 - QGIS Symbology Sharing Tools

2016-07-03 Thread Akbar Gumbira
Hi,

I made a video to show what I did this week: https://youtu.be/f9u3-uWDNm0

OOT a bit, I think we can extend the current Plugin Manager to also be able
to install a plugin directly from Git repositories. It could be useful in
the plugin development life cycle. For example in InaSAFE, before releasing
the plugin, it should be tested by users (which are not familiar with GIT
or 'copying' directly the plugin into their local qgis2 directory). One of
the solution is to publish that version of the plugin in other repository.
But I think it would be handy if we can enable users to install the latest
version of the plugin (if we know the GIT repository of the plugin) in the
Plugin Manager itself.


*What did you get done this week?*

   - Move collections cache into a pickle file
   - Downloading the collection nicely with Dulwich.

*What do you plan on doing next week?*

   - I will start working on importing the resources available in the
   collection in to QGIS. I will implement it using the same pattern like
   Repository Handler. The resource handler is a base class and there will be
   some resource handler classes based on its type (whether it's SVG or
   colorramp/symbol). I will focus on the SVG first since I still have some
   missing pieces to implement the colorramp/symbols one :)
   - I will make a doc site using documentup and start writing
   documentation.

*Are you blocked on anything?*
No

-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Report 5 - QGIS Symbology Sharing Tools

2016-06-28 Thread Akbar Gumbira
HI,

Yes, I am trying to explore Dulwich now (which is a pure Python
implementation of GIT). There is no need to add git dependency added to
QGIS or that user needs to have git in their computer (if Dulwich works
nicely).

And as Ale said, we would like to have 2 designs implemented here:

   - Repository handler. This should be independent to the protocol of the
   repository. In the case of filesystem, it would be just to copy the
   repository to the plugin working directory and extract the collections
   inside. I made handlers classes quite general and will be refactoring time
   to time if it's needed (now I am still working on git protocol though).
   - Resources handler. This part of the system should handle how the
   resources in the collection being imported into QGIS.

The focus on this GSoC phase is to fetch and import the collections (not
the sharing part). With this goal, it would be easier for users if we
implement in a way that they don't need to make a list of the resources in
the collections. That's why I am still looking for a solution other than
listing all the resources and fetch them one by one using HTTP request to
the git host.

Cheers

On Tue, Jun 28, 2016 at 11:09 AM, Alessandro Pasotti <apaso...@gmail.com>
wrote:

> 2016-06-27 21:45 GMT+02:00 Régis Haubourg <regis.haubo...@gmail.com>:
>
>> Hi,
>> I tend to think that git / github workflow could be too high technician
>> for most users that have not developer's culture. This is how I see it for
>> processing script sharing today.. but processing is mostly concerning devs
>> when styling is a lot wider.
>> Why not combine both? Gist or equivalent for static files and git for the
>> main repo where or and collaborative work is required?
>> Cheers Regis
>>
>
> The designed architecture of the resource sharing system is protocol
> independent: handlers for different repository protocols can be easily
> added.
>
> The idea is to have at least:
> - filesystem (symbol repository is on filesystem, for example a network
> share), this is the simplest case: a copy command is all we need to fetch
> resources and update them
> - git
>
> So, git is just one of the possible handlers for remote repositories and
> the idea is that the average user will never know that git is used under
> the hood, it should be completely transparent.
>
> If the general design will be respected during the implementation, it will
> be really easy to expand the system to handle different remotes and
> different shared resources.
>
> The idea comes from the flexibility of python pip: it can fetch and
> install resources (python packages in this case) from many different URIs,
> git included.
>
> Cheers
>
>
>
> --
> Alessandro Pasotti
> w3:   www.itopen.it
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Report 5 - QGIS Symbology Sharing Tools

2016-06-27 Thread Akbar Gumbira
Hi Matthias,

Thanks for the feedback. Unfortunately raw URL is only provided for a
single file, not a directory. As one repository could have many collections
(collection is a directory containing resources), with git protocol, there
are 2 ways downloading a single collection from a repository: git sparse
checkout and git archive. Sparse checkout is not supported in Dulwich nor
in Pygit2 (a Python wrapper using libgit2). And with the 2nd option, Github
doesn't allow git archive.

One other alternative (which I am exploring now) is to clone a repository
the first time user downloads a collection from that repository, and next
time user downloads other collections from that repository, we just need to
update and pull that repository. This is more efficient compared to
downloading the whole repository (using zip url) every time user wants to
download a collection.

We came to the decision that one repository could have many collections in
the first place as it doesn't make sense  (we thought) for users to create
one repository only for one collection.

Cheers

On Sun, Jun 26, 2016 at 7:50 PM, Matthias Kuhn <matth...@opengis.ch> wrote:

> Hi Akbar,
>
> thanks a lot for the update, I especially liked the video, this makes it
> a lot easier for the audience (at least me :) ) to get an impression of
> the status quo. Good job so far!
>
> Concerning dulwich, did you checkout the #dulwich IRC channel and the
> mailing list which are mentioned in the project's readme [1] ?
>
> What exactly are the efficiency problems you are referring to? Maybe
> it's also worth looking into downloading individual files over http
> instead of the whole .zip file (raw.githubusercontent.com), that also
> allows doing partial downloads if you don't need a complete repository
> and you know which files you want.
>
> Looking forward to hearing more of this project, keep up the good work!
>
> Matthias
>
> [1] https://github.com/jelmer/dulwich#help
>
> On 06/26/2016 07:10 PM, Akbar Gumbira wrote:
> > Hi,
> >
> > I made a video of the progress so
> > far: https://www.youtube.com/watch?v=OmJ2Vh3a63U
> >
> >
> > *What did you get done this week?*
> >
> >   * Saving the metadata of the collections to local as a cache (after
> > some operations like adding/removing/deleting repository) so that
> > when user doesn't have internet, (s)he will still be able to browse
> > collection.
> >   * Filtering collections with custom QSortFilterProxyModel to allow
> > filtering based on author, name, description, etc.
> >   * Fix unicode problem (The problem is when parsing the metadatafile.
> > Using ConfigParser it was read as str. Changed it to
> > SafeConfigParser with codecs module)
> >   * Implemented reload repositories. Also when fetching metadata, never
> > use cache
> >   * Implemented Ale's suggestion to have a directory file in official
> > repository and containing available repositories (and by default all
> > those repositories will be registered in the plugin)
> >   * Still thinking to use git as it will be more efficient rather than
> > using zip url and tried Dulwich (Python pure git implementation),
> > but it's freezing the UI (see the video above)
> >
> > *What do you plan on doing next week?*
> >
> >   * My code is getting harder to read. Need to refactor some and make
> tests
> >   * Tried to load a repository that contains 1000 collections. Right
> > now, I just saved the metadata's cache (dict) to the qsettings. The
> > QGIS config file is getting too big. WIll move this to a separate
> > pickled file.
> >   * Explored Dulwich more
> >
> >
> > Are you blocked on anything?
> > I have problem with Dulwich. It's freezing the UI. I want to show the
> > progress of cloning/pulling repository realtime but I haven't figured
> > out a way yet.
> >
> > --
> >
> > *---*
> >
> > *Akbar Gumbira *
> > *www.akbargumbira.com <http://www.akbargumbira.com>*
> >
> >
> > ___
> > Qgis-developer mailing list
> > Qgis-developer@lists.osgeo.org
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Report 5 - QGIS Symbology Sharing Tools

2016-06-26 Thread Akbar Gumbira
Hi,

I made a video of the progress so far:
https://www.youtube.com/watch?v=OmJ2Vh3a63U


*What did you get done this week?*

   - Saving the metadata of the collections to local as a cache (after some
   operations like adding/removing/deleting repository) so that when user
   doesn't have internet, (s)he will still be able to browse collection.
   - Filtering collections with custom QSortFilterProxyModel to allow
   filtering based on author, name, description, etc.
   - Fix unicode problem (The problem is when parsing the metadatafile.
   Using ConfigParser it was read as str. Changed it to SafeConfigParser with
   codecs module)
   - Implemented reload repositories. Also when fetching metadata, never
   use cache
   - Implemented Ale's suggestion to have a directory file in official
   repository and containing available repositories (and by default all those
   repositories will be registered in the plugin)
   - Still thinking to use git as it will be more efficient rather than
   using zip url and tried Dulwich (Python pure git implementation), but it's
   freezing the UI (see the video above)

*What do you plan on doing next week?*

   - My code is getting harder to read. Need to refactor some and make tests
   - Tried to load a repository that contains 1000 collections. Right now,
   I just saved the metadata's cache (dict) to the qsettings. The QGIS config
   file is getting too big. WIll move this to a separate pickled file.
   - Explored Dulwich more


Are you blocked on anything?
I have problem with Dulwich. It's freezing the UI. I want to show the
progress of cloning/pulling repository realtime but I haven't figured out a
way yet.

-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Sharing 1. symbology (styles) and 2. projects incl. data and styles (GSoC, relocator, QConsolidate)

2016-06-19 Thread Akbar Gumbira
Hi Stefan,

I just read your All-In-One Project Plugin documentation here (are you
about to develop it? or already developed it?). I think more or less the
goal would be the same with current GSoC project if we extend the
definition of 'collection' to also contain data itself. So one colleciton
is a self-sufficient QGIS resources (including its data) to create a
coherent map design.

Cheers

On Sun, Jun 19, 2016 at 10:55 PM, Akbar Gumbira <akbargumb...@gmail.com>
wrote:

> HI Stefan,
>
> I am the one doing that GSoC project. You remind me that I need to update
> the project description in osgeo wiki. The concept has changed a lot since
> then. We decided that we would go with sharing collections to a directory
> based repository (For now I will implement it for Github and Bitbucket). If
> you have some time, I would suggest you to read the current plan here (it
> would be long to explain in this email)
> https://docs.google.com/document/d/13ETuLBTx5IjVejB8TQPjjsMWBcUQO6pIKrNSrAZUApo/edit?usp=sharing
>
>
> Cheers
>
> On Sun, Jun 19, 2016 at 10:00 PM, Stefan Keller <sfkel...@gmail.com>
> wrote:
>
>> Hi,
>>
>> These are thoughts on sharing 1. a whole QGIS symbology and 2. a whole
>> QGIS project including symbology and data.
>>
>> There's a promising current GSoC project, where users ("designers,
>> cartographers") can << share QGIS style files >> incl. styles (.qml),
>> symbols (.xml) and SVG markers. End users can download and add styles,
>> symbols or SVG markers (set of?). See
>> https://wiki.osgeo.org/wiki/QGIS_Sharing_Repository .
>>
>> Use case A: What about sharing a symbology with dozens of layers still
>> without the data? So, this is about users ("style producers") who want
>> to << share a complete set QGIS styles >> which involves references to
>> several data layers. End users should be able to open a dataset (like
>> a vector/raster data from GeoPackage or a QGIS project), and then load
>> or exchange a "symbology set". This is often the case when data is
>> split into several regions or when end users capture data of same
>> schema.
>>
>> I have no ideas yet to resolve this use case, except taking use case B
>> as a (rather unmaintainable, intermediate) solution.
>>
>> Use case B: Users ("producers") want to easily << share a complete
>> QGIS project >> including data and symbology. Currently for producers,
>> it is necessary to: 1. Manually collect all required files into a
>> "project directory" including project file .qgs, data, svg markers,
>> color ramps (others?), 2. Edit QGIS project to adapt file paths, and
>> finally 3. zip the directory and send or publish it. End users would
>> unpack it and double click on the QGIS project file.
>>
>> Possible approaches are the relocator and QConsolidate plugins
>> (possibly not maintained any more) and my "All-in-one Project"
>> (unfinished). And there's Pirmin's idea to put everything into a
>> GeoPackage file instead of a zip file.
>>
>> => Any comments or ideas?
>>
>> :Stefan
>>
>> P.S. For more issues on this like locally installed symbol fonts,
>> temporary/in-memory data layers, databases, secured web services, and
>> layer provider plugins) see my "All-in-one Project"
>> (http://giswiki.hsr.ch/All-in-one_Project_QGIS_Plugin).
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
> --
>
> *---*
> *Akbar Gumbira *
> *www.akbargumbira.com <http://www.akbargumbira.com>*
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Sharing 1. symbology (styles) and 2. projects incl. data and styles (GSoC, relocator, QConsolidate)

2016-06-19 Thread Akbar Gumbira
HI Stefan,

I am the one doing that GSoC project. You remind me that I need to update
the project description in osgeo wiki. The concept has changed a lot since
then. We decided that we would go with sharing collections to a directory
based repository (For now I will implement it for Github and Bitbucket). If
you have some time, I would suggest you to read the current plan here (it
would be long to explain in this email)
https://docs.google.com/document/d/13ETuLBTx5IjVejB8TQPjjsMWBcUQO6pIKrNSrAZUApo/edit?usp=sharing


Cheers

On Sun, Jun 19, 2016 at 10:00 PM, Stefan Keller <sfkel...@gmail.com> wrote:

> Hi,
>
> These are thoughts on sharing 1. a whole QGIS symbology and 2. a whole
> QGIS project including symbology and data.
>
> There's a promising current GSoC project, where users ("designers,
> cartographers") can << share QGIS style files >> incl. styles (.qml),
> symbols (.xml) and SVG markers. End users can download and add styles,
> symbols or SVG markers (set of?). See
> https://wiki.osgeo.org/wiki/QGIS_Sharing_Repository .
>
> Use case A: What about sharing a symbology with dozens of layers still
> without the data? So, this is about users ("style producers") who want
> to << share a complete set QGIS styles >> which involves references to
> several data layers. End users should be able to open a dataset (like
> a vector/raster data from GeoPackage or a QGIS project), and then load
> or exchange a "symbology set". This is often the case when data is
> split into several regions or when end users capture data of same
> schema.
>
> I have no ideas yet to resolve this use case, except taking use case B
> as a (rather unmaintainable, intermediate) solution.
>
> Use case B: Users ("producers") want to easily << share a complete
> QGIS project >> including data and symbology. Currently for producers,
> it is necessary to: 1. Manually collect all required files into a
> "project directory" including project file .qgs, data, svg markers,
> color ramps (others?), 2. Edit QGIS project to adapt file paths, and
> finally 3. zip the directory and send or publish it. End users would
> unpack it and double click on the QGIS project file.
>
> Possible approaches are the relocator and QConsolidate plugins
> (possibly not maintained any more) and my "All-in-one Project"
> (unfinished). And there's Pirmin's idea to put everything into a
> GeoPackage file instead of a zip file.
>
> => Any comments or ideas?
>
> :Stefan
>
> P.S. For more issues on this like locally installed symbol fonts,
> temporary/in-memory data layers, databases, secured web services, and
> layer provider plugins) see my "All-in-one Project"
> (http://giswiki.hsr.ch/All-in-one_Project_QGIS_Plugin).
> ___________
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Report 4 - QGIS Symbology Sharing Tools

2016-06-19 Thread Akbar Gumbira
Hi All,

I want to share the progress of QGIS Symbology Sharing Tool for the GSoC
project. This tool will allow you to share collections (symbol, svgs, etc)
in a repository, fetch it, and use it in QGIS.


What did you get done this week?
This week I worked on:

*Handler Classes*
Handler class is responsible to interact with the repository (fetch the
metadata and download the collections). I made some classes for this:

   - BaseHandler: it's a base class that we can inherit from if we want to
   make another repository handler. It's an abstract class (OK, I don't use
   Python's abc but let's agree that it's an abstract class :)) (
   
https://github.com/akbargumbira/qgis_symbology_sharing/blob/master/symbology_sharing/handler/base.py
   ).
   - RemoteGitHandler: It's a base class to deal with remote git handler.
   It's not a concrete class but it's disabled. I create this class so that we
   can easily make handler classes inherit from this (
   
https://github.com/akbargumbira/qgis_symbology_sharing/blob/master/symbology_sharing/handler/remote_git_handler.py
   )
   - Github Handler and Bitbucket Handler. It's a concrete class (see here
   
https://github.com/akbargumbira/qgis_symbology_sharing/blob/master/symbology_sharing/handler/bitbucket_handler.py).
   It only works for public repositories for now.

So if we want to implement handler for another git remote repository, we
can inherit from RemoteGitHandler and define some methods like in
GithubHandler class.

It wouldn't be hard too to add another handler like FIleSystem Handler
(inheriting from BaseHandler). The handler classes are autoregistered as
long as you inherit it from BaseHandler. If can_handle(url) method is
implemented correctly, the tool will pick the right handler depending on
the URL.

This is the screencast I made to see how handlers work:
https://youtu.be/DxE_PONFsjY

*Parsing Metadata*
After adding a repository, it will fetch the metadata and register
avaialable collections from that metadata (it will only register, not
download).

*Separation between Repository Manager and Collection Manager*
Repository manager is a class responsible for managing repository and
calling the collection manager. Collection manager is responsible for
registering/unregistering collections. Main class only needs to deal with
repository manager.


*What do you plan on doing next week?*
Next week I want to work on:

   - Right now every time users add/edit/delete repo, it will fetch all the
   repositories registered after these actions. I am going to save the
   collections in QSettings when user closes QGIS, and when user
   add/edit/delete repository, it will only update collections belong to that
   repo in the collections registry.
   - Make tests
   - Show the detail of the collections when user clicks a collection.
   - Filter the collections based on the QGIS version
   - Start thinking about upgrading collections mechanism (perhaps we
   should add the version of the collection in the metadata)
   - Start implementing download collection for github and bitbucket
   handler.

If you have some thoughts for me, please email me.

*Are you blocked on anything?*
No.


-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Report 3 - QGIS Symbology Sharing Tools

2016-06-12 Thread Akbar Gumbira
Hi All,

Here is the report for the 3rd week of GSoC

*What did you get done this week?*
This week I didn't have much time to work on GSoC, but I managed to:

   - Try some python git libraries, but didn't really find one that could
   easily be used without some further efforts contributing on the libraries
   first. Using git to interact with the git repositories is really nice to
   have for example to clone only one collections from a repository (one
   repository could have many collections).
   - Implement some basic classes to deal with remote git repository (now
   it could fetch the metadata)
   - Configure testing: Travis and Coveralls. For testing I used Matthias'
   mocked QGIS module, not Ale's testing framework with QGIS on docker.

*What do you plan on doing next week?*
This week I am planning to:

   - Continue working on the modules to handle remote repository so that it
   can more neatly handle other cases (timeout, the repo isn't available, the
   metadata isn't available, etc)
   - Parsing the metadata file to a collections object
   - Update the add, edit, and delete repository slots to also update the
   collections object when those actions happened.

Finally I will have the last final exam tomorrow on Monday. After that, I
will work full-time on this (though I still need to do some administrations
for a few weeks here). I made a gitter chat room here:
https://gitter.im/akbargumbira/qgis_symbology_sharing so you can ping me
there for faster response. The repository is here
https://github.com/akbargumbira/qgis_symbology_sharing. I would be happy to
get code review from any of you .

*Are you blocked on anything?*
For now, no.

Cheers
-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Report 2 - QGIS Symbology Sharing Tools

2016-06-08 Thread Akbar Gumbira
Hi Ale,

I just tried Dulwich. There are three ways that I see to checkout a single
file: git sparse checkout, git archive, or shallow clone (still cloning all
files though).

With git sparse checkout, Dulwich does not provide the porcelain-level API.
The author says that it's possible though (
https://github.com/jelmer/dulwich/issues/405#issuecomment-224579678). I am
not sure how much work to implement it dealing with the git object, tree,
and blob itself at the plumbing level.

With git archive, unfortunately Github doesn't allow us to do this (
https://twitter.com/GitHubHelp/status/322818593748303873). WIth shallow
clone left, I feel that I would over-engineer it forcing to use git just to
be able to do this. I think it's more simple if for now we use the raw
endpoint for each hosts that we know (Github, Bitbucket, etc), and we add
more supported hosts as users put the collection in other hosts as long as
we know the URL to the raw metadata file.

What do you think?

Cheers

On Wed, Jun 8, 2016 at 9:51 AM, Akbar Gumbira <akbargumb...@gmail.com>
wrote:

> Wasn't that a requisite? If we are going to use git as a storage we need a
>> git client (pure python seems to exist, could be used as a fallback in case
>> git is not installed in the system) https://github.com/jelmer/dulwich .
>>
>
>
>> BTW: if you do not want to deal with git in this first task, you could
>> used the zip endpoint, and assume that the metadata will be available at a
>> known location in the remote http repo and just wget it.
>
>
> Ok. I was just trying to find solution that could work out well without
> having git (as from the last discussion with Martin, it's better to avoid
> using git for now). I will try pygit2 and dulwich and I'll report you back
> what I thought using those two.
>
> On Wed, Jun 8, 2016 at 9:41 AM, Alessandro Pasotti <apaso...@gmail.com>
> wrote:
>
>> 2016-06-08 9:21 GMT+02:00 Akbar Gumbira <akbargumb...@gmail.com>:
>>
>>> Yes, I have tried it. We can do it with sparse checkout, but, it
>>> requires git on the client.
>>>
>>
>>
>> Wasn't that a requisite? If we are going to use git as a storage we need
>> a git client (pure python seems to exist, could be used as a fallback in
>> case git is not installed in the system)
>> https://github.com/jelmer/dulwich .
>>
>> BTW: if you do not want to deal with git in this first task, you could
>> used the zip endpoint, and assume that the metadata will be available at a
>> known location in the remote http repo and just wget it.
>>
>>
>>
>>>
>>> On Wed, Jun 8, 2016 at 9:18 AM, Alessandro Pasotti <apaso...@gmail.com>
>>> wrote:
>>>
>>>>
>>>> 2016-06-08 9:10 GMT+02:00 Akbar Gumbira <akbargumb...@gmail.com>:
>>>>
>>>>> Hi Akbar,
>>>>>> The most flexible installation tool that I know is probably python
>>>>>> pip.
>>>>>> pip can install software from a zip file, from git and from other
>>>>>> sources too.
>>>>>> I'd suggest you to have a look to pip implementation of the install
>>>>>> functionality, maybe there is some interesting for you.
>>>>>
>>>>> I just read pip code base. I think I can pick something from there for
>>>>> downloading the resources. But the problem I have right now is to get only
>>>>> the metadata file from the repository. Or are you suggesting that when
>>>>> users add a repository connection, it also downloads the repository
>>>>> directly?
>>>>>
>>>>
>>>>
>>>> If you are working on the git repos you can probably fetch just one
>>>> file without cloning the whole repo, I did not test it but here are
>>>> probably some pointers:
>>>>
>>>>
>>>> http://stackoverflow.com/questions/2466735/how-to-checkout-only-one-file-from-git-repository
>>>>
>>>> http://stackoverflow.com/questions/1125476/retrieve-a-single-file-from-a-repository
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> On Mon, Jun 6, 2016 at 8:39 AM, Alessandro Pasotti <apaso...@gmail.com
>>>>> > wrote:
>>>>>
>>>>>> 2016-06-05 10:13 GMT+02:00 Richard Duivenvoorde <rdmaili...@duif.net>
>>>>>> :
>>>>>>
>>>>>>> On 05-06-16 09:02, Akbar Gumbira wrote:
>>>>>>>
>>>>>>> > *Are you blocked on anything?*
>>>>>>> > ... In Github

Re: [Qgis-developer] Report 2 - QGIS Symbology Sharing Tools

2016-06-08 Thread Akbar Gumbira
>
> Wasn't that a requisite? If we are going to use git as a storage we need a
> git client (pure python seems to exist, could be used as a fallback in case
> git is not installed in the system) https://github.com/jelmer/dulwich .
>


> BTW: if you do not want to deal with git in this first task, you could
> used the zip endpoint, and assume that the metadata will be available at a
> known location in the remote http repo and just wget it.


Ok. I was just trying to find solution that could work out well without
having git (as from the last discussion with Martin, it's better to avoid
using git for now). I will try pygit2 and dulwich and I'll report you back
what I thought using those two.

On Wed, Jun 8, 2016 at 9:41 AM, Alessandro Pasotti <apaso...@gmail.com>
wrote:

> 2016-06-08 9:21 GMT+02:00 Akbar Gumbira <akbargumb...@gmail.com>:
>
>> Yes, I have tried it. We can do it with sparse checkout, but, it requires
>> git on the client.
>>
>
>
> Wasn't that a requisite? If we are going to use git as a storage we need a
> git client (pure python seems to exist, could be used as a fallback in case
> git is not installed in the system) https://github.com/jelmer/dulwich .
>
> BTW: if you do not want to deal with git in this first task, you could
> used the zip endpoint, and assume that the metadata will be available at a
> known location in the remote http repo and just wget it.
>
>
>
>>
>> On Wed, Jun 8, 2016 at 9:18 AM, Alessandro Pasotti <apaso...@gmail.com>
>> wrote:
>>
>>>
>>> 2016-06-08 9:10 GMT+02:00 Akbar Gumbira <akbargumb...@gmail.com>:
>>>
>>>> Hi Akbar,
>>>>> The most flexible installation tool that I know is probably python pip.
>>>>> pip can install software from a zip file, from git and from other
>>>>> sources too.
>>>>> I'd suggest you to have a look to pip implementation of the install
>>>>> functionality, maybe there is some interesting for you.
>>>>
>>>> I just read pip code base. I think I can pick something from there for
>>>> downloading the resources. But the problem I have right now is to get only
>>>> the metadata file from the repository. Or are you suggesting that when
>>>> users add a repository connection, it also downloads the repository
>>>> directly?
>>>>
>>>
>>>
>>> If you are working on the git repos you can probably fetch just one file
>>> without cloning the whole repo, I did not test it but here are probably
>>> some pointers:
>>>
>>>
>>> http://stackoverflow.com/questions/2466735/how-to-checkout-only-one-file-from-git-repository
>>>
>>> http://stackoverflow.com/questions/1125476/retrieve-a-single-file-from-a-repository
>>>
>>>
>>>
>>>
>>>>
>>>> On Mon, Jun 6, 2016 at 8:39 AM, Alessandro Pasotti <apaso...@gmail.com>
>>>> wrote:
>>>>
>>>>> 2016-06-05 10:13 GMT+02:00 Richard Duivenvoorde <rdmaili...@duif.net>:
>>>>>
>>>>>> On 05-06-16 09:02, Akbar Gumbira wrote:
>>>>>>
>>>>>> > *Are you blocked on anything?*
>>>>>> > ... In Github or Bitbucket they provide a direct link to
>>>>>> > the raw file. But I think I should look at more general approach
>>>>>> without
>>>>>> > manipulating the URL depending on the host. If you have some input,
>>>>>> I
>>>>>> > would be happy to assess it.
>>>>>>
>>>>>> Thanks Akbar,
>>>>>>
>>>>>> I did some googling:
>>>>>>
>>>>>> http://stackoverflow.com/questions/14405782/git-fetch-single-file-from-remote-repository-programatically
>>>>>> If you really want to keep it git, it looks like a shallow clone/copy
>>>>>> is
>>>>>> the only way? That post also talks about some undocumented feature,
>>>>>> but
>>>>>> I would not depend on that?
>>>>>>
>>>>>> Personally I would be ok when both Github and Gitlab/Gog would work
>>>>>> (as
>>>>>> both a closed source and open source member of the git-web-world)...
>>>>>>
>>>>>> Or: a script running somewhere on our server, (shallow) cloning all
>>>>>> registred repositories periodically, and making just the metadata.txt
>>>>>> files a

Re: [Qgis-developer] Report 2 - QGIS Symbology Sharing Tools

2016-06-08 Thread Akbar Gumbira
>
> Hi Akbar,
> The most flexible installation tool that I know is probably python pip.
> pip can install software from a zip file, from git and from other sources
> too.
> I'd suggest you to have a look to pip implementation of the install
> functionality, maybe there is some interesting for you.

I just read pip code base. I think I can pick something from there for
downloading the resources. But the problem I have right now is to get only
the metadata file from the repository. Or are you suggesting that when
users add a repository connection, it also downloads the repository
directly?

On Mon, Jun 6, 2016 at 8:39 AM, Alessandro Pasotti <apaso...@gmail.com>
wrote:

> 2016-06-05 10:13 GMT+02:00 Richard Duivenvoorde <rdmaili...@duif.net>:
>
>> On 05-06-16 09:02, Akbar Gumbira wrote:
>>
>> > *Are you blocked on anything?*
>> > ... In Github or Bitbucket they provide a direct link to
>> > the raw file. But I think I should look at more general approach without
>> > manipulating the URL depending on the host. If you have some input, I
>> > would be happy to assess it.
>>
>> Thanks Akbar,
>>
>> I did some googling:
>>
>> http://stackoverflow.com/questions/14405782/git-fetch-single-file-from-remote-repository-programatically
>> If you really want to keep it git, it looks like a shallow clone/copy is
>> the only way? That post also talks about some undocumented feature, but
>> I would not depend on that?
>>
>> Personally I would be ok when both Github and Gitlab/Gog would work (as
>> both a closed source and open source member of the git-web-world)...
>>
>> Or: a script running somewhere on our server, (shallow) cloning all
>> registred repositories periodically, and making just the metadata.txt
>> files available via http/webserver? (maybe giving us some time to check
>> the repo's on structure and (malicious?) content?
>>
>> Or else: a django app for the metadata...
>>
>> Regards,
>>
>> Richard
>>
>>
>>
>
> Hi Akbar,
>
> The most flexible installation tool that I know is probably python pip.
>
> pip can install software from a zip file, from git and from other sources
> too.
>
> I'd suggest you to have a look to pip implementation of the install
> functionality, maybe there is some interesting for you.
>
>
>
> --
> Alessandro Pasotti
> w3:   www.itopen.it
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Plugin repository latency

2016-06-06 Thread Akbar Gumbira
Recently Ale and Richard made a patch to fix an issue that made the server
down. The patch includes changing the view to provide the XML to request
the file directly from cached XMLs. But the cached XMLs are only generated
for the even minor version (2.12, 2.14, etc). So, for the odd minor
version, it will generate the XMLs instead of using the cached ones.

Cheers
On Jun 6, 2016 14:46, "Matthias Kuhn"  wrote:

> Hi,
>
> I often experience rather long waiting times when opening the plugin
> manager when it's waiting for the official plugin repository.
> Just before the request timed out.
>
> Also when opening it in a browser it takes several seconds:
> https://plugins.qgis.org/plugins/plugins.xml?qgis=2.15
>
> Is this a local issue or do others experience the same?
>
> Matthias
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Report 2 - QGIS Symbology Sharing Tools

2016-06-05 Thread Akbar Gumbira
Hi All,

Here is the report for the 2nd week of GSoC

*What did you get done this week?*
This week I implemented the basic UI. I created a repository here (
https://github.com/akbargumbira/qgis_symbology_sharing).  It's a QGIS
python plugin so you can clone it to your local python plugin directory to
try it. I made it similar to the Python Plugin Repositories as they both
have the same functionalities. Here is a screenshot of the UI
What it can do now is saving the repositories to the QSettings.

*What do you plan on doing next week?*
This week I will have 3 final exams and one in next monday. I will not
focus on GSoC this week. But I will start looking at fetching the metadata
file from the git repository. This metadata file contains collections
definition. After adding a connection and fetching the metadata, the tools
will save the collections defined there and save it to local db (thinking
of simple sqlite). Later this database will be used for browsing or
searching collections.

I am also going to set up Travis there (trying out the new QGIS testing
module as well).

*Are you blocked on anything?*
Not really, but I haven't figured out yet on how to fetch the metadata file
from the git repository using simple HTTP request without depending on the
host site. In Github or Bitbucket they provide a direct link to the raw
file. But I think I should look at more general approach without
manipulating the URL depending on the host. If you have some input, I would
be happy to assess it.

Cheers
​

-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] QGIS Default Style

2016-06-02 Thread Akbar Gumbira
Hi All,

I realized that there are some Qt components in QGIS that their style are
not changed after changing the UI theme (in Settings), for example the grey
background QListWidget. Is there API to apply these default style to be
used in Python Plugin?

Cheers

-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] [SoC] Report 1 - QGIS Symbology Sharing Tools

2016-05-31 Thread Akbar Gumbira
HI Massimo,

Thanks. Now I can build it. Anyway, we decided to make it as python plugin
first and make it similar like Plugin Manager later.

Cheers

On Mon, May 30, 2016 at 5:40 PM, Massimo Di Stefano <epiesa...@me.com>
wrote:

> Akbar,
>
> Marco and I added a commented on your gist.
> Did you fixed the build?
>
>
>
> On May 29, 2016, at 10:48 AM, Akbar Gumbira <akbargumb...@gmail.com>
> wrote:
>
> Hi All,
>
> Here is my report for the first week of GSoC
>
>
> *What did you get done this week?*
> During community bonding period and 1st week, I spent my time discussing
> with the community about the idea. We had a long email and comment
> discussion even before we met in QGIS Hackfest. Right now the way I will go
> is to use directory based for the repository. So this week I spent my time
> mostly on shaping the idea with my mentors (Anita, Ale), Tim, Richard,
> Martin, and other developers in QGIS Hackfest.
>
>
> *What do you plan on doing next week?*
> Next week, I will start implementing the UI.
>
>
> *Are you blocked on anything?*
> Yes, I couldn't build QGIS on master branch on Ubuntu 16.04 (it's fine
> with other release branch), I've tried to remove the build folder (even
> completely cloning it again - I am desperate enough). I'll look more into
> it. You can see the error log here:
> https://gist.github.com/akbargumbira/4221338b4b3042dcc144cd78aeb6ca69
>
> I also made a blog post here
> http://www.akbargumbira.com/gsoc-1-defining-use-cases-and-hackfest/
>
> Cheers
> --
>
> *---*
> *Akbar Gumbira *
> *www.akbargumbira.com <http://www.akbargumbira.com/>*
> ___________
> SoC mailing list
> s...@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/soc
>
>
>


-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Report 1 - QGIS Symbology Sharing Tools

2016-05-29 Thread Akbar Gumbira
Hi All,

Here is my report for the first week of GSoC


*What did you get done this week?*
During community bonding period and 1st week, I spent my time discussing
with the community about the idea. We had a long email and comment
discussion even before we met in QGIS Hackfest. Right now the way I will go
is to use directory based for the repository. So this week I spent my time
mostly on shaping the idea with my mentors (Anita, Ale), Tim, Richard,
Martin, and other developers in QGIS Hackfest.


*What do you plan on doing next week?*
Next week, I will start implementing the UI.


*Are you blocked on anything?*
Yes, I couldn't build QGIS on master branch on Ubuntu 16.04 (it's fine with
other release branch), I've tried to remove the build folder (even
completely cloning it again - I am desperate enough). I'll look more into
it. You can see the error log here:
https://gist.github.com/akbargumbira/4221338b4b3042dcc144cd78aeb6ca69

I also made a blog post here
http://www.akbargumbira.com/gsoc-1-defining-use-cases-and-hackfest/

Cheers
-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] GSOC 2016 - QGIS Symbology repository

2016-04-24 Thread Akbar Gumbira
Thanks Anita and Tim,

A bit of introduction, I am a master's student in Artificial Intelligence
in Poland (currently enrolled in Wrocław University of Technology for
preparation year and will be enrolled in Warsaw University of Technology
next semester). My experience with QGIS is mostly only as plugin developer
and did some hack for QGIS Plugin Django repository.

As Anita mentioned earlier, I will be working on the Symbol, Style, and SVG
markers sharing repository over this summer. Coding time officially starts
from May 23rd and before that is community bonding period. This community
bonding period is for me to know better the community, set up the necessary
development environment, get the implementation plan detailed, and
prioritize which requirements that I should finish first for this GSoC. To
do so, I will create a QEP and I hope I could get feedback by the end of
the community bonding period (May 22nd).

I hope I could learn a lot from this GSoC project and get to know more QGIS
community as a whole :)

Cheers

On Sun, Apr 24, 2016 at 9:40 PM, Tim Sutton <t...@qgis.org> wrote:

> Hi
>
> On 24 Apr 2016, at 19:39, Anita Graser <anitagra...@gmx.at> wrote:
>
> A warm welcome to Akbar Gumbira whose GSOC project [1] has officially been
> accepted!
>
> ​Akbar will be mentored by Alessandro Pasotti and me.
>
> ​Here's a short p
> roject summary:
>
> This project will focus on making styles (.qml), symbols definition
> (.xml), and SVG markers sharing possible through web services that later
> can be accessed and used in QGIS. The work includes:
>
>- Developing a web application to allow QGIS users (through OSGeo LDAP
>account) upload their styles, symbols, and SVG’s.
>- Integration in QGIS to allow users to fetch those resources and use
>them
>
> https://summerofcode.withgoogle.com/projects/#5898677587542016
>
>
> Congratulations Akbar! Its going to be great to have the symbol(ogy)
> sharing platform become a reality!
>
> Regards
>
> Tim
>
>
> ​Best wishes,
> Anita
>
> ​
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
> ---
>
> *Tim Sutton*
> QGIS Project Steering Committee Chair
> t...@qgis.org
>
>
>
>
>


-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QGIS update available plugin and/or ping back plugin

2015-08-10 Thread Akbar Gumbira
Hi Tim,

Yes, I am planning to add django-user-map to the QGIS Django site (I'll ask
you or Alessandro about the detail of it later). Before adding new
features, I actually want to clean up the project a bit:

   - Adding docker scripts for development, staging, and production. Tim,
   could you review it? (https://github.com/qgis/QGIS-Django/pull/12) I am
   not sure now if it's still running fine - it's been almost a month in the
   PR :-), so I will look at that PR again this week so later it's ready for
   you to review (I'll inform you when it's ready). That PR is changing the
   project structure in some ways. It's easier to merge that first and work on
   other things having that as the base.
   - Add travis and coveralls for a nicer testing platform.
   - Add some initial fixtures e.g the simplemenu (from the dump I got from
   you, I'll see other things that should be in the fixtures)


Regards

On Tue, Aug 11, 2015 at 5:38 AM, Tim Sutton t...@kartoza.com wrote:

 Hi

 On 03 Aug 2015, at 17:18, Richard Duivenvoorde rdmaili...@duif.net
 wrote:

 On 03-08-15 12:39, Vincent Picavet (ml) wrote:

 Repairing this feature, and maybe having an automated background check
 at startup would be good for this feature.


 Which is actually the same as a pingback, except without an unique
 identifier...
 But I created an issue for the repair:

 http://hub.qgis.org/issues/13178

 Can privacy concerning people live with this plan?


 Not me.

 Any personal information sent by the user should only be done on a
 volontary basis.

 I would agree with this if :
 * This is optional
 * This is not activated by default
 * The installer could ask the user if he wants to send statistics to the
 QGIS project, with a list of data items sent.


 let's be honest: if you let ME opt out, I opt out

 We can already generate global figures based on downloads, or plugin
 update requests...

 Found out that access.log of plugins.qgis.org is not rotated, so some
 grepping:

 $ grep /2014.*/plugins/plugins.xml?qgis= access.log | awk '{print $1}'
 | sort | uniq | wc -l
 541711

 $ grep /2015.*/plugins/plugins.xml?qgis= access.log | awk '{print $1}'
 | sort | uniq | wc -l
 546017

 so about half a million unique ip addresses per year? Not sure how this
 makes up for:
 - several installation behind one reverse proxy ip
 - roaming users or dynamic ip addresses
 But... it is something.

 The advantage of adding little more uniqueness info is to get better
 numbers. Making it an option, will not add something to our current setup.

 As an argument to allowing these pingbacks, as we/I invest pretty much
 time in localisation around QGIS, it would make me feel better if I know
 that all this work is actually be used by some people :-)


 User statistics are indeed very important. Privacy is just way more
 important, especially in these troubled times. I do think we, as
 opensource community members, and digital era citizens, have to show the
 way. Do not ever do things users would consider evil without getting
 their agreement.


 As said, for me it is rewarding to see that we have a lot of users, or
 that translations are actually used. But I do not want to end up in a
 privacy flame war. If consensus is that privacy is more important, I
 take that.


 Yes it has come up many times before and I think a better approach would
 be self-registration - perhaps we can take a similar approach to the
 donations popup after clicking download and encourage our users to add
 themselves to our user map. And also prompt them to do this on ‘first run’
 in QGIS. Akbar has been looking, I think, at adding the user map he built
 for InaSAFE to http://hub.qgis.org to replace the moribund one we have
 there.

 I don’t think it is beyond the realm of possibility that we have 1/2
 million installations out there - though there are also questions about
 reuse rate (e.g. many could have installed once, had a play and then
 uninstalled).

 Regards

 Tim



 Regards,

 Richard



 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer


 —




 Tim Sutton

 Visit http://kartoza.com to find out about open source:

 * Desktop GIS programming services
 * Geospatial web development
 * GIS Training
 * Consulting Services

 Skype: timlinux Irc: timlinux on #qgis at freenode.net
 Tim is a member of the QGIS Project Steering Committee

 Kartoza is a merger between Linfiniti and Afrispatial




-- 

*---*

*Akbar Gumbira*
*Software Engineer*
*Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QGIS plugin site

2015-08-04 Thread Akbar Gumbira
Hi Tim,

I'll look at the issue tonight. Btw, I don't use my AIFDR email anymore :-)

Regards

On Wed, Aug 5, 2015 at 6:03 AM, Tim Sutton t...@kartoza.com wrote:

 Hi


 On 03 Aug 2015, at 08:34, Paolo Cavallini cavall...@faunalia.it wrote:

 Hi all.
 I have an issue with the plugin web app:
 http://hub.qgis.org/issues/13175
 I believe Alessandro is unavailable currently: is anyone available for a
 look to it? This prevents me from approving several plugins, and I would
 not like to make authors and user waiting too long.


 @Akbar could you take a look?

 Regards

 Tim

 All the best, and thanks.
 --
 Paolo Cavallini - www.faunalia.eu
 QGIS  PostGIS courses: http://www.faunalia.eu/training.html
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer


 —




 Tim Sutton

 Visit http://kartoza.com to find out about open source:

 * Desktop GIS programming services
 * Geospatial web development
 * GIS Training
 * Consulting Services

 Skype: timlinux Irc: timlinux on #qgis at freenode.net
 Tim is a member of the QGIS Project Steering Committee

 Kartoza is a merger between Linfiniti and Afrispatial


 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*

*Akbar Gumbira*
*Software Engineer*
*Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Map for blinds

2015-07-14 Thread Akbar Gumbira
 online reverse geocoding services for this point but
 the problem is that online services are limited and only my small country
 needs 11 requests and if I wanted to process the whole of Europe, it
 would take a very long time. So I think that this task is better to do
 ofline at home.

  Thanks

  Stefan

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*

*Akbar Gumbira*
*Software Engineer*
*Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-06-29 Thread Akbar Gumbira
You can also use iface object provided by Python wrapper from qgis.utils.
So in get_qgis_app instead of having the mock QgisInterface, you can do
something like:

```
from qgis.utils import iface
IFACE = iface
```

I think in InaSAFE, we don't want unnecessary implementations from the
iface from qgis.utils. I am not aware of the first history of it though.

Regards

On Sat, Jun 27, 2015 at 5:44 AM, Tom Chadwin tom.chad...@nnpa.org.uk
wrote:

 I suspect I'm not going to get this to work. I hit the problem that my
 plugin
 's code used iface, which was not recognised. I managed to inject the dummy
 iface replacement created in the qgis_get_app () function mentioned above.
 However, next the code calls:

 ```python
 IFACE.legendInterface().groupLayerRelationship()

 ```

 While the dummy iface implements a method legendInterface(), it's just a
 stub. It doesn't even return the right object type, but returns a canvas
 object instead.

 I might be able to expand the dummy iface to add in the extra features
 required to get the right object type returned by that method, but isn't
 this all pointless?

 - the more dummy object I have to build, the less real object I am testing

 - the dummy won't have the session data associated with it, such as the
 project's layers

 An I misunderstanding something, or is my attempt to set up testing for
 qgis2web doomed?



 --
 View this message in context:
 http://osgeo-org.1560.x6.nabble.com/Using-TravisCI-integration-in-Github-for-QGIS-Python-plugin-tp5207646p5213199.html
 Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*

*Akbar Gumbira*
*Software Engineer*
*Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-06-29 Thread Akbar Gumbira
I just looked at the code base. If you are patient enough to get that
sorted out, I can look at that around the weekend and make a PR. One of the
problem is I see that you are playing around with get_qgis_app in the main
code (MainDialog). That function is only intended for testing purpose.

On Tue, Jun 30, 2015 at 12:02 AM, Akbar Gumbira akbargumb...@gmail.com
wrote:

 You can also use iface object provided by Python wrapper from qgis.utils.
 So in get_qgis_app instead of having the mock QgisInterface, you can do
 something like:

 ```
 from qgis.utils import iface
 IFACE = iface
 ```

 I think in InaSAFE, we don't want unnecessary implementations from the
 iface from qgis.utils. I am not aware of the first history of it though.

 Regards

 On Sat, Jun 27, 2015 at 5:44 AM, Tom Chadwin tom.chad...@nnpa.org.uk
 wrote:

 I suspect I'm not going to get this to work. I hit the problem that my
 plugin
 's code used iface, which was not recognised. I managed to inject the
 dummy
 iface replacement created in the qgis_get_app () function mentioned above.
 However, next the code calls:

 ```python
 IFACE.legendInterface().groupLayerRelationship()

 ```

 While the dummy iface implements a method legendInterface(), it's just a
 stub. It doesn't even return the right object type, but returns a canvas
 object instead.

 I might be able to expand the dummy iface to add in the extra features
 required to get the right object type returned by that method, but isn't
 this all pointless?

 - the more dummy object I have to build, the less real object I am testing

 - the dummy won't have the session data associated with it, such as the
 project's layers

 An I misunderstanding something, or is my attempt to set up testing for
 qgis2web doomed?



 --
 View this message in context:
 http://osgeo-org.1560.x6.nabble.com/Using-TravisCI-integration-in-Github-for-QGIS-Python-plugin-tp5207646p5213199.html
 Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




 --

 *---*

 *Akbar Gumbira*
 *Software Engineer*
 *Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence*




-- 

*---*

*Akbar Gumbira*
*Software Engineer*
*Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-06-24 Thread Akbar Gumbira
The message says it all. You must instantiate QApplication before
instantiating QPaintDevice object or any object from classes inherited from
QPaintDevice.

Regards

On Wed, Jun 24, 2015 at 4:06 PM, Tom Chadwin tom.chad...@nnpa.org.uk
wrote:

 I've got the build environment up now, I think - many thanks, all. However,
 does anyone know how I can get rid of the following test fail:

 QPixmap: Must construct a QApplication before a QPaintDevice

 I don't see QApplication instantiated anywhere. I'm not sure how to get
 past
 this, since the fail is early on, so I don't get to the important tests for
 the plugin.



 --
 View this message in context:
 http://osgeo-org.1560.x6.nabble.com/Using-TravisCI-integration-in-Github-for-QGIS-Python-plugin-tp5207646p5212624.html
 Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*

*Akbar Gumbira*
*Software Engineer*
*Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-06-24 Thread Akbar Gumbira
I don't know the code base you're working on. I think what you need to do
is to narrow down which test that produces that error. You can split the
tests like binary search or whatever method you like (running the tests for
each package etc). In InaSAFE, for testing purposes, there's a handy
function called get_qgis_app that will instantiate a QgsApp. It is used in
the tests which also to prevent that error. See here for the usage of that
function
https://github.com/AIFDR/inasafe/search?utf8=%E2%9C%93q=get_qgis_app

Regards

On Wed, Jun 24, 2015 at 5:01 PM, Tom Chadwin tom.chad...@nnpa.org.uk
wrote:

 So Google has told me repeatedly. My issues are:

 - I have not previously done this because the plugin works fine in QGIS,
 and
 this issue has only shown up in tests

 - I don't know how (or where) to instantiate QApplication (or
 QgsApplication?)



 --
 View this message in context:
 http://osgeo-org.1560.x6.nabble.com/Using-TravisCI-integration-in-Github-for-QGIS-Python-plugin-tp5207646p5212636.html
 Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*

*Akbar Gumbira*
*Software Engineer*
*Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-06-22 Thread Akbar Gumbira
By default in QGIS plugin builder you meant is here
https://github.com/g-sherman/Qgis-Plugin-Builder/blob/master/run-env-linux.sh#L6
?. If so, that is not the default if you install QGIS like this in Travis
https://github.com/AIFDR/inasafe/blob/develop/.travis.yml#L17. You can just
pass /usr as the argument when running run-env-linux.sh script

On Tue, Jun 23, 2015 at 1:19 AM, Tom Chadwin tom.chad...@nnpa.org.uk
wrote:

 I've got a bit further with this, but have an embarrassingly basic
 question.
 I'm using Tim's Plugin Builder's run-env-linux.sh, but the default QGIS
 path
 doesn't seem to match where Travis installs QGIS to - is Travis running
 Ubuntu? Can anyone tell me what QGIS path I should pass to
 run-env-linux.sh?



 --
 View this message in context:
 http://osgeo-org.1560.x6.nabble.com/Using-TravisCI-integration-in-Github-for-QGIS-Python-plugin-tp5207646p5212347.html
 Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*

*Akbar Gumbira*
*Software Engineer*
*Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-05-28 Thread Akbar Gumbira
In InaSAFE we actually use Jenkins with Github PR Builder plugin now for
our reference. We had some problems with Travis: There were some tests that
could take more than 10 mins and all the tests could take  50 mins and
would hit job timeout in travis for public repo. Also sometimes the job
failed to start.

But thanks for mentioning InaSAFE, I think now I can make Travis work again
as we reworked some tests to just use dummy data and it only takes around
24mins now that I see its Travis page.

Regards

On Wed, May 27, 2015 at 3:32 PM, Tom Chadwin tom.chad...@nnpa.org.uk
wrote:

 Thanks very much, Martin. Looks like I have a lot to learn (unittest/nose,
 as
 well as Travis itself).



 --
 View this message in context:
 http://osgeo-org.1560.x6.nabble.com/Using-TravisCI-integration-in-Github-for-QGIS-Python-plugin-tp5207646p5207727.html
 Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*

*Akbar Gumbira*
*Software Engineer*
*Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Creating a new QgsComposerHtml from Python causes segmentation fault

2015-01-19 Thread Akbar Gumbira
Hi,

When we call getComposerItemById, it will return QgsComposerItem, which can
be many things: QgsComposerLabel, QgsComposerLegend, QgsComposerFrame,
QgsComposerPicture, etc. In case of the item is html frame, it will return
QgsComposerFrame. Unlike other items that you can get the component
directly, to get the QgsComposerHTML itself you should do:

html_item = mycomp.getComposerItemById('myhtml')
composer_html = mycomp.getComposerHtmlByItem(html_item)

Regards

On Tue, Jan 20, 2015 at 7:11 AM, G. Allegri gioha...@gmail.com wrote:

 The QgsComposerHtml class behaves bad from Python.
 When a new QgsComposerHtml is instantiated I get a segmentation fault and
 QGIS crashes.
 Something wrong happens even when one tries to obtain an existing object
 from a composition:

 mycomp.getComposerItemById('myhtml') - QgsComposerFrame instance

 I don't understand how a QgsComposerFrame is returned given that
 QgsComposerHtml is not related to this class. It derives from
 QgsComposerMultiFrame, and in case it can contains frame objects...

 It happens both on 2.6 and master, both on Linux and Windows.

 I've opened an issue: http://hub.qgis.org/issues/12009

 giovanni

 --
 Giovanni Allegri
 http://about.me/giovanniallegri
 Twitter: https://twitter.com/_giohappy_
 blog: http://blog.spaziogis.it
 GEO+ geomatica in Italia http://bit.ly/GEOplus

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*

*Akbar Gumbira*
*Software Engineer*
*Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Composer Legend API

2014-11-12 Thread Akbar Gumbira
Hi All,

QGIS 2.6 has surely a lot of improvement on composer, but I find myself
stuck on a simple problem on composer legend manipulation. Instead of
showing from all the layers, I want to just show a specific layer. This is
a simple code that you can run in QGIS Python Console:

from qgis.core import QgsComposition, QgsLayerTreeGroup
 from PyQt4 import QtXml, QtCore

 canvas = iface.mapCanvas()
 renderer = canvas.mapRenderer()
 composition = QgsComposition(renderer)

 composer = iface.createNewComposer()
 composer.setComposition(composition)

 template_file = QtCore.QFile('/tmp/inasafe-portrait-a4.qpt')
 template_file.open(QtCore.QIODevice.ReadOnly | QtCore.QIODevice.Text)
 template_content = template_file.readAll()
 template_file.close()

 document = QtXml.QDomDocument()
 document.setContent(template_content)

 status_load = composition.loadFromTemplate(document)

 legend = composition.getComposerItemById('impact-legend')
 legend.setTitle('Hoho')

 group = QgsLayerTreeGroup()
 group.addLayer(iface.activeLayer())

 # 1 Somehow crashes QGIS in inasafe, but not in qgis console
 #legend.modelV2().setRootGroup(group)
 #legend.synchronizeWithModel()

 # 2 No effect on legend, sigh
 #legend.model().setLayerSetAndGroups(group)
 #legend.synchronizeWithModel()

 # 3 No effect on legend, sigh. Using QgsLegendModel basically obsolete in
 2.6, not deprecated
 #legend.model().setLayerSet(iface.activeLayer().id())
 #legend.synchronizeWithModel()

 # 4 Unfortunately setCustomLayerTree is private method
 #legend.setCustomLayerTree(group)
 #legend.synchronizeWithModel()
 #

 # 5 legendmodel linked directly to layer registry in map canvas, so this
 will delete layer in canvas
 #legend.updateLegend()
 #model = legend.modelV2()
 #for r in range(0, model.rowCount()):
 #for c in range(0, model.columnCount()):
 #if model.index(r, c).data() != iface.activeLayer().name():
 #model.removeRows(r, 1)
 #legend.synchronizeWithModel()

 composition.exportAsPDF('/tmp/result.pdf')


I have tried several possibilities to do that by going through the c++ code
itself. The 1st possibility above is working fine actually in python
console, but somehow it crashes QGIS implementing it in the plugin. The 2nd
and 3rd are giving no effect (It says the QgsLegendModel deprecated, but if
it's not working, shouldn't it say obsolete?). The method
setCustomlayerTree in the 4th unfortunately not available in the SIP. The
5th will delete layer in map canvas.

From those 5 possibilities, is there any other way to do this simple task?

Regards
-- 

*---*

*Akbar Gumbira*
*Software Engineer*
*Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer