X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/0070817ba5e2f652f64fb68076ad3a61c2fcca77..357a99c0ef86cd4d3276c7dd215b58f78640515a:/utils/import_wikipedia.sh?ds=sidebyside diff --git a/utils/import_wikipedia.sh b/utils/import_wikipedia.sh index 7dd5ab08..0a15e2d0 100755 --- a/utils/import_wikipedia.sh +++ b/utils/import_wikipedia.sh @@ -39,8 +39,11 @@ do echo "insert into wikipedia_article select '${i}', title, count, othercount, count+othercount from ${i}pagelinkcount;" | $psqlcmd done +echo "update wikipedia_article set importance = log(totalcount)/log((select max(totalcount) from wikipedia_article))" | $psqlcmd + # precalculated lat,lon from dbpedia -cat geo_coordinates_en.nq | grep http://www.georss.org/georss/point | sed 's|]*> * "\(-\?[-0-9.E]\+\) \(-\?[-0-9.E]\+\)"@en .|update pagelinks set lat=\1, lon=\2 where language = '"'"'\3'"'"' and title = decode_url_part('"'"'\4'"'"');|g' | $psqlcmd +wget http://downloads.dbpedia.org/current/en/geo_coordinates_en.nq.bz2 +bzip2 -dc geo_coordinates_en.nq.bz2 | grep http://www.georss.org/georss/point | sed 's|]*> * "\(-\?[-0-9.E]\+\) \(-\?[-0-9.E]\+\)"@en .|update pagelinks set lat=\1, lon=\2 where language = '"'"'\3'"'"' and title = decode_url_part('"'"'\4'"'"');|g' | $psqlcmd # media wiki dumper wget https://github.com/bcollier/mwdumper/blob/master/build/mwdumper.jar