X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/50a14534a51f892500ee82f867e8ab2f85b936ae..0b2bfa088d539a7c0fcc3ba7baec6e523f587910:/src/coords.h diff --git a/src/coords.h b/src/coords.h index baaf21aa..0bf335fd 100644 --- a/src/coords.h +++ b/src/coords.h @@ -35,6 +35,8 @@ renaming functions and defining LatLon and UTM structs. #ifndef _VIKING_COORDS_H #define _VIKING_COORDS_H +#include + 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