-
Notifications
You must be signed in to change notification settings - Fork 7
fix superseded parent IDs #23
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
base: master
Are you sure you want to change the base?
Changes from all commits
41df7e4
e3bb499
505cc0e
a56eabe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,7 @@ | |
| "mz:categories":[], | ||
| "mz:hierarchy_label":1, | ||
| "mz:is_current":1, | ||
| "mz:min_zoom":13.0, | ||
| "mz:min_zoom":13, | ||
| "name:ara_x_preferred":[ | ||
| "\u0645\u0637\u0627\u0631 \u062a\u0648\u0631\u0648\u0646\u062a\u0648 \u0628\u064a\u0631\u0633\u0648\u0646 \u0627\u0644\u062f\u0648\u0644\u064a" | ||
| ], | ||
|
|
@@ -163,10 +163,9 @@ | |
| 85895633, | ||
| 102191575, | ||
| 85633041, | ||
| 101740755, | ||
| 101735893, | ||
| 890456343, | ||
| 85682057, | ||
| 101735893 | ||
| 85682057 | ||
| ], | ||
| "wof:breaches":[], | ||
| "wof:concordances":{ | ||
|
|
@@ -181,16 +180,6 @@ | |
| ], | ||
| "wof:geomhash":"131d17c4a99435510ef6e2b02e5cc478", | ||
| "wof:hierarchy":[ | ||
| { | ||
| "campus_id":102555091, | ||
| "continent_id":102191575, | ||
| "country_id":85633041, | ||
| "county_id":890456343, | ||
| "locality_id":101740755, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, in this case, the record currently has a dual hierarchy, but only one of the hierarchies is valid.. we should remove this entire hierarchy set so this feature only has one hierarchy (the one below, with "locality_id":101735893).
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How do I detect an valid/invalid hierarchy?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added a56eabe which I think is the correct fix. // deduplicate hierarchies
// remove any hierarchies which are duplicates of, or a subset of another hierarchy
const deduplicatedHierarchies = hierarchies.filter((h1, b1) => {
return !hierarchies.some((h2, b2) => (b1 != b2) && _.isMatch(h2, h1))
})[edit] this deduplication algo was improved further and tested in pelias/wof#25 |
||
| "microhood_id":1108905413, | ||
| "neighbourhood_id":85895633, | ||
| "region_id":85682057 | ||
| }, | ||
| { | ||
| "campus_id":102555091, | ||
| "continent_id":102191575, | ||
|
|
@@ -203,7 +192,7 @@ | |
| } | ||
| ], | ||
| "wof:id":102555091, | ||
| "wof:lastmodified":1582309536, | ||
| "wof:lastmodified":1594246593, | ||
| "wof:name":"Toronto Lester B Pearson International Airport", | ||
| "wof:parent_id":1108905413, | ||
| "wof:placetype":"campus", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,15 +12,15 @@ | |
| "iso:country":"CA", | ||
| "lbl:latitude":43.676352, | ||
| "lbl:longitude":-79.628342, | ||
| "lbl:max_zoom":18.0, | ||
| "lbl:max_zoom":18, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same goes for |
||
| "mps:latitude":43.676352, | ||
| "mps:longitude":-79.628342, | ||
| "mz:hierarchy_label":1, | ||
| "mz:is_current":1, | ||
| "mz:is_funky":0, | ||
| "mz:is_landuse_aoi":1, | ||
| "mz:max_zoom":18.0, | ||
| "mz:min_zoom":16.0, | ||
| "mz:max_zoom":18, | ||
| "mz:min_zoom":16, | ||
| "name:eng_x_variant":[ | ||
| "YYZ", | ||
| "CYYZ" | ||
|
|
@@ -32,26 +32,16 @@ | |
| 85895633, | ||
| 102191575, | ||
| 85633041, | ||
| 101740755, | ||
| 101735893, | ||
| 890456343, | ||
| 85682057, | ||
| 101735893 | ||
| 85682057 | ||
| ], | ||
| "wof:breaches":[], | ||
| "wof:concordances":{}, | ||
| "wof:controlled":[], | ||
| "wof:country":"CA", | ||
| "wof:geomhash":"94f6fdf261d52145bfa08ee05579cec6", | ||
| "wof:hierarchy":[ | ||
| { | ||
| "continent_id":102191575, | ||
| "country_id":85633041, | ||
| "county_id":890456343, | ||
| "locality_id":101740755, | ||
| "microhood_id":1108905413, | ||
| "neighbourhood_id":85895633, | ||
| "region_id":85682057 | ||
| }, | ||
| { | ||
| "continent_id":102191575, | ||
| "country_id":85633041, | ||
|
|
@@ -63,7 +53,7 @@ | |
| } | ||
| ], | ||
| "wof:id":1108905413, | ||
| "wof:lastmodified":1566519299, | ||
| "wof:lastmodified":1594246594, | ||
| "wof:name":"Toronto Lester B Pearson International Airport District", | ||
| "wof:parent_id":85895633, | ||
| "wof:placetype":"microhood", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| "edtf:cessation":"uuuu", | ||
| "edtf:inception":"uuuu", | ||
| "geom:area":0.0, | ||
| "geom:area_square_m":0.0, | ||
| "geom:area_square_m":0, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmmm... exportify tool?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is the command I'm using to run
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a bit confuddled by this, why was |
||
| "geom:bbox":"-76.95069,44.24832,-76.95069,44.24832", | ||
| "geom:latitude":44.24832, | ||
| "geom:longitude":-76.95069, | ||
|
|
@@ -16,10 +16,10 @@ | |
| "lbl:bbox":"-76.95569,44.24332,-76.94569,44.25332", | ||
| "lbl:latitude":44.24832, | ||
| "lbl:longitude":-76.95069, | ||
| "lbl:max_zoom":18.0, | ||
| "lbl:max_zoom":18, | ||
| "mz:hierarchy_label":1, | ||
| "mz:is_current":1, | ||
| "mz:min_zoom":15.0, | ||
| "mz:min_zoom":15, | ||
| "mz:note":"Quattroshapes Point Gazetteer import 20170519", | ||
| "qs_pg:aaroncc":"CA", | ||
| "qs_pg:gn_country":"CA", | ||
|
|
@@ -40,8 +40,7 @@ | |
| 102191575, | ||
| 85633041, | ||
| 101736227, | ||
| 890457185, | ||
| 101740731 | ||
| 890457185 | ||
| ], | ||
| "wof:breaches":[], | ||
| "wof:concordances":{ | ||
|
|
@@ -59,18 +58,10 @@ | |
| "locality_id":101736227, | ||
| "neighbourhood_id":1126060877, | ||
| "region_id":85682057 | ||
| }, | ||
| { | ||
| "continent_id":102191575, | ||
| "country_id":85633041, | ||
| "county_id":890457185, | ||
| "locality_id":101740731, | ||
| "neighbourhood_id":1126060877, | ||
| "region_id":85682057 | ||
| } | ||
| ], | ||
| "wof:id":1126060877, | ||
| "wof:lastmodified":1566520339, | ||
| "wof:lastmodified":1594246595, | ||
| "wof:name":"Napanee Downtown", | ||
| "wof:parent_id":-1, | ||
| "wof:placetype":"neighbourhood", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our zoom values should remain floats (
13.0, rather than13).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs were run through 'exportify' so I don't have any control over how they are serialised 🤷