[Qgis-developer] RealTime Data and QGis

Martin Dobias wonder.sk at gmail.com
Mon Apr 13 07:19:53 EDT 2009


On Sat, Apr 11, 2009 at 7:16 AM, Abhay <abhay.menon at gmail.com> wrote:
> But the very basic functionality of QGis is not coming up as desire. Like I
> wanted to read the attributes of the realtime data which I had pushed with
> as per the data structure in QGis. I only receive attribute of X and Y back
> from point being plotted. Have anybody device some logic to retrieve the
> same.
> A query that come to my mind, is it possible to replace the my input
> shapefile in realtime at the background and the data and attribute updated
> get reflected to the Mapper without enabling the editing options or
> reloading the shapefile.

Hi,

to achieve what you need, you'll just have to create map canvas items
and put them on the canvas. Map canvas items are more flexible than
usual rendering because they can be updated any time quickly, without
affecting other parts of canvas.

You can create your own class(es) derived from QgsMapCanvasItem or you
can use one of the few that exist already in QGIS. There is
QgsVertexMarker class that's well suited for points and there is
QgsRubberBand for drawing polylines or polygons (check it in action
when measuring in qgis).

Bye
Martin


More information about the Qgis-developer mailing list