Possible feature: Snap to road

I have an idea that might clean things up…

Roads that have been tracked often start to look like a bowl of spaghetti, like this:

The idea was to make a function where one would select the means of transportation (car, bicycle, walking) upload the GPX file get a cleaned up versions of that track (via brouter in my test setup) and then ‘snap’ the GPX track points to the cleaned up track (perpendicular>closest, hadn’t gotten to that part yet :wink:

I did some initial work for a “snap to road” function: https://www.geoarchief.nl/test/brouter.html
(“upload” a GPX and see what happens, nothing goes to my server, all is done within HTML/JS)

That way tracks could be cleaned up and better matched.

Also I thought about a “timewarp” button where one could select newer/older/newest/oldest tracks. With a setting “always use latest track” and maybe a “use 360 when possible”

AD: In OSM/NL someone suggested an option to be easely able to delete an old track that was updated by the same user (or maybe move it to “old” => out of view?)

1 Like

Ad: this (and these) are POC’s I developed some 5 years ago when I thought Mapillary was ‘the way to go’. They had (and have, to my knowledge) the same problem concerning ‘the spaghetti’.
I put my ideas ‘on ice’ when they sold themselves to Meta… it’s time to ‘thaw them’, since I think they could benefit Panoramax (assuming it is appreciated here?)

I believe it to be possible to ‘snap to OSM road’ to be technically feasible, but that’ll need some serious math. I also remembered an other approach (those ‘gray cells’ need some time, sometimes :wink: )

The downside of ‘snapping to OSM’ is that it has a bit of ‘self fulfilling prophecy’ in it. The first question remains a good one (in my opinion) is the track pedestrian, bicycle or motorised (and maybe add aerial, I still need to work on that track I made hanging a 360 camera below a hot air balloon trip…)

And with a track one knows the direction it goes. In this manner there would ideally arise a maximum of 6 tracks on a Panoramax path where there would be a road for cars, bicycles and pedestrians (going one and the other way, do not forget about the English, who tend to ‘swap sides’ :wink: )

**What if… **
What if we averaged those tracks? Still there would be a need of some nifty math work, that will be unavoidable. And there will be a need to first find the right variables to declare a track is covering the same route, but that can be done… (Mapillary implemented techniques clipping tracks into multiple ones, primarily clipping them on crossings and such, does Panoramax employ something similar?)
Once two tracks are ‘declared same’, you can ‘average them’. One good GPS track usually has an accuracy of some 2-10 meters, bad tracks can jump to 50 meters. Those will be hard to match. But when we would be able to match identical tracks the average accuracy would increase immensely! In time it might even be usable to correct roads in OSM!

I think it would be best if a track would have two extra variables, and id for the ‘average path id’ and one containing the average path (for each one!) roads can change, sometimes a bit over time. I’dd take the track and average them with tracks that were taken a maximum of 2 years before and after. That way changes in the road will also catch on automatically. Maybe a lonk with OSM is possible in some manner, using the ‘path id’ from OSM? And maybe even adding dates for ‘big road changes’ to use for the best average calulations?

Could an ‘AI’ model be trained for this?

This might seem a lot of work for some ‘optical cleanup effects’, but implementing this would greatly enhance the UX … and would I think have a lot of other benefits

POC: Proof Of Concept

Snap to road is something we’re thinking about, but no clear choice has emerged yet.

Should it be only some cleaning done to display on the map ?
Should it be by changing the location metadata in the picture ?
On which road should is be snapped ? Think about road intersections… and also OSM roads or others like IGN (opendata) ?
What about high precision GPS coordinates (RTK) ?
etc.

There is 2 features in the viewer for that:

  • you can colorize tracks based on their age
  • you can filter track using a date range (you can also filter by photo type, contributor)

Should it be only some cleaning done to display on the map ?

I see it as ‘data enrichment’, an image has the EXIF-GPS data and a corrected/generated/calculated lat/lon

Should it be by changing the location metadata in the picture ?

Maintaining the original data is paramount (As I’ve seen you say on youtube ) So in my opinion is ‘extra info’ in the category of there is a 30km streetsign etc.

On which road should is be snapped ? Think about road intersections… and also OSM roads or others like IGN (opendata) ?

Step one: That first question! (pedestrian, bicycle, motorised, earial)
Step two: use the basic GPS info and snap to the bicycle path / road within X meters (preferably 5 to max 10 meters) (I’m leaning to OSM data as the primary source)

But maybe my second post using averages primarily and not use OSM has more benefits then downsides? (and is probably easier to implement)

What about high precision GPS coordinates (RTK) ?

Those would have a higher value upon the average calculation. Within my GeoArchive structure I do a lot of calculations with dates (genealogy). When I have a ‘full’ date (D-M-Y) it has a higher impact on the derived date calculation then when I only know the month and year, or only the year, or only an year that is already an estimate from an other calculation… Something similar can be done here. Something like RTK a score of 10, GNSS 4, Golonass+GPS 2, standard GPS (older stuff) 1

you can filter track using a date range (you can also filter by photo type, contributor)

When I would select “the last year” and one road has been tracked 5 years ago, I would get nothing. There is a Dutch saying: better something then nothing :wink: So I think an option for “most recent track” certainly has benefits…

Knowing the coordinates accuracy is impossible on 99% of the Panoramax images. I started tinkering with scripts to add this information only a few months ago : Stocker la précision de la géoloc dans les photos - #19 par StephaneP