[Qgis-developer] Writing a data provider in Python

Martin Dobias wonder.sk at gmail.com
Sun Mar 18 18:53:45 EDT 2007


On 3/15/07, Barry Rowlingson <b.rowlingson at lancaster.ac.uk> wrote:
> I'm working with the 0.9 version and I've been writing python plugins
> happily. One thing I wanted to do was to be able to read excel
> spreadsheets into QGis.
>
> I looked at the delimited text C++ plugin and so I understand the
> fundamentals of a vector data provider, but I can't see how to add a new
> one to the registry. It seems that the registry populates itself at
> startup time, and there's no 'add provider' method of QgsProviderRegistry.
>
> So am I right in thinking that data providers have to be in C++ at the
> moment?

You're right, currently only C++ providers are supported. Adding the
possibility to implement providers in Python shouldn't be very hard,
but I haven't considered it important to implement so far. Basically
it's the same principle as with Python plugins. If you need such
feature, fill in an enhancenment ticket and assign it to me (wonder).

However, generally we should think a bit about our providers/plugins
mechanisms unification as it seems like we're on the way to get more
types of addons - e.g. vector overlay plugins - as in diagram branch
that Marco works on.

Regards,
Martin



More information about the Qgis-developer mailing list