Thread: [SailfishOS] Pure Maps
View Single Post
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#67
I guess we should be relaxed regarding mixing the subjects of Pure Maps and OSM Scout Server. I hope all read the relevant threads, including the ones related to the map clients they don't use.

Slow searches using OSM Scout Server.

Its, indeed, a problem. I assume that you are using default profile (Mapbox GL, GeocoderNLP, Valhalla). In particular, search is done via GeocoderNLP. When you use libosmscout as a geocoder, I would expect many missed results.

GeocoderNLP has rather complicated library behind it to parse the address - get from your free text input the hierarchy with house nr, street name, city is rather non-trivial task. Originally with 2GB+ RAM requirement, I managed to get it down to the mobile by splitting the planet into countries. After parsing, it has to search in hierarchies for the object. This part I wrote for the geocoder specifically and there could be bugs due to limited testing. When RAM is not squeezed, you would expect much faster response times. On my phone, geocoder usually takes about less than a second per country / region (Estonia, Sweden, Denmark, Finland). When the same country is split into the regions, geocoder should parse the string only once and then proceed with the same parsed result to search in the splitted by region databases. This is in great contrast to what you observe.

The last big contribution by Osmo was working on autocompletion. This allows you to start typing the request and see autocompleted results. I have added OSM Scout Server support for autocompletion on WhoGo side, but the server itself doesn't have any fancy algorithms made for such scenario specifically. It just runs the full search on every new input. So, maybe it has queued some searches before you get to the last of it. To test the speed of one search:

1. open OSM Scout Server in GUI and set its log level to log info messages (Settings/, towards the end). You could later examine the logs and see what takes time

2. start typing in Pure Maps a string using online geocoder. When the string is ready, select OSM Scout Server and hit Enter. Time how long did it take.

As for optimization, for larger countries, you could try to download smaller parts of the country. Then, in GeocoderNLP settings (Settings/GeocoderNLP), disable "Search all available maps". This will add country/region selector at OSM Scout Server main screen that you will have to set. Just remember to change it if you want to search in another region. For most of us its not needed, but, maybe it will help you.


OBDfish and the tunnel problem

I am sorry, but while it sounds cool, I think there are many other things that have to be done before that. We cannot save POIs properly, for starters. Find hospitals in Norway. Search using postal codes. Update / tune map styles, search by more generic types. I would prefer to look on those and many other issues before getting into the tunnel issue.

Its a cool sounding feature, I admit that. Just too far for me right now.


Distance to speed limit

Good idea and very relevant. Its possible (thnx to map matching) to get it in advance as well. Corresponding issue is at https://github.com/rinigus/pure-maps/issues/30 , would have to also think how to implement it and show on the screen. [we can make a sign, as on the street, with meters below it]. Also, there is an option to just use voice for it.


Multiple routes

Valhalla doesn't support it yet, I think. For me, the main issue with the multiple routes is how do I recalculate one on rerouting? That's why, I prefer to expose router options and allow you, through changing them, to tune it for what you want.


Geocoder, again, and missing streets

Check that you do use GeocoderNLP. If you cannot find some street and its there on OSM, file a bug (https://github.com/rinigus/geocoder-nlp/issues). When searching for a type (hospital), use Nearby search and specify the type and the distance from your point of reference. For OSM Scout Server, types can be entered in multiple languages, please choose one of the autosuggested types (start typing and select a type from the list, don't deviate from it).

hopefully, haven't missed anything

feel free to move relevant discussion bits between the threads (pure maps and osm scout server)
 

The Following 11 Users Say Thank You to rinigus For This Useful Post: