Views:

More and more customers are facing the challenge of migrating xServer 1 to the newer PTV APIs (PTV Developer / xServer 2).

 

We therefore want to gather some basic information which we recommend to check carefully if you want to migrate existing approaches.

 

What are our users used to in xLocate 1:

- xLocate 1 offers a large set of parameters you can use to control filters and structure of a result:

     <SearchOptionBase xsi:type="SearchOption" value="1" param="COUNTRY_CODETYPE" xmlns=http://xlocate.xserver.ptvag.com/>
… <SearchOptionBase xsi:type="SearchOption" value="999" param="MAX_RESULT" xmlns=http://xlocate.xserver.ptvag.com/>

 -> The good news are, the newer APIs are less complicated when it comes to such parameters. That´s because we reduced the set to a bare minimum. Your are more or less just able to filter

  • per allowed countries (which has been invented also on behalf of performance)
  • how to return the country value of a result address

- There have been much more quality properties in the output such as: 

    <ResultField xmlns=http://xlocate.xserver.ptvag.com>POPULATION</ResultField>
<ResultField xmlns=http://xlocate.xserver.ptvag.com>CLASSIFICATION_DESCRIPTION</ResultField>

 -> you may have used this info to apply sorting and filterin on client side. As of early 2024 the response of the newer APIs (PTV Developer / PTV xServer 2) is not as detailed as you are used to.

 

The new API results are based on:

  • complete strings in the addresses wherever possible (example: No input street? You won´t get a street name in the repsonse (besindes reverse geocoding))
  • Score: designed to mainly sort results (better score...) and to filter (score too low? Don´t present the result)
  • coordinates (even with rooftop coordinates)
  • various further quality properties: often used for client side sort / filter

So this structure remains. But depending on whether you go for PTV Developer Geocoding (HERE based) or PTV Developer Geocoding (OSM based) the output fields may vary.

 

You might have built a complex business logic based on iteration:

  • Perform initial geocoding
  • If insufficient due to quality criteria, score ... iterate...
  • change search options
  • change input fields (e.g. remove city name or street)

-> You can sill apply this - just be aware that thereßs different output fields available.

 

 

Related Products: PTV xServer