[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Maposmatic-dev] [PATCH] Check that latitude and longitude are different
From: |
David MENTRE |
Subject: |
[Maposmatic-dev] [PATCH] Check that latitude and longitude are different in ocitysmap2-render |
Date: |
Mon, 30 Apr 2012 09:21:03 +0200 |
Signed-off-by: David MENTRE <address@hidden>
---
ocitysmap2-render | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/ocitysmap2-render b/ocitysmap2-render
index f7006b5..5d615cd 100755
--- a/ocitysmap2-render
+++ b/ocitysmap2-render
@@ -126,6 +126,13 @@ def main():
bbox = BoundingBox.parse_latlon_strtuple(options.bbox)
except ValueError:
parser.error('Invalid bounding box!')
+ # Check that latitude and langitude are different
+ lat1, lon1 = bbox.get_top_left()
+ lat2, lon2 = bbox.get_bottom_right()
+ if lat1 == lat2:
+ parser.error('Same latitude in bounding box corners')
+ if lon1 == lon2:
+ parser.error('Same longitude in bounding box corners')
# Parse OSM id when given
if options.osmid:
--
1.7.5.4
- [Maposmatic-dev] [PATCH] Check that latitude and longitude are different in ocitysmap2-render,
David MENTRE <=