diff options
author | steven_s <steven_s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-11-09 16:13:30 +0000 |
---|---|---|
committer | steven_s <steven_s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-11-09 16:13:30 +0000 |
commit | 8954e9545767cd8319e122d01ba5f51753d1f3ad (patch) | |
tree | baa2bae9967cb6f7c2c4db921b909189bc08e08b /navit/coord.h | |
parent | 7442c65338e40a5742b835977f5cfe598aff5fda (diff) | |
download | navit-8954e9545767cd8319e122d01ba5f51753d1f3ad.tar.gz |
Patch:core:Added geo coordinate formatting function that supports multiple formats |
Replacing local geoformatting with calls to this function.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1709 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/coord.h')
-rw-r--r-- | navit/coord.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/navit/coord.h b/navit/coord.h index 3ffef902c..d5546b145 100644 --- a/navit/coord.h +++ b/navit/coord.h @@ -59,6 +59,30 @@ struct coord_geo_cart { double z; /*!< Z-Value */ }; +/** + * An enumeration of formats for printing geographic coordinates in. + * + */ +enum coord_format +{ + /** + * Degrees with decimal places. + * Ie 20.5000 N 110.5000 E + */ + DEGREES_DECIMAL, + + /** + * Degrees and minutes. + * ie 20 30.00 N 110 30.00 E + */ + DEGREES_MINUTES, + /** + * Degrees, minutes and seconds. + * ie 20 30 30.00 N 110 30 30 E + */ + DEGREES_MINUTES_SECONDS +}; + enum projection; struct attr; @@ -73,6 +97,6 @@ void coord_rect_destroy(struct coord_rect *r); int coord_rect_overlap(struct coord_rect *r1, struct coord_rect *r2); int coord_rect_contains(struct coord_rect *r, struct coord *c); void coord_rect_extend(struct coord_rect *r, struct coord *c); - +void coord_format(float lat,float lng, enum coord_format, char * buffer, int size); #endif |