Commit 441fef9f authored by Tobinsk's avatar Tobinsk
Browse files

Merge branch '13-fix-wrong-location' into 'master'

Round to six digits after a comma

Closes #13

See merge request histhub/wikidata-normalizer!25
parents 97466170 8773d4c2
......@@ -43,8 +43,8 @@ class WikiNormalizer extends Transform {
const data = Buffer.from(chunk.parsed.data).toString('utf8');
const obj = JSON.parse(data);
// helpers
const lat = this.getValue(obj, 'P625', 'latitude');
const lon = this.getValue(obj, 'P625', 'longitude');
const lat = Number.parseFloat(this.getValue(obj, 'P625', 'latitude')).toFixed(6);
const lon = Number.parseFloat(this.getValue(obj, 'P625', 'longitude')).toFixed(6);
// if not coordinates ignore
if (!lat || !lon) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment