0

I am new with QGIS.

I want to study the performance of different GPS receivers, and to do so I need to compute the error made by each one. The problem is that I don't have any reference to be compared with the coordinates provided by the receivers (which are installed on a car in movement), so I want to generate it myself using a GIS software.

The idea is to stick my GPS waypoints to the closest road (just as Google Maps app) to create a new route that would remain always within the road. And then I would like to (somehow) import this new data to matlab (for example, in CSV format) in order to compute the positioning error.

Is it possible or I should try something else?

I have seen that there are many functions available using PostGIS, and I have tried with ST_ClosestPoint (http://postgis.net/docs/ST_ClosestPoint.html) without any luck.

What is the correct way of using this function if I want to use the polylines of my city and the position fixes of my receiver as inputs ?

1

Let's say you have two tables: gps and roads.

In order to get the closest on-road point to the gps point and the distance with the original you have to:

SELECT 
    gps.id as pointid, 
    St_ClosestPoint(roads.geom, gps.geom) as closest,
    St_Distance(gps.geom, St_ClosestPoint(roads.geom, gps.geom))
FROM gps, roads;

However, I would be very careful/skeptical in relying on gmaps accuracy to test the accuracy of a gps receiver.

  • Thank you for your fast response vagvaf One more thing, is it normal to open the table of my GPS waypoints and see that it is full of NULL values? The points are well represented in the map, but I was wondering if it is correct to import a KML file as I have done. I am not familiarised with the format files used by QGIS, should I do some kind of conversion? (to shp for example) Thanks again! – mpm247 Jul 5 '16 at 10:13
  • I can't answer this since i don't know the output format of your gps or the attributes that are null. I prefer working with shapefiles in QGIS. You can save your kml as a shapefile (mind the CRS system). Shapefiles are easier to import in postgis with shp2psql. If you think that your original questions has been answered, please mark the question as answered. – vagvaf Jul 5 '16 at 10:23
  • My gps generates raw files than I then I convert to RINEX and KML, but that's what I do in other projects where I don't use QGIS (it is the first time that I am using it). Maybe I should convert it to shp as you do, but then I would be able to get a table with the coordinates of the new path (the one with all the waypoints replaced in the road) ?? I ask this because I want to compute the error using MATAB, and I don't know if there is a way to import the data there. – mpm247 Jul 5 '16 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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