georender-pack
Advanced tools
Comparing version 4.2.1 to 4.2.2
@@ -67,5 +67,9 @@ var getNormals = require('polyline-normals') | ||
sizes.area.cells+=clen*3 | ||
for (var i=0; i<clen*3; i++) { | ||
var c = varint.decode(buf, offset) | ||
offset+=varint.decode.bytes | ||
} | ||
var elen = varint.decode(buf, offset) //elen | ||
offset+=varint.decode.bytes | ||
var esize = 2, eprev = 0 | ||
var epl = 0, esize = 0, eprev = 0 | ||
for (var i=0; i<elen; i++) { | ||
@@ -75,13 +79,18 @@ var e = varint.decode(buf, offset) | ||
if (e === 0) { // edge break | ||
eprev = 0 | ||
esize+=2 | ||
if (epl >= 2) { | ||
esize += epl*2 + 2 | ||
} | ||
epl = 0 | ||
} else if (e % 2 === 0) { // edge index | ||
eprev = Math.floor(e/2)-1 | ||
esize+=2 | ||
var ei = Math.floor(e/2)-1 | ||
epl++ | ||
eprev = ei | ||
} else { // edge range | ||
var e1 = Math.floor(e/2)-1 | ||
esize+=(e1-eprev)*2 | ||
epl += Math.floor(e/2)-eprev-1 | ||
eprev = e1 | ||
} | ||
} | ||
if (epl >= 2) { | ||
esize += epl*2 + 2 | ||
} | ||
sizes.areaBorder.types+=esize | ||
@@ -324,2 +333,3 @@ sizes.areaBorder.ids+=esize | ||
lat = buf.readFloatLE(offset) | ||
offset+=4 | ||
data.area.types[offsets.area.types++] = type | ||
@@ -329,3 +339,2 @@ data.area.ids[offsets.area.ids++] = id | ||
data.area.positions[offsets.area.positions++] = lat | ||
offset+=4 | ||
} | ||
@@ -332,0 +341,0 @@ var clen = varint.decode(buf, offset) |
{ | ||
"name": "georender-pack", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"description": "pack and unpack osm data based on the peermaps buffer schema", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79822
2523