ensure all nodes are written as decimals
This commit is contained in:
parent
8947c789a9
commit
7a764ce78b
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
var builder = require('xmlbuilder');
|
var builder = require('xmlbuilder');
|
||||||
|
|
||||||
|
var ensureDecimal = (i) => {
|
||||||
|
if (parseInt(i) === i) return i.toFixed(1);
|
||||||
|
else return i;
|
||||||
|
};
|
||||||
|
|
||||||
class DB {
|
class DB {
|
||||||
constructor () {
|
constructor () {
|
||||||
this.nodes = new Array();
|
this.nodes = new Array();
|
||||||
@ -104,8 +109,8 @@ class Node {
|
|||||||
this.OSM_USER = OSM_USER;
|
this.OSM_USER = OSM_USER;
|
||||||
this.OSM_TIMESTAMP = OSM_TIMESTAMP;
|
this.OSM_TIMESTAMP = OSM_TIMESTAMP;
|
||||||
this.OSM_UID = OSM_UID;
|
this.OSM_UID = OSM_UID;
|
||||||
this.lon = lon;
|
this.lon = ensureDecimal(lon);
|
||||||
this.lat = lat;
|
this.lat = ensureDecimal(lat);
|
||||||
this.tags = tags;
|
this.tags = tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user