pelias / geonames

Import pipeline for geonames in to Pelias
https://pelias.io
MIT License
45 stars 37 forks source link

Support multiple countryCodes #408

Open arnesetzer opened 1 year ago

arnesetzer commented 1 year ago

:wave: I did some awesome work for the Pelias project and would love for everyone to have a look at it and provide feedback.


Here's the reason for this change :rocket:


Here's what actually got changed :clap:


Sorry, that this is a new PR, but I didn't figured out how to hang on the old PR

arnesetzer commented 1 year ago

In case anybody has the same problem: I made a little workaround shell script, which basically just loops over all CountryCodes, puts them in the pelias.json and runs the downloader & importer. Requires jq and the pelias docker image installed.

#!/bin/bash
for i in DE AT CH CZ;
do
        #echo "$i"
        jq '.imports.geonames.countryCode="'"$i"'"' pelias.json
        pelias download geonames
        pelias import geonames
done
stouch commented 1 year ago

Why is this has been blocked ?

Thanks @arnesetzer , in my case (Ubuntu) I had to do :

for i in FR DE NL;
do
    cat <<< $(jq '.imports.geonames.countryCode="'"$i"'"' pelias.json) > pelias.json
    pelias download geonames
    pelias import geonames
done
arnesetzer commented 1 year ago

Ah, my bad. Forgot to convert it to a draft. The download works as expected, but if you try to import geonames It throws an expection due to a reuse of the elasticsearch config. I found this issue, but it won't change anything.