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

cross-street-indexer

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cross-street-indexer - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

13

lib/reducer.js

@@ -29,3 +29,2 @@ const fs = require('fs');

// GeoJSON
write.sync(debugPath + 'features.geojson', featureCollection(features));
write.sync(debugPath + 'lines.geojson', featureCollection(lines));

@@ -35,6 +34,4 @@ write.sync(debugPath + 'intersects.geojson', uniques2features(intersects));

// Index
const debugStream = fs.createWriteStream(debugPath + 'index.json');
for (const line of index2jsonl(index)) {
debugStream.write(JSON.stringify(line) + '\n');
}
fs.writeFileSync(debugPath + 'index.json', index2jsonl(index));
// Debug

@@ -52,8 +49,4 @@ write.sync(debugPath + 'debug.json', {

if (!fs.existsSync(output)) mkdirp.sync(output);
const stream = fs.createWriteStream(path.join(output, quadkey + '.json'));
for (const line of index2jsonl(index)) {
stream.write(JSON.stringify(line) + '\n');
}
fs.writeFileSync(path.join(output, quadkey + '.json'), index2jsonl(index));
done(null);
};

@@ -96,5 +96,5 @@ const {point, featureCollection} = require('@turf/helpers');

line[hash] = coord;
results.push(line);
results.push(JSON.stringify(line));
});
return results;
return results.join('\n');
}

@@ -101,0 +101,0 @@

{
"name": "cross-street-indexer",
"version": "0.4.0",
"version": "0.4.1",
"description": "Cross Street Indexer",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -130,19 +130,25 @@ # Cross Street Indexer

Adding `--verbose` will `stdout` a JSON object for each QA-Tile with the following information:
Adding `--debug` will store `.geojson` items for each process & for each QA-Tile:
```
```json
{
tile: [ 655, 1586, 12 ],
quadkey: '023010221131',
features: 9626,
intersects: 1053
"tile": [
654,
1584,
12
],
"quadkey": "023010221110",
"features": 49003,
"lines": 2427,
"intersects": 1921,
"index": 3882
}
```
Additional files will be created in the `debug/` folder:
Adding `--debug` will store `.geojson` items for each process & for each QA-Tile:
- `debug/<quadkey>/features.geojson` - raw GeoJSON of QA-Tile
- `debug/<quadkey>/lines.geojson` - Filtered (Multi)LinesString from QA-Tile
- `debug/<quadkey>/intersects.geojson` - Point which are intersecting roads
- `debug/<quadkey>/index.json` - Final Cross Street index
- `debug/<quadkey>/debug.json` - Debug details

@@ -149,0 +155,0 @@ ## Limitations

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