forked from lmotta/scripts-for-gis
-
Notifications
You must be signed in to change notification settings - Fork 1
/
footprint_convexhull_kdialog.sh
executable file
·50 lines (50 loc) · 1.8 KB
/
footprint_convexhull_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_convexhull Kdialog
# Description : Create convex hull. Using Kdialog
#
# Arguments:
# $1: Shapefile
#
# Dependencies : KDE and footprint_convexhull.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:
# 16b_2_8b_convert_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="Convexhull_geojson"
fileOgr=$(kdialog --title $title --getopenfilename $HOME "*.geojson |Geojson")
if [ -f "$fileOgr" ]
then
kdialog --title $title --passivepopup "Processing:\n$fileOgr" 5
if msg=$(footprint_convexhull.py $fileOgr)
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