include output parameter
This commit is contained in:
parent
6d5ec0c4ed
commit
8f3edcc7c8
|
@ -13,6 +13,7 @@ function usage() {
|
|||
-t, --timeout~Query timeout in seconds (default: 900)
|
||||
-n, --name~Output filename
|
||||
-s, --server~Overpass server (default: https://overpass-api.de/api)
|
||||
-o, --output~Output format (default: xml)
|
||||
~
|
||||
EOF
|
||||
|
||||
|
@ -35,6 +36,7 @@ provinces=()
|
|||
areaexpr=
|
||||
name=
|
||||
query=$1
|
||||
output="xml"
|
||||
|
||||
# move the file argument, to parse the rest of options
|
||||
shift
|
||||
|
@ -57,6 +59,10 @@ while true; do
|
|||
name=$2
|
||||
shift 2
|
||||
;;
|
||||
-o|--output)
|
||||
output=$2
|
||||
shift 2
|
||||
;;
|
||||
-p|--provinces)
|
||||
# presets for group elements all in once
|
||||
if [[ "${2,,}" == "ccaa" ]]; then
|
||||
|
@ -97,7 +103,7 @@ function province() {
|
|||
esac
|
||||
|
||||
cat <<EOF
|
||||
[out:xml][timeout:${timeout}];
|
||||
[out:${output}][timeout:${timeout}];
|
||||
${area}->.searchArea;
|
||||
${content_scoped}
|
||||
out meta;
|
||||
|
|
Loading…
Reference in New Issue