]> git.street.me.uk Git - andy/viking.git/commitdiff
Add Inverse TMS to Spherical Mercator VikCoord conversion (top left corner)
authorRob Norris <rw_norris@hotmail.com>
Wed, 3 Dec 2014 01:48:37 +0000 (01:48 +0000)
committerRob Norris <rw_norris@hotmail.com>
Tue, 27 Jan 2015 23:42:54 +0000 (23:42 +0000)
src/maputils.c
src/maputils.h

index 18a79ad245d95212dd4805e8eb5b8d6b931220af..cb0c3ed61456039c2609d3cc0956dedc2defaa02 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * viking -- GPS Data and Topo Analyzer, Explorer, and Manager
  *
- * Copyright (C) 2013, Rob Norris <rw_norris@hotmail.com>
+ * Copyright (C) 2013-2014, Rob Norris <rw_norris@hotmail.com>
  *
  * 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
@@ -143,3 +143,18 @@ void map_utils_iTMS_to_center_vikcoord ( const MapCoord *src, VikCoord *dest )
 {
        _to_vikcoord_with_offset ( src, dest, 0.5 );
 }
+
+/**
+ * map_utils_iTMS_to_vikcoord:
+ * @src:   Original #MapCoord in Inverse TMS format
+ * @dest:  The resulting Spherical Mercator coordinates in #VikCoord
+ *
+ * Convert a #MapCoord in Inverse TMS format into Spherical Mercator coordinates
+ *  (for the top left corner of the Inverse TMS area)
+ *
+ * Returns: whether the conversion was performed
+ */
+void map_utils_iTMS_to_vikcoord ( const MapCoord *src, VikCoord *dest )
+{
+       _to_vikcoord_with_offset ( src, dest, 0.0 );
+}
index efd4e01fdd414dc2c3fe1aa9636faae96e46ef03..6a51dd209787cb42e77f6e6387511cff605c2c71 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * viking -- GPS Data and Topo Analyzer, Explorer, and Manager
  *
- * Copyright (C) 2013, Rob Norris <rw_norris@hotmail.com>
+ * Copyright (C) 2013-2014, Rob Norris <rw_norris@hotmail.com>
  *
  * 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
@@ -40,6 +40,8 @@ gboolean map_utils_vikcoord_to_iTMS ( const VikCoord *src, gdouble xzoom, gdoubl
 
 void map_utils_iTMS_to_center_vikcoord ( const MapCoord *src, VikCoord *dest );
 
+void map_utils_iTMS_to_vikcoord ( const MapCoord *src, VikCoord *dest );
+
 G_BEGIN_DECLS
 
 #endif