Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
open-cage-provider issue with adminLevels #1040
Comments
|
Looking at the code, currently Can you post the full json response please? |
|
Yes, I saw that two level in sources, but in my response there is none of them so temporary I add another case with "region". Full response too long to post here, if you want get it grab coordinates from first message and use it on OpenCage live demo page https://opencagedata.com/demo. Here is only components section of it (point of interest):
|
|
Yeah, I think we really need to normalize our admin levels ! It was decided to have admin level 1 as "first-order civil entity below the country level". Looking at an address in Belgium, I would say:
But there is not |
In some cases provider don't return any adminLevels (empty list), but they should be there.
As example, if we try to reverse point (47.571109, 19.108676) we get address
"Budapest, Pajtás utca 2, 1046, Hungary"
without admin levels in parsed object.
But in original JSON response we have component item:
"region": "Central Hungary"As I think, Regions should be admin level = 1.