[josm-dev] Display issues with downloaded raw GPS data

Frank Cremer frank at polarphysics.net
Tue Nov 13 13:50:26 GMT 2007


Martijn van Oosterhout wrote:
> FWIW, potlatch does something like this. It has more access to the GPS
> points than the normal API code. It would be nice if we could
> implement the same hack for the nornal API as potlatch does.
>   
I checked the potlatch code (see the rubygetgps.cgi snippet below) and 
found that a similar approach is used. Instead of using the distance to 
judge whether a new track starts, it uses the difference in time (180 
seconds). So this most likely means that the server is not providing 
this information.

I'll take a look at the JOSM code to see if I can change it myself. If 
so, I'll submit a patch otherwise I'll submit a request for change. I've 
noticed that having multiple GPS tracks really helps in mapping and if 
it's possible to download them easily that will certainly help.

Regards,


Frank


rubygetgps.cgi
-------

	# ----------------------------------------------------------------
	# getgps.cgi
	# GPX responder for Potlatch Openstreetmap editor
	# Ruby/Ming version
	# === now superseded by pure Ruby version ===
	#	
	# editions Systeme D / Richard Fairhurst 2006
	# public domain
	# ----------------------------------------------------------------

<SNIP>

	dbr=dbh.query(sql)
	while row=dbr.fetch_row do
		xs=long2coord(row[1].to_f*0.0000001)
		ys=lat2coord(row[0].to_f*0.0000001)
		if (row[3].to_i-lasttime>180 or row[2].to_i!=lastfile)
			s.move_pen_to(xs,ys)
		else
			s.draw_line_to(xs,ys)
		end
		lasttime=row[3].to_i
		lastfile=row[2].to_i
	end

<SNIP>









More information about the josm-dev mailing list