]> git.street.me.uk Git - andy/viking.git/blobdiff - src/coords.h
Add Waypoint List dialog.
[andy/viking.git] / src / coords.h
index baaf21aa90a5ba7a49dc9039bec125775c34e997..390963c7c6d440ad4476b92527f2ae94aa853277 100644 (file)
@@ -35,6 +35,10 @@ renaming functions and defining LatLon and UTM structs.
 #ifndef _VIKING_COORDS_H
 #define _VIKING_COORDS_H
 
+#include <glib.h>
+
+G_BEGIN_DECLS
+
 struct UTM {
   gdouble northing;
   gdouble easting;
@@ -53,5 +57,23 @@ 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 );
+
+G_END_DECLS
 
 #endif