Consistent Lat/Long results returned?
Consistent Lat/Long results returned?
When xLocate is called to return a lat long from an postal address, where there is more than one result returned (quite normal), do the results always get returned in the same order? (i.e. if application code always used the first result in the list, would this be the same lat long every time?)
- Bernd Welter
- Site Admin
- Posts: 2703
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: Consistent Lat/Long results returned?
Hello Kevin,
the sorting order is preconfigured in the server side profile but you can override it via the optional parameters of the method.
See attached screenshot!
Best regards Bernd
the sorting order is preconfigured in the server side profile but you can override it via the optional parameters of the method.
See attached screenshot!
Best regards Bernd
Re: Consistent Lat/Long results returned?
Thank you for your quick response Bernd!
We have made no changes to the default sort order so does this mean repeated calls to xLocate with the same Post Code will always return the same sets of Lat/Long co-ordinates in the same order? We need to be sure we will always get the same results
We have made no changes to the default sort order so does this mean repeated calls to xLocate with the same Post Code will always return the same sets of Lat/Long co-ordinates in the same order? We need to be sure we will always get the same results
- Bernd Welter
- Site Admin
- Posts: 2703
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: Consistent Lat/Long results returned?
Well, sounds like a different question...
As long as the server uses same map data (same provider, same annual version) and configuration the same input should generate the same output.
The default sorting order as it is part of native-default.xml is
So from my point of view this should be "deterministic" if you don't change the sorting order within the request and you apply equal search options.
Is this sufficient?
Best regards Bernd
As long as the server uses same map data (same provider, same annual version) and configuration the same input should generate the same output.
The default sorting order as it is part of native-default.xml is
Code: Select all
<SortingOrder SortFieldsNumber="17">
<Field0 FieldName="Score.TotalScore" Ascending="false"/>
<Field1 FieldName="AddressClassification" Ascending="false"/>
<Field2 FieldName="PostalCode.Classification" Ascending="false"/>
<Field3 FieldName="Street.Classification" Ascending="false"/>
<Field4 FieldName="Town.Classification" Ascending="false"/>
<Field5 FieldName="IsCityDistrict" Ascending="true"/>
<Field6 FieldName="HouseNr.Classification" Ascending="false"/>
<Field7 FieldName="Population" Ascending="false"/>
<Field8 FieldName="Country" Ascending="true"/>
<Field9 FieldName="City" Ascending="true"/>
<Field10 FieldName="City2" Ascending="true"/>
<Field11 FieldName="PostalCode" Ascending="true"/>
<Field12 FieldName="Street" Ascending="true"/>
<Field13 FieldName="HouseNr" Ascending="true"/>
<Field14 FieldName="CombinedTransport.Name" Ascending="true"/>
<Field15 FieldName="CombinedTransport.Start.Name" Ascending="true"/>
<Field16 FieldName="CombinedTransport.Destination.Name" Ascending="true"/>
</SortingOrder>
Is this sufficient?
Best regards Bernd
Re: Consistent Lat/Long results returned?
Thank you Bernd, I believe so. I don't think I've ever had support this quickly, my thanks. kevin