#!/bin/sh

CITY="BELEM_BR"
##  1°27′21″S 48°30′14″W
##  -1.44262 -48.46636
##  -1.4583312, -48.4365347;   -1.3989132, -48.4910471;  -1.3804107, -48.4386793;
##  sample member:  lat="-1.3738884" lon="-48.4236870"

BBOX="-48.52,-1.49,-48.4,-1.36"

XAPI_URL="http://www.overpass-api.de/api/xapi?"
# needed for Overpass server:
XAPI_EXTRA="[@meta]"
wget --progress=dot:mega -O "$CITY.osm" \
   "${XAPI_URL}*[bbox=$BBOX]$XAPI_EXTRA"
if [ $? -ne 0 ] ; then
 echo "ERROR getting osm data"
 exit 1
fi
