xLocate2 – single field : filter by country

deals with geocoding and reverse geocoding in the context of PTV Geocoding&Places, PTV Geocoding&Places OSM and PTV xLocate 1 and 2
Post Reply
User avatar
Syon_Leo
Posts: 2
Joined: Wed Jan 22, 2020 10:27 am

xLocate2 – single field : filter by country

Post by Syon_Leo »

Hi there,
We use xLocate2 single field search named SearchByTextRequest. By entering the text “1100” (postal code of some districts in Vienna) we receive hits in Lissabon (Portugal) and Nicosia (Cypress).
Vienna doesn’t appear at all. If we use “1100 W” or “1100 Österreich” we are successful.

Is there some country filter available we could apply to get the result we would like to have? We don’t want a global search…
Best regards,
Leo
User avatar
bocajo
Posts: 45
Joined: Tue Mar 01, 2016 3:05 pm

Re: xLocate2 – single field : filter by country

Post by bocajo »

Hi Leo
This will be a new feature of the xServer 2.17 which is currently planed for end of February. Then it is possible to restrict the single field search on spezific countries. In your case the request could look like this:

Code: Select all

{
  "$type": "SearchByTextRequest",
  "text": "1100",
  "searchOptions": {
    "allowedCountries": [
      "AT","DE","CH"
    ]
  }
}
Best regards
Jochen Anderer
Manager Engineer
PTV GROUP GERMANY
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: xLocate2 – single field : filter by country

Post by Bernd Welter »

Hi there,

the feature described by Jochen can improve both the quality of a result and also the performance because the data that has to be analyzed is reduced ;-) Customers who are active in a defined part of the world will benefit from this...

Here's an example output
Geocoding of "esplanade 5270". Only hits in LU and AU are searched
Geocoding of "esplanade 5270". Only hits in LU and AU are searched
Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: xLocate2 – single field : filter by country

Post by Bernd Welter »

Cheers!

You can test the new feature in the test environment:
https://xserver2-test.cloud.ptvgroup.co ... Runner.htm

Feedback is welcome!

Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply