Address Lookup - maybe us nominatim?

Issue #145 closed
wrosner created an issue

Even for offroad junkies, sometimes the corners of a trip may loosely touch civilisation ;-) Then, looking up some addresses and adding it as waypoint would come really handy.

As a first crutch, I tried to start my tour planning with marble. This has several pluggable routers, like OSRM, but by far not the GREAT :-) capabilities of fine planning and device integration as QMS.

I could manage a somwhat tedious transfer of such an address based "cornersteone route":

gpsbabel -i kml -f marble-export.kml -x transform,rte=wpt -x nuketypes,tracks   -o gpx -F qms-import.gpx

As it looks, there is some glitch in gpsbabel (or maybe in marble kml file export) which screws track coordinates, hence the filtering option to remove tracks. Anyway, I'd just keep the reference here for anybody requiring a workaround as long as there is no address lookup feature in QMS.

Of course, there is the google search facility in QMS, but in most cases it does not return workable coordinates.

Starting here http://wiki.openstreetmap.org/wiki/Search_engines I found http://nominatim.openstreetmap.org which provides the functionality I am looking for.

However, cut'n-pasting the coordinates to QMS is still somewhat tedious:

  • Enter location address in http://nominatim.openstreetmap.org/search.php
  • correct/refine your search, select from multiple ambiguous hits etc
  • copy the map center coordinates into your clipboard
  • switch to QMS and open "Wegpunkt hinzufügen" (aka 'add waypoint' ?)
  • paste coordinates into QMS 'new waypoint' window
  • replace the comma by a space to match QMS coordinate format
  • ( haven't tried yet in other than N-E quarter of the planet)
  • type name or (preferrably?) copy/paste address as waypoint name
  • chose project where to save the new waypoint

For a list of repeated points all these steps have to be cycled again. I see different approaches to solve the issue:

Own GUI

We could try to find some API or access nominatim (or similiar service's) web interface by http calls. While this might closely reproduce the look'n-feel of route-planning-only tools, I see that this may be a lot of work.

Integration of nominatim search

This might work something similiar to the google search functionality. However, I don't know how difficult it is to integrate either some own browser functionality or to maintain OS browser access, which is required to refine your search and choose from multiple results. Maybe that this will end up in a programming / maintinaining nightmare as well....

Ease the cut'n-paste approach

This would be the easiest way to implement, I think. A fist improvement whould be to accept the coordinate format of nominatim e.g.

51.13179,9.43574

in the 'new waypoint' window.

A next step would be some kind of tabular input of several waypoints, including their name and their coordinates, in one window, and save them all together in one single project-chooser workflow. - so far, so simple.

Next, we may want to keep the context of multiple points and collect them in a single geospatial entity. Here we extend the question of track vs route to waypoint vs route. So, having a tabular input of multiple whatever-points, we might want to save them not as single waypoints, but alternatively as route. For this purpose, a functionality of rearranging the sequence of the points would come handy (move-up / move-down, as known from other route planners). Maybe, there could be even a functionality of tabular address based manipulation of existing routes in the 'modfy route' functionality.

However, this last steps I'd already consider as a luxury add on. Typically, the number of addresses for tour planning will be low (well, if you aren't in parcel delivery, of course...). So, creating a route by clicking them on the map seems OK for me.

gpsbabel text based workaround

I think a preliminary crutch migt be the ability to paste the point names and coordinates into some text file and covert it by gpsbabel or some script hack into a gpx for import into QMS. I'll promise to try this and share the result.

Additional wishes: reverse search

This address http://nominatim.openstreetmap.org/reverse.php?format=html provides the functionality of looking up adresses, given a pair of coordinates.

This would be really nice to automatically create names for waypoints, routepoints, trackpoints, and maybe even arbitrary mouse clicks. Cut'n paste is tedious again because of the different coordinate formats. So, some direct call into the nominatim http or CGI or whatever were preferred.

It would be great to add this reverse address search right under the context menu of right mouse button click in the map (aka 'lookup address').

Comments (9)

  1. Christian Eichler

    Towards your suggestion Ease the cut'n-paste approach: QMS is able to parse 51.13179 9.43574 (without the ,) as coordinate for a waypoint

  2. wrosner reporter

    @ Christian Eichler

    Of course I wouldn't have filed any enhancement proposal if it were only for replacing a <comma> by a <space>. However, when you do it repeatedly, it still is nasty and bears the risk of screwing coordinates. So if somebody is working in the coordinate parser, it would still be fine to allow a <comma> instead of a <space>, too.


    @ kiozen:

    I have to admit you are right. I'm afraid, the Google search was the first thing I tried in QMS before I understood the whole concept. So I produced a lot of errors and did not know what to do with the funny flower marked results I recognize as waypoints now.

    I gave it a try again and I am really impressed how nice it works both for looking up addresses as well as for looking up coordinates. I can easily copy the results as waypoints into some new project and collect them for further routing.


    So, the only wish left on my list is a way to keep ordered lists of points as route templates I can easily play around with.

    Today, I discovered the "snippet" feature of bitbucket and dropped some script and style stuff implementing the "gpsbabel text based workaround" concept there: https://bitbucket.org/snippets/wrosner/n4oK5

    With this solution, I consider the issue as "works for me".

    If other people don't like the idea to play with text files and manipulate them with console commands, they may themselves ask for a nice GUI implementation ;-)

  3. kiozen

    Select multiple waypoints in a project in the left hand list and select "Create Route" from the context menü.

    Alternatively you can select multiple waypoints on the canvas via the selection tool. This is not project bound.

  4. wrosner reporter

    Ah, great, this looks like a full fledget route planning capability - All together - precisely what I was looking for :-)))

    Could it be that I missed something in the manual? Or that the manual writing does not cope with the productivity of the programmers? Are there more of this kind of hidden gems in QMS? How to find them? RTFS?

    I'd consider to compile some kind of use case documentation "plannig a motorcycle tour". Is there a place for such experience reports within the QMS web project space? The wiki to me looks more like an official manual, so I don't dare to clobber it.

  5. kiozen

    From the first page of the manual: "Note: As the software is subject to a constant development progress, this manual will always reflect just a snapshot of the current state. Screenshots seen in this manual might not reflect the current appearance of the program. The manual will be updated if there are large changes to the GUI. However smaller changes will be ignored. "

    So, yes, the manual is constantly lagging behind. ;) Everyone is welcome to enhance it. But so far users choose to ignore that part of open source. And I don't like writing manuals either.

    If you want to add use case documentation you can open a new major subject in the Wiki. Between "User" and "Developer & Translators". Like "Working with QMapShack". Below that you can link to one or more pages showing use cases.

  6. wrosner reporter

    Hello, kiozen,

    can I still add comments on a closed issue? If so, Yes, please close it.

    I promised to assemble a wiki page on "route planning" (did I - anyway...). I think a link to this page might be a good final word on the issue.

    Wolfgang Rosner

    Am Mon, 20 Jun 2016 08:37:27 -0000

  7. Log in to comment