-
Notifications
You must be signed in to change notification settings - Fork 49
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
Broken OSM city shape #358
Comments
this rather a change in the database of osm, if you try for example Milan: |
either way, it's broken :-) |
Stale issue message |
Hi @chicco785 @c0c0n3 we are reproducing this issue in our environment,on debugging we found that for the first iteration in
We are assuming that this issue is for the first iteration only. Please confirm our understanding. |
Hi @Necravisaketi! Thanks for helping with this :-) Not quite sure what you mean by "first" and "second" iteration. Two runs of the same test case? If so which one? Or do you mean something else? On another note, I must admit I'm just as clueless as you are. I don't actually know the details of the OSM API and if the meaning of 'osm_type' has changed over time, it's related to data changes as @chicco785 pointed out, or something else entirely. The first step here would be to get familiar with the API, dig into the docs and possibly ask the question on an OSM forum? |
Hi @c0c0n3 on debugging we found that for the first iteration in
the output for the first iteration of i.raw['osm_type'] is 'node' if i.raw['osm_type'] == 'relation': (Pdb) pp i.raw['osm_type'] 'node' the output for the second iteration of i.raw['osm_type'] is 'relation' |
oh right, thanks so much for clarifying, I missed that. But like I said we should probably get hold of the API spec to see what the returned data structure is supposed to look like. Once we know that we can plan a fix. It's entirely possible we'll have to rewrite part of that logic. Also, can you copy-paste in here an example of the |
Hi @c0c0n3 i got this list of locations in the info [Location(Ciudad de México, 06060, México, (19.4326296, -99.1331785, 0.0)), |
Hi @Necravisaketi, thanks for this but I'm struggling to see how this list of locations relates to the |
Hi @c0c0n3
in the second iteration
|
Hi @Necravisaketi thank you so much for helping out with this, much appreciated! To sum up, there's at least two JSON objects in the
Thanks again for that info, but I reckon to get to the bottom of this, we've got to dig a bit more. Here's some pseudo-code to capture the logic of the flow we're interested in.
To understand what's happening, we need to know what are the input entities, i.e. the content of the array passed to |
Describe the bug
Geocoding of city locations is currently broken.
To Reproduce
Run
test_entity_add_city_shape
in thegeocoding.tests.test_geocoding
module. If you debug it, you'll see that the call to OSMreturns an
info
object with acurrent_result.osm_type == 'node'
whereas we expectcurrent_result.osm_type == 'relation'
.Expected behavior
QuantumLeap should extract the city polygon from OSM's result, create a
location
attribute for it, and add thelocation
to the entity being processed in the notification.Environment
nominatim.openstreetmap.org
Additional context
PR #357 disabled
test_entity_add_city_shape
to get a clean build. We'll keep it disabled until we fix this issue, then re-enable it after the fix.The text was updated successfully, but these errors were encountered: