trufi-association / osm-search-data-export Goto Github PK
View Code? Open in Web Editor NEWOSM offline search data export for use in Trufi App
License: MIT License
OSM offline search data export for use in Trufi App
License: MIT License
Thanks for open sourcing this.
But I am getting an error:
$ git clone https://github.com/trufi-association/osm-search-data-export
$ cd osm-search-data-export
$ yarn # same error with npm install, but npm install showed some warnings
$ ./cli.js --input pbf --inpath ~/test/Projects/trufi/osm/2019-08-31T01-03-01-addis-ababa.pbf --output json-compact --outpath out/
/home/self/test/Projects/trufi/osm-search-data-export/src/transformer.js:286
this.streetToNodes[street] = sortedGroups.flat();
^
TypeError: sortedGroups.flat is not a function
at Object.keys.forEach.street (/home/self/test/Projects/trufi/osm-search-data-export/src/transformer.js:286:51)
at Array.forEach (<anonymous>)
at Transformation.flattenStreetNodeGroups (/home/self/test/Projects/trufi/osm-search-data-export/src/transformer.js:268:8)
at Transformation.complete (/home/self/test/Projects/trufi/osm-search-data-export/src/transformer.js:62:10)
at onComplete (/home/self/test/Projects/trufi/osm-search-data-export/index.js:22:42)
at DestroyableTransform.fs.createReadStream.pipe.pipe.on (/home/self/test/Projects/trufi/osm-search-data-export/src/input/pbf.js:20:27)
at emitNone (events.js:111:20)
at DestroyableTransform.emit (events.js:208:7)
at finishMaybe (/home/self/test/Projects/trufi/osm-search-data-export/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:620:14)
at endWritable (/home/self/test/Projects/trufi/osm-search-data-export/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:629:3)
./cli.js --input pbf --inpath ../osm/2019-08-31T01-03-01-addis-ababa.pbf --output json-compact --outpath search.json
Works only if search.json exists, same seems to be true for json-compact and sqlite
https://github.com/trufi-association/osm-search-data-export/blob/master/src/output/json.js#L5
Is the negation (!) intended? Or did want to ensure that the containing path is correct?
Hi, tks for this scripts, now I'm trying to generate my search.json file,
I update my node.js from 8 to 11 to avoid #1 issue, but now I have thi sissue
osm-search-data-export --input pbf --inpath OSM/otp-duitama/duitama.osm.pbf --output json --outpath search.json
/home/leo/.npm-global/lib/node_modules/osm-search-data-export/node_modules/@turf/boolean-point-in-polygon/index.js:38
throw new Error("polygon is required");
^
Error: polygon is required
at booleanPointInPolygon (/home/leo/.npm-global/lib/node_modules/osm-search-data-export/node_modules/@turf/boolean-point-in-polygon/index.js:38:15)
at Object.keys.find.name (/home/leo/.npm-global/lib/node_modules/osm-search-data-export/src/transformer.js:306:18)
at Array.find ()
at Object.keys.sort.forEach.street (/home/leo/.npm-global/lib/node_modules/osm-search-data-export/src/transformer.js:304:55)
at Array.forEach ()
at Transformation.extractStreets (/home/leo/.npm-global/lib/node_modules/osm-search-data-export/src/transformer.js:295:8)
at Transformation.complete (/home/leo/.npm-global/lib/node_modules/osm-search-data-export/src/transformer.js:64:10)
at onComplete (/home/leo/.npm-global/lib/node_modules/osm-search-data-export/index.js:22:42)
at DestroyableTransform.fs.createReadStream.pipe.pipe.on (/home/leo/.npm-global/lib/node_modules/osm-search-data-export/src/input/pbf.js:20:27)
at DestroyableTransform.emit (events.js:198:15)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.