Anders Melander 1782 Posted January 30, 2021 19 hours ago, david_navigator said: Amazing how doing something different often brings alternative solutions to the forefront. I solve most of my problems in the shower. Eureka! 4 Share this post Link to post
Rollo62 536 Posted February 2, 2021 Adress data can be much chaotic data in general, including typo's, exchanged fields, etc. Thats why a hash value is maybe problematic too, if you want to work with the data. Have you considered to reverse GeoCode the data in a single batch run, and add lon/lat to your database ? Maybe that could make more sense for you, but could allow several "same" addresses of coarse. Share this post Link to post
Marat1961 17 Posted February 14, 2021 On 2/2/2021 at 3:12 PM, Rollo62 said: Have you considered to reverse GeoCode the data in a single batch run, and add lon/lat to your database ? There can be several addresses in a house and they all have the same geodata. Share this post Link to post
Marat1961 17 Posted February 14, 2021 If you want to get hash of an object by key fields, it is convenient to serialize these fields, e.g. in TMemoryStream or even string. Then use reliable hash function, for example SHA-3. Fields can be numbered, empty values can be skipped '1:France;3:Paris'. For strings, a function that takes string length in characters into account when calculating the hash is useful. For floating point numbers, it is better to use an algorithm that hashes the exponent and the mantissa of the number separately. If it's an object or a record, sometimes it makes sense to write your own function that hashes selected key fields of the object. Share this post Link to post