Add small script to generate bounding-box argument from bbox files.
This commit is contained in:
		
							
								
								
									
										18
									
								
								inputs/bbox/bbox4osmosis.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										18
									
								
								inputs/bbox/bbox4osmosis.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| bbox=$1 | ||||
|  | ||||
| if [ -z "${bbox}" ]; then | ||||
|     echo "Usage: $0 [BBOX_FILE|BBOX_NAME]" > /dev/stderr | ||||
|     exit 1 | ||||
| fi | ||||
|  | ||||
| if [ ! -e "${bbox}" ]; then | ||||
|     bbox=inputs/bbox/${bbox}.bbox | ||||
| fi | ||||
|  | ||||
| if [ ! -e "${bbox}" ] || [ ! -r "${bbox}" ]; then | ||||
|     echo "File ${bbox} does not exist or is not readable." > /dev/stderr | ||||
| fi | ||||
|  | ||||
| cat ${bbox} | tr "," " " | xargs printf "bottom=%f left=%f top=%f right=%f" | ||||
		Reference in New Issue
	
	Block a user