Page 1 of 1

Limit Search to an exact PostalCode

Posted: Tue Oct 16, 2018 4:11 pm
by MichaelSchwabl
Hi!
Is it possible to limit the search to an exact postalcode?
We have an issue, that if the street is not found, the search also delivers results in other postal areas.

From other posts in this forum we found, that we can analyse the matching result with e.g. POSTCODE_CLASSIFICATION
But the question is, if it is possible to tell the geocoder to search just in the provided postal area?

We use findAddress() on X-Server Internet to search for Bria-Weg , AT-2162 Falkenstein, which delivers weired results depending on if city = "Falkenstein" or city = "Falkenstein bei Poysdorf"

We tried different SearchParameters which did not change anything.
By the way: How can we specify the Option Town.Active on X-Server Internet?

thx, Michael

Re: Limit Search to an exact PostalCode

Posted: Wed Oct 17, 2018 7:14 am
by Bernd Welter
Hello Michael,

in xLocate 1 the engine returns sometimes more results than expected. Last but not least this is the reason why we also provide a large number of extended attributes per address: this enables clients to sort and filter hits in they desired way.
So removing each entry which doesn't match your requirements (e.g. because the postcode doesn'T match by 100%) isn'T a big thing.

I'll forward your request to DEV anyway and ask them for some feedback.

About the specific option you mentioned: use the NamedSearchOption class:

Code: Select all

<ArrayOfSearchOptionBase_2>
	<SearchOptionBase xsi:type="NamedSearchOption" 
value="1" param="Town.Active" xmlns="http://xlocate.xserver.ptvag.com" />
</ArrayOfSearchOptionBase_2>

Code: Select all

"options": [
    {
      "$type": "NamedSearchOption",
      "value": "1",
      "param": "Town.Active"
    }
  ]
Best regards,
Bernd

Re: Limit Search to an exact PostalCode

Posted: Wed Oct 17, 2018 12:29 pm
by bocajo
Hi Michal

If you try the following request you should also get the city 2162 Falkenstein as result address:

{
"addr": {
"country": "A",
"postCode": "2162",
"city": "Falkenstein bei Poysdorf",
"city2": "",
"street": "Bria-Weg",
"houseNumber": ""
},
"options": [{
"$type": "NamedSearchOption",
"value": "0",
"param": "PreferStreetOnCityStreetConflicts"
}],
"sorting": [],
"additionalFields": [],
"callerContext": {
"properties": [
{
"key": "CoordFormat",
"value": "PTV_MERCATOR"
},
{
"key": "Profile",
"value": "default"
}
]
}
}

Best regards, Jochen