summaryrefslogtreecommitdiff
path: root/navit/script
diff options
context:
space:
mode:
authorlatouche <latouche@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-03-14 21:50:46 +0000
committerlatouche <latouche@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-03-14 21:50:46 +0000
commit1900c2dca17f6432eee6cf430333e94c6350d6b7 (patch)
tree9a55f06b771023db86fe7dc9c8756b7c1017f74d /navit/script
parent61645c5e3df563a550fbbfc1bebd2120100b03ff (diff)
downloadnavit-1900c2dca17f6432eee6cf430333e94c6350d6b7.tar.gz
script:osm2navit_sea:added a test to check if if the given lat and lon are correct
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2120 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/script')
-rw-r--r--navit/script/osm2navit_sea/osm2navit_sea.pl9
1 files changed, 8 insertions, 1 deletions
diff --git a/navit/script/osm2navit_sea/osm2navit_sea.pl b/navit/script/osm2navit_sea/osm2navit_sea.pl
index 68ae5dc67..703bc1ce6 100644
--- a/navit/script/osm2navit_sea/osm2navit_sea.pl
+++ b/navit/script/osm2navit_sea/osm2navit_sea.pl
@@ -10,6 +10,9 @@
#
# To avoid big polygons, the map is divided into small tiles (0.5°x0.5°)
#
+# usage:
+# osm2navit_sea.pl minlat minlon maxlat maxlon source_file output_file
+#
# lisense: GPL
#
# history:
@@ -46,7 +49,11 @@ use Math::Trig;
use POSIX qw(ceil);
use way;
-if ( @ARGV ne 6 ) {
+# lon € [-180, 180]
+# lat € [-85.0511, 85.0511]
+if ( @ARGV ne 6 ||
+ abs($ARGV[0]) > 85.0511 || abs($ARGV[2]) > 85.0511 ||
+ abs($ARGV[1]) > 180 || abs($ARGV[3]) > 180) {
print "Usage: osm2navit_sea.pl minlat minlon maxlat maxlon source_file output_file\n";
exit(1);
}