Map the Paths Uploader Feature Requests: Snap to Paths

The GPS modify functions in the desktop uploader are great.

Can you consider “snap to path” functionality too? That is, modify image position to nearest path?

Here is an implementation of the functionality:

In cases of many paths in an area, the app could use transport type to determine what path is correct. e.g. if the transport type is walking, then the map snaps to nearest sidewalk, not road.

This would be super useful for OSM editing workflow with the Mapillary layer. Right now, sometimes images are far off the paths in many cases due to GPS inaccuracies.

I like this idea and have thought about this before. I know @nickw does this on OpenTrailView using OSM data.

My thoughts…

Snap to road will make the map look prettier, but you don’t know if it will be more correct.

With the precision of most GPSes it will probably be more correct most of the time, but you run the risk of making it worse.

How can the algorithm know if you are driving in the centre lane or walking across a road (even with transport type specified)? It will have to make guesses and when you guess you are some times wrong.

So what is right? There is no wrong or right here. In some applications a pretty map might be preferable, but in others one that reflects the raw data will be better.

Secondly, a lot of online services attempt their own positioning post-upload. Mapillary use OpenSFM to position images. For example, each image actually has originalLatLon and computedLatLon, the latter being used for the public map.

Perhaps the answer is a similar approach on the Map the Paths; one with map matching, one without?

1 Like

Just coming in here, as @dgreenwood-trekview has said I have implemented this myself, so sharing a bit of info as to how I did it. As Dave says it has its pros and cons, but it’s particularly useful if you want to create arbitrary navigable networks of panoramas which are connected together without user intervention, using underlying data such as OSM data.

My approach is to store OSM data in a standard OSM postgis database created using osm2pgsql. This might be worth a look. It uses PostGIS functions extensively to make the ‘snap point’ calculation easier.

(see findNearestHighway() and getNearestHighway() functions).

Essentially I do this in two stages:

  • Firstly make an API call to the ‘nearest highway’ endpoint (which uses the code I’ve described above) to find the ‘snap point’ on the highway;
  • and then upload the panorama together with the ‘snapped’ point, which will override the EXIF GPS coordinates in the pano if provided.

We’ve since implemented a feature in the Map the Paths Uploader that allows you to modify GPS positions manually. Whilst it’s not an automated snap to paths function as requested, the same result can be achieved (and avoids the inaccuracies that snap to path can result in).

You can download the latest version of the Map the Paths Uploader here:

HQ | Blog | View / Upload Photos | Become a Trekker | Facebook | Instagram