geoc-utilities

geoc-utilities — Convenience functions that may be useful.

Synopsis

gchar*              geoc_utilities_find_file            (const gchar *file);
gchar*              geoc_utilities_format_ddmmss        (double value,
                                                         int level,
                                                         gboolean is_lon);

Description

Details

geoc_utilities_find_file ()

gchar*              geoc_utilities_find_file            (const gchar *file);

Looks first relative to the build directory, then looks in the install directory. Use g_free() to free the allocated memory.

file :

The filename.

Returns :

A string with the appropriate path prepended to the filename.

geoc_utilities_format_ddmmss ()

gchar*              geoc_utilities_format_ddmmss        (double value,
                                                         int level,
                                                         gboolean is_lon);

Converts the input value into a string representation of latitude or longitude in degree:minute:second:direction format.

value :

A double precision longitude or latitude coordinate.

level :

How much precision. A value of 2 requests minutes and seconds. A value of 1 requests minutes. A value of zero requests degrees only.

is_lon :

Set to TRUE to request a longitude value, otherwise assume it is a latitude value.

Returns :

A string representation of value. Use g_free() to free the allocated memory.