xLocate findAddressByText, emphasize Postcode - possible?

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
andybarker
Posts: 1
Joined: Thu Sep 07, 2017 3:08 pm

xLocate findAddressByText, emphasize Postcode - possible?

Post by andybarker »

We are using xLocate on premise without x digit, making this call:

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soap:Body>
      <findAddressByText xmlns="http://types.xlocate.xserver.ptvag.com">
         <String_1>LANCASTER GATE, WELLINGBOROUGH ROAD, SYWELL, NN60BN</String_1>
         <String_2>GB</String_2>
         <ArrayOfSearchOptionBase_3/>
         <ArrayOfSortOption_4/>
         <ArrayOfResultField_5/>
         <CallerContext_6>
            <wrappedProperties xmlns="http://baseservices.service.jabba.ptvag.com">
               <CallerContextProperty key="CoordFormat" value="PTV_GEODECIMAL"/>
               <CallerContextProperty key="Profile" value="alternative"/>
            </wrappedProperties>
         </CallerContext_6>
      </findAddressByText>
   </soap:Body>
</soap:Envelope>
When put in google, "LANCASTER GATE, WELLINGBOROUGH ROAD, SYWELL, NN60BN" we get an accurate location on NN6 0BN, 52.3005,-0.78769

When run through xLocate we get the below answers…

The first result is what we select as it has the highest confidence value (91). However, the 2nd result is the correct result. The question is how do we get xLocate to put more emphasis on the post code, especially when we are geolocating UK addresses?

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns2:findAddressByTextResponse xmlns:ns0="http://xlocate.xserver.ptvag.com" xmlns:ns1="http://wrappertypes.service.jabba.ptvag.com" xmlns:ns2="http://types.xlocate.xserver.ptvag.com" xmlns:ns3="http://baseservices.service.jabba.ptvag.com" xmlns:ns4="http://common.xserver.ptvag.com" xmlns:ns6="http://exception.core.jabba.ptvag.com">
         <ns2:result errorCode="0" errorDescription="">
            <ns0:wrappedResultList>
               <ns0:ResultAddress adminRegion="Lancaster" appendix="" city="Lancaster" city2="" classificationDescription="HIGH" country="GB" countryCapital="London" detailLevelDescription="STREET" houseNumber="" postCode="LA2 9" state="England" street="Postern Gate Road" totalScore="91">
                  <ns0:wrappedAdditionalFields/>
                  <ns0:coordinates>
                     <ns4:point x="-274365.0" y="5405245.0"/>
                  </ns0:coordinates>
               </ns0:ResultAddress>
               <ns0:ResultAddress adminRegion="Northampton" appendix="" city="Northampton" city2="Sywell" classificationDescription="HIGH" country="GB" countryCapital="London" detailLevelDescription="STREET" houseNumber="" postCode="NN6 0" state="England" street="Wellingborough Road" totalScore="90">
                  <ns0:wrappedAdditionalFields/>
                  <ns0:coordinates>
                     <ns4:point x="-79102.0" y="5230067.0"/>
                  </ns0:coordinates>
               </ns0:ResultAddress>
               <ns0:ResultAddress adminRegion="Wellingborough" appendix="" city="Wellingborough" city2="" classificationDescription="HIGH" country="GB" countryCapital="London" detailLevelDescription="STREET" houseNumber="" postCode="nn8 *" state="England" street="Sywell Road" totalScore="90">
                  <ns0:wrappedAdditionalFields/>
                  <ns0:coordinates>
                     <ns4:point x="-73561.0" y="5230951.0"/>
                  </ns0:coordinates>
               </ns0:ResultAddress>
            </ns0:wrappedResultList>
         </ns2:result>
      </ns2:findAddressByTextResponse>
   </soap:Body>
</soap:Envelope>
User avatar
bocajo
Posts: 45
Joined: Tue Mar 01, 2016 3:05 pm

Re: xLocate findAddressByText, emphasize Postcode - possible

Post by bocajo »

With the function findAddressByText you have no chance to bring the second result at the first position. There are many reasons but the main reason is the algorithm can not finde the input postal code (NN60BN) therefore it has no input on the score calculation and you can not sort by it.
Why don't you use the findAddress function? With the multifield search the algorithm no what ist the postalcode or city, so the result and the score and classification is more unambiguous.
Jochen Anderer
Manager Engineer
PTV GROUP GERMANY
Post Reply