[libchamplain] defines: Min/max latitude should be 85.05113
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] defines: Min/max latitude should be 85.05113
- Date: Sun, 30 Aug 2015 23:32:12 +0000 (UTC)
commit 1549c0332ba16d033b315b5341dc2d26377821f4
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Sun Aug 16 23:04:28 2015 +0200
defines: Min/max latitude should be 85.05113
So it seems that the map_source_get_y breaks down when
given values close to +-90. Some googling brought me to the
conclusion that we should have a MIN/MAX latitude of
85.05113, since that is what the Mercator projection
truncates latitude to.
See https://en.wikipedia/wiki/Mercator_projection for
more information,
champlain/champlain-defines.h | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/champlain/champlain-defines.h b/champlain/champlain-defines.h
index d8ad82f..8b6f081 100644
--- a/champlain/champlain-defines.h
+++ b/champlain/champlain-defines.h
@@ -25,8 +25,15 @@
#define CHAMPLAIN_API __attribute__((visibility ("default")))
-#define CHAMPLAIN_MIN_LATITUDE -90.0
-#define CHAMPLAIN_MAX_LATITUDE 90.0
+/*
+ * The ordinate y of the Mercator projection becomes infinite at the poles
+ * and the map must be truncated at some latitude less than ninety degrees.
+ *
+ * Using a square aspect ratio for the map, the maximum latitude shown is
+ * approximately 85.05113 degrees.
+ */
+#define CHAMPLAIN_MIN_LATITUDE -85.05113
+#define CHAMPLAIN_MAX_LATITUDE 85.05113
#define CHAMPLAIN_MIN_LONGITUDE -180.0
#define CHAMPLAIN_MAX_LONGITUDE 180.0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]