Python Forum
Problem with bash shell needed for my python project
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with bash shell needed for my python project
#5
I settled for:

#!/bin/bash

OSMOSIS="/usr/bin/osmosis"
OSFILTER="place=city,town,village,hamlet,suburb,borough,municipality"
OCFILTER="@id @lat @lon name"

cd Alabama
$OSMOSIS --read-pbf "Alabama-Latest.Osm.Pbf" --tf reject-relations --tf reject-ways --tf accept-nodes $OSFILTER --write-xml "AlabamaCities.pbf"
osmconvert AlabamaCities.pbf --csv="$OCFILTER" -o="AlabamaCities.csv"
cd ..
which gets the job done for now. I am in the process of converting to 100% python now.
Reply


Messages In This Thread
RE: Problem with bash shell needed for my python project - by Larz60+ - Jun-23-2021, 04:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  unix shell in python Skaperen 3 2,604 Mar-29-2019, 12:02 AM
Last Post: snippsat
  BASH ? elico 2 4,459 Oct-27-2016, 12:18 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020