After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723463 - Fix typo in geocode-forward place_type_from_attributes
Fix typo in geocode-forward place_type_from_attributes
Status: RESOLVED FIXED
Product: geocode-glib
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: geocode-glib maintainer(s)
geocode-glib maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-02-02 10:08 UTC by Jonas Danielsson
Modified: 2014-02-04 11:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
forward: fix typo in place type (1.03 KB, patch)
2014-02-02 10:08 UTC, Jonas Danielsson
none Details | Review
forward: switch to jsonv2 format for Nominatim (3.29 KB, patch)
2014-02-02 10:43 UTC, Jonas Danielsson
none Details | Review
forward: switch to jsonv2 to include place_type (3.50 KB, patch)
2014-02-02 11:26 UTC, Jonas Danielsson
committed Details | Review

Description Jonas Danielsson 2014-02-02 10:08:11 UTC
The class name is boundary not boundry. Patch forthcoming.
Comment 1 Jonas Danielsson 2014-02-02 10:08:33 UTC
Created attachment 267832 [details] [review]
forward: fix typo in place type

The class name is boundary not boundry.
Comment 2 Jonas Danielsson 2014-02-02 10:32:09 UTC
Ok, so this caused segfault in Maps. The code inside the if-statement have obviously never been run. The check in the hash_table for place_rank always returns NULL. And this has an explanation: place_rank is not returned in the json of &format=json.

It is however in &format=jsonv2.

So to get place_rank we need to switch to jsonv2. Another difference I spotted between json and jsonv2 is that "class" is called "category" in v2.

So maybe a patch that switches to jsonv2 is what is needed.
Comment 3 Jonas Danielsson 2014-02-02 10:43:53 UTC
Created attachment 267836 [details] [review]
forward: switch to jsonv2 format for Nominatim

The json format does not include the place_rank attribute.
The place_rank attribute is needed to establish what kind of
boundary we are dealing with.

Switching to jsonv2 gives us the place_rank at the cost of having
to rename the class attribute as category.
Comment 4 Jonas Danielsson 2014-02-02 11:26:02 UTC
Created attachment 267838 [details] [review]
forward: switch to jsonv2 to include place_type

The json format does not include the place_rank attribute.
The place_rank attribute is needed to establish what kind of
boundary we are dealing with.

Switching to jsonv2 gives us the place_rank at the cost of having
to rename the class attribute as category.

This patch also fix a typo where boundary was spelled
as boundry. Ensuring that the missing place_rank attribute
never was detected. If fixed in a stand alone patch it exposes
us to a commit that introduces a segfault.
Comment 5 Zeeshan Ali 2014-02-03 17:56:35 UTC
Review of attachment 267838 [details] [review]:

ACK
Comment 6 Jonas Danielsson 2014-02-04 11:00:37 UTC
Attachment 267838 [details] pushed as 49ba62c - forward: switch to jsonv2 to include place_type