Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

georender-pack

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

georender-pack - npm Package Compare versions

Comparing version 4.2.1 to 4.2.2

25

decode.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc