pelias / openaddresses

Pelias import pipeline for OpenAddresses.
MIT License
52 stars 44 forks source link

port download code to use the batch endpoint #513

Open missinglink opened 1 year ago

missinglink commented 1 year ago

this draft PR updates the OA downloader to use the batch.openaddresses.io endpoint.

a few things worth mentioning:

missinglink commented 1 year ago

This is ready for testing, there are some features I would have liked to add but will have to wait for a subsequent PR:

I still need to clarify a couple things with the OA team:

Joxit commented 1 year ago

LGTM

:+1: for decompression on import and source pattern matching for a next PR.

Maybe you can add a logger.error for all missing files even if errorsFatal is false. This allows you to know all the errors at once.

https://github.com/pelias/openaddresses/blob/60256bd496b3ae81f05e6d392e4e6459bc59d5ec/utils/download_filtered.js#L24-L32

missinglink commented 1 year ago

Yeah good idea about the logging, I'll go through and make sure everything is logged, even if it's at the debug log level, I also want to log the output of these child process shell commands if anything goes wrong.

I have a chat going with the OA team at the moment to clarify some of the final questions:

vberten commented 1 year ago

Hi @Joxit, @missinglink,

Any update on this? Is that planned to make this available in the pelias/docker repo?

Thanks!