symerio / pgeocode

Postal code geocoding and distance calculation
https://pgeocode.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
231 stars 57 forks source link

latitude indexing bug for _index_postal_codes #55

Closed przemomatejczuk closed 1 year ago

przemomatejczuk commented 2 years ago

Hello, New guy here using the pgeocode lib for one of my projects. I have just noticed that there may be a small bug while generating the -index.txt file that results the mean location for post code shift a bit. Can anyone please double check if the latitude is calcualted properly? I can see there's a possible typo in the valid_keys derivation and latitude is spelled with two Ts.

Location: https://github.com/symerio/pgeocode/blob/main/pgeocode.py#L255

Occurs for PL post codes, e.g. 21-310 or 98-330

rth commented 1 year ago

Thanks for the report. This is now resolved in https://github.com/symerio/pgeocode/pull/62