Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

QGIS is running on my Windows PC.

I have a CSV file on my PC that is remotely updated with values of a raspberry pi's GPS position and some wifi-status readings.

Is it possible to create a vector layer to map out the raspberry pi's position automatically along with the wifi-status readings?

Desperately need to get this working...

share|improve this question
    
What have you tried? You can use Python to construct a vector point layer from the CSV, with a loop to check for updates after a period of time elapses, then refresh the display. So to answer your question, yes. – Richard Law Jan 10 at 7:48
    
Did you want to see the vector as a point or line? – SaultDon Jan 10 at 7:48

The easiest way to see these updates as changes are made to the csv is to use the "Add Delimited Text Layer" button and choose "watch file" as one of the options.

I noticed with the spatial index feature enabled, it doesn't update the layer extent (so the zoom to layer button doesn't do what it's supposed to) or the index as new features are added, so maybe try it without a spatial index. But regardless, every time the canvas is refreshed (from a pan or zoom for example) the new features are displayed immediately.

watch a csv for changes in qgis

You'll find QGIS to be flexible with it's styling and I'd be curious if you could get, or it'd be helpful if the most recent point or feature was styled with an animation like how Nathan Woodrow describes in his blog: http://nathanw.net/2014/10/29/animated-qgis-map-canvas-item/ or even colour coded based on the wifi-status as described by underdark in the answer: http://gis.stackexchange.com/a/42402/1297

share|improve this answer
    
How can I refresh the map automatically? (I am new to GIS software in general) Do I have to use the Python Console to do so? – JolyDroneSP Jan 16 at 9:14
    
@JolyDroneSP It's possible. I did a search here for "qgis refresh canvas python" and got some helpful hits: gis.stackexchange.com/q/18197/1297 gis.stackexchange.com/q/111039/1297 gis.stackexchange.com/q/12319/1297 – SaultDon Jan 16 at 20:31

You can use org2ogr to convert CSV file to GIS format, e.g. Shape file. Shape files are not the best solution if you would like to write and read the same file, they will block each other. You had better to use PostGIS database.

AFAIK the best solution would be:

  1. from your Raspberry send the actual coordinates to a web server where a PHP/Python/whatever script will process it
  2. the PHP/Python/whatever script uploads the coordinates and attributes to the PostGIS database
  3. Meanwhile clients can connect/read the database and display positions, e.g. in QGIS
  4. You can build a WMS/WFS service on the PostGIS database, so any standard WMS/WFS client can be used on the client side (e.g. OpenLayers, QGIS, etc.). This solution is more secure then the direct database connection from GIS clients, database port is not opened to the world.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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