1

I'm a new developer of QGIS using C++. I am working on a project which needs to display dynamic maps/layers(just like GPS, but it is not GPS, however it should display data alike GPS data - dynamic display of changing data).

I know that ArcGIS has the technique called dynamic display (or something like that), which supports the capacity to do such things.

Does QGIS have similar ability?

I'm using QGIS 2.4.0. I want to develop a desktop application using QGIS API, it is a Qt Widget, it should have these features: add layers\symbols, zoom in\out, pan. Suppose I already have this application, first I add a map as background layer, then I add a symbol as the target which is changing position by data, data is changing by time, and there should be a track to target. For example, a car drives from A to B, it should be displayed on the map, car's position is changing by time, therefore it displays real-time different on map, and there should also be a track to the car on the map.

I think this application scenarios is quite common in GIS, so I think it should be a common function to do it.

The result is the display should be smooth, no splashing screen,no view shaking.I developed a simple demo that has these features: add layer, zoom in/out, pan. When I added a vector layer (.shp) and I zoom in or zoom out, the refresh is not smooth or continuous. In particular, when the map is beyond the Map View(canvas's extent),panning map cause serious screen splashing, but when the map is within the Map View, it is OK to pan map.

Are there any places I did not do right?

5
  • 1
    Could you please be more specific about what you mean by "dynamic display of changing data". Does the data simply change in its source, or you are talking about data with date\time values that you wish to visualize using the time scale. Commented Aug 13, 2014 at 10:53
  • Also it would be nice to know if your problem is a) the smootheness of zoom/pan operations b) refreshing the layer or c) triggering zoom/pan actions based on changes in data Commented Aug 13, 2014 at 12:30
  • @Alexandre Neto Yes, i mean data with date\time values.
    – spartucus
    Commented Aug 13, 2014 at 14:04
  • @Matthias Kuhn Sorry about the description.
    – spartucus
    Commented Aug 13, 2014 at 14:06
  • @Spartucus Just use the edit button below the question to update the question so it addresses the comments. Commented Aug 13, 2014 at 14:25

2 Answers 2

1

Yes you can show features that evolve during a time period. I would suggest you to have a look into Anita Graser's Time Manager plugin to see if it does what you need:

https://plugins.qgis.org/plugins/timemanager/

you can also check this video:

https://www.youtube.com/watch?v=GkfoFFy-bao

Then, since it's Open Source we are talking about, check it's code (it's python) and adapt it to your needs (as far as I know the api is very similar), and feel free to share the result and code with others.

0

I don't know about the API, but when you add a delimited text layer you can set 'watch layer' in the layer settings. File changes are only visualised when the QGIS view is refreshed in some way (pan, zoom, etc).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.