antonioribeiro / antonioribeiro/zipcode

Geocode giving faulty data

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
97
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Antonio:
Thank you for the zipcode package.

Just a heads up that I had to remove the geocode.ca from this file:
zipcode/src/Support/WebServices/Countries/GB.php file.

Looking up a GB zipcode with a US style 5 digit of 32154 produces false results and is not caught by the package as a non GB zip code.

http://geocoder.ca/?postal=32154&geoit=XML

Returns as TORNILLO TX 32154, however, TX is not in GB, and TORNILLO TX Zip is 79853.

{
addresses: [
{
state_id: "TX",
city: "Tornillo",
longitude: "31.3998510000",
latitude: "-106.1122970000"
}
],
zip_code: "32154",
web_service: "geocoder",
country_id: "GB",
country_name: "Great Britain",
service_query_url: "http://geocoder.ca/?postal=32154&geoit=XML",
timer: "0.4734",
result_raw: {
latt: "31.3998510000",
longt: "-106.1122970000",
standard: {
stnumber: [ ],
staddress: [ ],
city: "Tornillo",
prov: "TX",
confidence: "0.9"
}
},
success: true
}

I contacted geocoder.ca to notify them of the issue as they are capable of US ZipCodes as well.

Thanks for the package.

John

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with zipcode/src/Support/WebServices/Countries/GB.php and reproduce the reported lookup for the GB zipcode 32154 using the geocoder.ca URL in the issue. Verify that the package does not accept the returned US location as valid GB data; done means the faulty result is no longer returned or is correctly rejected.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.