Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angola's bounds is the same as Austria? #682

Closed
kg-currenxie opened this issue May 23, 2021 · 3 comments
Closed

Angola's bounds is the same as Austria? #682

kg-currenxie opened this issue May 23, 2021 · 3 comments

Comments

@kg-currenxie
Copy link

kg-currenxie commented May 23, 2021

gem 'rails', '6.1.3.2'
gem 'countries', '3.1.0'

In my rails console:

irb(main):011:0> angola = ISO3166::Country.find_country_by_alpha2('ao')
irb(main):012:0> austria = ISO3166::Country.find_country_by_alpha2('at')
irb(main):018:0> france = ISO3166::Country.find_country_by_alpha2('fr')

irb(main):014:0> angola.geo
=> {"latitude"=>47.516231, "latitude_dec"=>"-12.333555221557617", "longitude"=>14.550072, "longitude_dec"=>"17.539464950561523", "max_latitude"=>49.0206081, "max_longitude"=>17.1606861, "min_latitude"=>46.37233579999999, "min_longitude"=>9.530783399999999, "bounds"=>{"northeast"=>{"lat"=>49.0206081, "lng"=>17.1606861}, "southwest"=>{"lat"=>46.37233579999999, "lng"=>9.530783399999999}}}

irb(main):015:0> austria.geo
=> {"latitude"=>47.516231, "latitude_dec"=>"47.58843994140625", "longitude"=>14.550072, "longitude_dec"=>"14.14021110534668", "max_latitude"=>49.0206081, "max_longitude"=>17.1606861, "min_latitude"=>46.37233579999999, "min_longitude"=>9.530783399999999, "bounds"=>{"northeast"=>{"lat"=>49.0206081, "lng"=>17.1606861}, "southwest"=>{"lat"=>46.37233579999999, "lng"=>9.530783399999999}}}

irb(main):019:0> france.geo
=> {"latitude"=>46.227638, "latitude_dec"=>"46.63727951049805", "longitude"=>2.213749, "longitude_dec"=>"2.3382623195648193", "max_latitude"=>51.1241999, "max_longitude"=>9.6624999, "min_latitude"=>41.3253001, "min_longitude"=>-5.5591, "bounds"=>{"northeast"=>{"lat"=>51.1241999, "lng"=>9.6624999}, "southwest"=>{"lat"=>41.3253001, "lng"=>-5.5591}}}

irb(main):022:0> angola.geo['bounds']
=> {"northeast"=>{"lat"=>49.0206081, "lng"=>17.1606861}, "southwest"=>{"lat"=>46.37233579999999, "lng"=>9.530783399999999}}
irb(main):023:0> austria.geo['bounds']
=> {"northeast"=>{"lat"=>49.0206081, "lng"=>17.1606861}, "southwest"=>{"lat"=>46.37233579999999, "lng"=>9.530783399999999}}
irb(main):024:0> france.geo['bounds']
=> {"northeast"=>{"lat"=>51.1241999, "lng"=>9.6624999}, "southwest"=>{"lat"=>41.3253001, "lng"=>-5.5591}}

# just to make sure
irb(main):025:0> angola.name
=> "Angola"
irb(main):026:0> austria.name
=> "Austria"

As you see, min_longitude, min_latitude, max_longitude, max_latitude are all the same :P

Other countries seems fine. This is the only one that I've seen being weird like this.
Although, the yaml files in /data seem fine. Any ideas?

@pmor
Copy link
Member

pmor commented May 24, 2021

It looks like the JSON cache file has bad data, the next release should correct this

@pmor
Copy link
Member

pmor commented Jun 11, 2021

@pmor pmor closed this as completed Jun 11, 2021
@Frexuz
Copy link

Frexuz commented Jun 12, 2021

Confirmed 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants