Skip to content
Snippets Groups Projects
osmfile.sh 486 B
Newer Older
  • Learn to ignore specific revisions
  • Lionel VIDALLER's avatar
    Lionel VIDALLER committed
    DATAPATH=$1
    OSMFILE=$2
    
    Lionel VIDALLER's avatar
    Lionel VIDALLER committed
    if [ -e "$DATAPATH/$OSMFILE" ]; then
      rm "$DATAPATH/$OSMFILE"
    
    Lionel VIDALLER's avatar
    Lionel VIDALLER committed
    # Get the Métropole de Lyon adresses file
    
    Lionel VIDALLER's avatar
    Lionel VIDALLER committed
    if [ -e "$DATAPATH/bal_200046977.csv" ]; then
      rm $DATAPATH/bal_200046977.csv
    fi
    
    wget --directory-prefix=$DATAPATH https://download.data.grandlyon.com/files/grandlyon/localisation/bal/bal_200046977.csv
    
    
    echo "::: Creating OSM file... :::"
    
    Lionel VIDALLER's avatar
    Lionel VIDALLER committed
    python3 bal_2_osm.py $DATAPATH $OSMFILE
    
    Lionel VIDALLER's avatar
    Lionel VIDALLER committed
    
    
    Lionel VIDALLER's avatar
    Lionel VIDALLER committed
    touch $DATAPATH/osm_ready
    
    echo "::: OSM file ready :::"