Dealing with huge files has always been a challenging task to take care of. The memory consumption that this kind of processing requires is something to take into account independently from the language we are using and Node.js is no exception.

Let’s see how node’s streams can make this task bearable even for a process with minimal memory availability. Specifically we’ll take advantage of streams in order to run a process that converts a Google Takeout Location History JSON into a GeoJSON.

The problem

We have as an input an array of locations that are not defined according to any of the…

Matteo Di Paolantonio

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store