]> git.street.me.uk Git - andy/viking.git/blobdiff - src/coords.h
Add menu item for help contents
[andy/viking.git] / src / coords.h
index baaf21aa90a5ba7a49dc9039bec125775c34e997..0bf335fd258000062508ff9465f1a92f71f15d9f 100644 (file)
@@ -35,6 +35,8 @@ renaming functions and defining LatLon and UTM structs.
 #ifndef _VIKING_COORDS_H
 #define _VIKING_COORDS_H
 
+#include <glib.h>
+
 struct UTM {
   gdouble northing;
   gdouble easting;
@@ -53,5 +55,21 @@ void a_coords_utm_to_latlon ( const struct UTM *utm, struct LatLon *latlon );
 double a_coords_utm_diff( const struct UTM *utm1, const struct UTM *utm2 );
 double a_coords_latlon_diff ( const struct LatLon *ll1, const struct LatLon *ll2 );
 
+/**
+ * Convert a double to a string WITHOUT LOCALE.
+ *
+ * Following GPX specifications, decimal values are xsd:decimal
+ * So, they must use the period separator, not the localized one.
+ *
+ * The returned value must be freed by g_free.
+ */
+char *a_coords_dtostr ( double d );
+
+/**
+ * Convert a LatLon to strings.
+ *
+ * Use the prefered representation.
+ */
+void a_coords_latlon_to_string ( const struct LatLon *latlon, gchar **lat, gchar **lon );
 
 #endif