-
Notifications
You must be signed in to change notification settings - Fork 10
/
footprint_extent_kdialog.sh
executable file
·50 lines (50 loc) · 1.8 KB
/
footprint_extent_kdialog.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
#
# ***************************************************************************
# Name : Footprint Extent Kdialog
# Description : Create extent of image with GeoJSON format. Using Kdialog.
#
# Arguments:
# $1: Image
#
# Dependencies : KDE and footprint_extent.py
#
# ***************************************************************************
# begin : 2015-04-15 (yyyy-mm-dd)
# copyright : (C) 2015 by Luiz Motta
# email : motta dot luiz at gmail.com
# ***************************************************************************
#
# Revisions
#
# 0000-00-00:
# - None
#
# ***************************************************************************
#
# Example:
# footprint_extent_kdialog.sh
#
# ***************************************************************************
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it under the terms of the GNU General Public License as published by *
# * the Free Software Foundation; either version 2 of the License, or *
# * (at your option) any later version. *
# * *
# ***************************************************************************
#
title="Footprint_extent_of_image"
img=$(kdialog --title $title --getopenfilename $HOME "*.* |Images type")
if [ -f "$img" ]
then
kdialog --title $title --passivepopup "Processing:\n$img" 5
if msg=$(footprint_extent.py $img)
then
kdialog --title $title --msgbox "Finished.\n$msg"
else
kdialog --title $title --sorry "Error!.\n$msg"
fi
else
kdialog --title $title --passivepopup "Not Select File!" 5
fi