Confusing results when using location search with bbox parameter

33 views
Skip to first unread message

Patricia Moll

unread,
Sep 10, 2026, 10:44:33 AMSep 10
to GeoAdminCh API
I have a question regarding the GeoAdmin location search service and its behavior when using a bounding box.
For a search application, we restrict the search service to the bounding box of a canton. Additionally, we set the parameter sortbox=false so that results are sorted by similarity to the search term rather than by distance to the center of the BBox.

Is the bbox parameter intended to be used in this way? And have we interpreted the sortbox parameter correctly?

Because in doing so, we have encountered the following inconsistencies:

1. No results with sortbox=false
When searching for the term "Bahnhofstrasse 1", we receive no results, even though this address exists in several locations within the BBox.
 
2. Unfavorable weighting with sortbox=true
We only receive results when we set the sortbox parameter to true. However, these results are weighted unfavorably.  Results that are less similar are weighted better (lower number) than similar results. According to the documentation, a weight close to 1 is optimal.

Here is an example including the URL used, as well as an excerpt of the results received and their weighting.

Example query: "bahnhofstrasse 1"

URL: https://api3.geo.admin.ch/rest/services/ech/SearchServer?type=locations&searchText=bahnhofstrasse 1&returnGeometry=true&lang=en&sr=2056&sortbbox=true&bbox=2659303.794,1180482.335,2686449.01,1208074.866

  - Weights below 2500 (should be the most similar but aren't)
Screenshot from 2026-09-10 15-55-27.png

  - Weights higher than 2500 (should be less similar but actually contain the perfect match "bahnhofstrasse 1")
Screenshot from 2026-09-10 15-57-27.png


Thanks for the help,
Patricia

Jürgen Hansmann

unread,
Sep 11, 2026, 2:31:01 AMSep 11
to geoadm...@googlegroups.com
Hi Patricia

Thanks for your post, we are looking into it.

Best regards
Juergen

--
You received this message because you are subscribed to the Google Groups "GeoAdminCh API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoadmin-api...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/geoadmin-api/b90ad460-f194-49bb-87b4-3a638075d6cdn%40googlegroups.com.

Jürgen Hansmann

unread,
Sep 16, 2026, 4:01:23 AM (11 days ago) Sep 16
to GeoAdminCh API
Hi Patricia

Thanks again for your report.
A fix has been deployed recently, hope that does work for you.
If not, please let us know.

Thanks a lot and have a nice day
Juergen

Patricia Moll

unread,
Sep 16, 2026, 7:53:27 AM (11 days ago) Sep 16
to GeoAdminCh API
Hello Jürgen

Perfect! When I now switch to URL parameter "searchbox=false" I get very plausible results.

Thank you very much for the super fast response and fix.
Patricia

Jürgen Hansmann

unread,
Sep 16, 2026, 2:15:44 PM (11 days ago) Sep 16
to geoadm...@googlegroups.com
Good to hear, I will forward your thanks to the actual colleague who fixed this issue :-)

Reply all
Reply to author
Forward
0 new messages