Opened 17 years ago

Closed 16 years ago

Last modified 15 years ago

#575 closed enhancement (fixed)

API Feature Request: Concrete subclass of QgsVectorDataProvider with generic data storage inside

Reported by: reed@… Owned by: nobody
Priority: minor: annoyance Milestone:
Component: Data Provider Version: 0.8
Keywords: Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

Implementing a new QgsDataProvider class can be difficult.

So I would like to suggest adding a new class to the QGIS library: a subclass of QgsVectorDataProvider (maybe also a companion for Raster?) that implements all pure virtual functions and can be instantiated by the plugin as is. Inside it would have a simple, generic, data store for the vector data to provide to QGIS. A plugin could then, whenever it needs to, add and remove stuff from that internal data store, and not have to worry about how to store or provide it to QGIS.

This would be a big help in developing plugins that provide a small but changing set of data.

Example: Say I have some sensors that I want to represent in QGIS. My plugin gets updates from the sensors (over a network or something) and moves or changes visible features representing the sensed data, and QGIS becomes a near-real-time display for that data, and I can have that dynamic data visible while working with other map layers, or save a snapshot of for later work. This would be a really cool use of QGIS, in my opinion.

Does this make sense?

An ideal way to do it would be for it to actually be a template class and have the ability to use any STL container object to store the data, if this is possible. It would probably also need hooks called while QGIS accesses the data that the user could use to lock/unlock mutexes etc.

Change History (3)

comment:1 by anonymous, 17 years ago

Awaiting user input: unset
Milestone: Version 0.9

comment:2 by jef, 16 years ago

Resolution: fixed
Status: newclosed

there's the memoryrprovider now, that covers some if not all aspects of this proposal. Feel free to reopen, if you feel it isn't.

comment:3 by (none), 15 years ago

Milestone: Version 1.0.0

Milestone Version 1.0.0 deleted

Note: See TracTickets for help on using tickets.