-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The download Osm data task worked incorrectly in the step where the geojson is written to a file, resulting in an incorrectly formatted geojson. This commit changes what is written to the file so that the json is properly formatted and has closing brackets in the right place. We also put the stream writing in a promise and add a check that pauses the reading when the writing isn't done yet, so the two stream remain in sync when writing a large file. Finally, we also replace the promisify(pipeline) with just a pipeline that comes from the node:stream/promises module, which does the same thing for less lines of code.
- Loading branch information
1 parent
ccb4d45
commit e37c13c
Showing
2 changed files
with
98 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters