Opened 3 years ago

Last modified 3 years ago

#1225 new enhancement/feature request

Choosing a destination using zipcode+housenumber

Reported by: mineque Owned by: bafplus
Priority: major Milestone:
Component: gui/internal Version: git master
Severity: normal Keywords:
Cc:

Description

ticket from bafplus:

In the windows version of Navit with internal GUI it would be nice to choose a destination using zipcode+housenumber. I cant check but i've been told that function already is pressent in the gdk gui.

using: windows 7, latest build from c_name

Attachments (3)

postcodesearch.diff (1.3 KB) - added by jandegr 3 years ago.
search town by postcode
gui_internal_poi_zip_filter.diff (5.2 KB) - added by tryagain 3 years ago.
Add address search with ZIP in internal gui POI filter.
zipcode_48_48.png (1.9 KB) - added by bafplus 3 years ago.
zipcode-search icon

Download all attachments as: .zip

Change History (14)

comment:1 Changed 3 years ago by sleske

Could you explain how this would work?

Typically a given zipcode will contain dozens or even hundreds of streets, and many house numbers will exist for almost every street. So a search by zipcode+housenumber will typically find dozens to hundreds of matches. How is this useful?

As to the GTK GUI (I assume that's what you meant, as there is no "gdk gui"): The address search dialog does have an input field for the ZIP code - but it does not work (apparently never has). We should probably remove it...

comment:2 Changed 3 years ago by bart cockheyt

Yes, it should be gtk-gui...

I think that depends on which country you use. In the Netherlands zipcodes are unique to a street, so here it can work (garmin and tomtom also privide search by zipcode+housenumber)

comment:3 follow-up: Changed 3 years ago by bart cockheyt

If already available in GTK, can it be activated in gui-internal too?

comment:4 in reply to: ↑ 3 Changed 3 years ago by sleske

Replying to bart cockheyt:

If already available in GTK, can it be activated in gui-internal too?

As I wrote above, it does not work in the GTK GUI either. There's an input field, but as far as I can see there is no search code connected to it.

comment:5 Changed 3 years ago by bafplus

Can someone make this work? (if only for testing purposes?)

comment:6 Changed 3 years ago by bafplus

I did some searching and founded out that the zipcodes for the Netherlands and Belgium are present in OSM maps and even show up when searching for town+street+housenumber. So Navit is capable of finding the correct zipcode given the above criteria. From my point of view it should then also be possible to perform a search using zipcode+housenumber. This will work in both countries because the zipcodes are unique to the streets. If only the search is to be implemented that is. But the needed data is already present.

comment:7 follow-up: Changed 3 years ago by jandegr

Hi, I propose a very small diff that partially fulfills the request. If you start with typing a number in the field for town search, the search for a town will be done by postcode. After you select a town you can proceed as usual. The gui does not know about this so the results are still ordered by town name.

regards, Jan

Changed 3 years ago by jandegr

search town by postcode

comment:8 Changed 3 years ago by bafplus

I agree that that diff should allow to search for zipcode in the town search. As this is a good start, however, after filling in the zipcode it should search for that zipcode on a streetlevel bypassing the town since a postcode is "connected" to a street rather then to a town. That way when entered zipcode + housenumber Navit should be capable of producing a town+street+housenumber.

comment:9 in reply to: ↑ 7 Changed 3 years ago by tryagain

Replying to http://wiki.navit-project.org/index.php/user:jandegr:

I propose a very small diff that partially fulfills the request. If you start with typing a number in the field for town search, the search for a town will be done by postcode. After you select a town you can proceed as usual. The gui does not know about this so the results are still ordered by town name.

With your patch, In NL, when I enter Zaa, i see 9584 Zaadstukken. But nothing is shown when I enter 9584. That's because we use an indexed search, and only part of whole country index is available in binmap_search_get_item Your filter will accept only towns which fall into the first index segment, when ordered by name. Proper way would be implementing town_postal attribute search. But that would require some change in gui. And then you will have to inefficiently scan all towns in current alphabet-ordered index, or implement your own zipcode-ordered index. To implement your idea with transparent zip-based town search, it could be possible to tweak item_bin_write_match of itembin.c to append zipcode as one of town_match values (no change in binfile.c should be required then).

comment:10 Changed 3 years ago by tryagain

I have implemented another approach in POI filter. It does not work to search towns, but it's possible to use it to find a house given a ZIP code, house number. Street name part could be entered if needed.

This search can be run under the book icon in POI->[looking glass icon].

To have it working, apply the following patch or use this windows exe.

Changed 3 years ago by tryagain

Add address search with ZIP in internal gui POI filter.

Changed 3 years ago by bafplus

zipcode-search icon

comment:11 Changed 3 years ago by bafplus

Works great! book icon isnt the best icon to use, atached a zipcode icon.

Note: See TracTickets for help on using tickets.