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