-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Supports for multiple databases #289
Conversation
Okay, so I am (hopefully) finished for now generating the databases/bundles, here's what we have available: |
Nice! This will definitely be needed. I tried testing this out on our Portland Metro docker project: I changed Strangely, there was no USA country record:
The record is in there, so I wonder if there's something else preventing it from being used?
Could this be an issue with the downloads from geocode.earth? Or is it more likely that something in our code to read from a SQLite DB is incompatible with the per-country DBs? |
This looks to me to be a bug in the bundling code. I recently added some code to include alt geoms in the SQLite files but it looks like while the I think in this case it imported an alt geometry first and then You can see in the SQL output that there is no parent, no name and no placetype, which seems to confirm this. I'll have a look, unfortunately there may be more of these bugs but we can work through them and cover them with unit tests and they'll go away ;) FYI I always run |
Yep, so that's exactly what happened:
I've updated the code, published a new npm version and invalidated the build cache, a full data rebuild is scheduled to kick off in 30 mins. |
Okay great. So I think it's safe to say this code works well :) If a new bundle is coming soon, I'll wait to test that out just in case, but that's as much for my own enjoyment of seeing it work as for any actual confidence in this code. |
$ cat tmp/sqlite/whosonfirst-data-admin-us-latest.db.bz2.json
{
"name_compressed": "whosonfirst-data-admin-us-latest.db.bz2",
"size_compressed": 706543390,
"sha256_compressed": "bea05ca8377b04aa966b3ef97fb341873cc76f8c23410389cd418f8dbe177a8c",
"last_modified": "2020-03-10T13:23:49.225Z",
"name": "whosonfirst-data-admin-us-latest.db",
"size": 3387883520,
"sha256": "b231a5cf8c73f9929f3eddcc10b910c38c24f9b5135548eadf41f12cc9b05718",
"repo": "whosonfirst-data-admin-us",
"vintage": "latest",
"commit": "9d2abe154a3d66524ec53a5a44ee15ca986effa6",
"last_updated": "2020-03-05T22:14:00.000Z"
} sqlite> select * from spr where id = '85633793';
id|parent_id|name|placetype|country|repo|latitude|longitude|min_latitude|min_longitude|max_latitude|max_longitude|is_current|is_deprecated|is_ceased|is_superseded|is_superseding|superseded_by|supersedes|lastmodified
85633793|102191575|United States|country|US|whosonfirst-data-admin-us|45.1532595|0.314297500000009|18.86546|-179.231086|71.441059|179.859681|1|0|0|0|0|||1583217946 @orangejulius the file is uploaded but the GE data page is still caching the old inventory somehow, you should be able to downlod the new version from here (just subtract the |
Works great now. Thanks @Joxit! |
Yeah! You are welcome 😉 |
Background
WOF database will be hosted on geocode.earth, per country will be available, so the code should support per country databases too.
What's new ?
Now, wof admin lookup will combine all databases like
whosonfirst-data-[a-z0-9-]+\.db
that means both global and per country databases.related: pelias/whosonfirst#460 pelias/whosonfirst#469 pelias/whosonfirst#477