| 
    navit
    0.5.3-trunk
    
   | 
 
Functions | |
| struct coord * | coord_get (unsigned char **p) | 
| struct coord * | coord_new (int x, int y) | 
| struct coord * | coord_new_from_attrs (struct attr *parent, struct attr **attrs) | 
| void | coord_destroy (struct coord *c) | 
| struct coord_rect * | coord_rect_new (struct coord *lu, struct coord *rl) | 
| 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) | 
| int | coord_parse (const char *coord_input, enum projection output_projection, struct coord *result) | 
| int | pcoord_parse (const char *c_str, enum projection pro, struct pcoord *pc_ret) | 
| void | coord_print (enum projection pro, struct coord *c, FILE *out) | 
| void | coord_format_with_sep (float lat, float lng, enum coord_format fmt, char *buffer, int size, const char *sep) | 
| Converts a lat/lon into a text formatted text string.  More... | |
| void | coord_format (float lat, float lng, enum coord_format fmt, char *buffer, int size) | 
| Converts a lat/lon into a text formatted text string.  More... | |
| void | coord_geo_format_short (const struct coord_geo *gc, char *buffer, int size, char *sep) | 
| Converts a WGS84 coordinate pair to its string representation.  More... | |
| void | pcoord_format_degree_short (const struct pcoord *pc, char *buffer, int size, char *sep) | 
| Converts an integer mercator coordinate pair to its string representation.  More... | |
| void | pcoord_format_absolute (const struct pcoord *pc, char *buffer, int size, char *sep) | 
| Converts an integer mercator coordinate pair to its string representation.  More... | |
| unsigned int | coord_hash (const void *key) | 
| Generate a hash from a struct coord pointed by key.  More... | |
| int | coord_equal (const void *a, const void *b) | 
| Test if two struct coord structures are equal.  More... | |
Navit, a modular navigation system. Copyright (C) 2005-2008 Navit Team
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
| void coord_destroy | ( | struct coord * | c | ) | 
References c.
Referenced by coord_destroy_py().
| int coord_equal | ( | const void * | a, | 
| const void * | b | ||
| ) | 
Test if two struct coord structures are equal.
| [in] | a | A pointer to the first struct coord | 
| [in] | b | A pointer to the second struct coord | 
Referenced by coord_hash_new(), and destination_equal().
      
  | 
  inline | 
Converts a lat/lon into a text formatted text string.
| lat | The latitude (if lat is 360 or greater, the latitude will be omitted) | |
| lng | The longitude (if lng is 360 or greater, the longitude will be omitted) | |
| fmt | The format to use. 
  | |
| [out] | buffer | A buffer large enough to hold the output + a terminating NUL character (up to 31 bytes) | 
| size | The size of the buffer | 
References coord_format_with_sep(), lat, and size.
| void coord_format_with_sep | ( | float | lat, | 
| float | lng, | ||
| enum coord_format | fmt, | ||
| char * | buffer, | ||
| int | size, | ||
| const char * | sep | ||
| ) | 
Converts a lat/lon into a text formatted text string.
| lat | The latitude (if lat is 360 or greater, the latitude will be omitted) | |
| lng | The longitude (if lng is 360 or greater, the longitude will be omitted) | |
| fmt | The format to use: 
  | |
| [out] | buffer | A buffer large enough to hold the output (bearing in mind '°' uses 2 bytes in UTF-8). Maximum size depends on the format, see values above, and add an extra character for the terminating NUL character | 
| size | The size of the buffer | |
| [in] | sep | The separator to use (if needed) between latitude and longitude (if NULL we will use a space) | 
References DEGREES_DECIMAL, DEGREES_DECIMAL_ABSOLUTE, DEGREES_MINUTES, DEGREES_MINUTES_SECONDS, DEGREES_MINUTES_SECONDS_BRIEF, lat, and size.
Referenced by coord_format(), coord_geo_format_short(), pcoord_format_absolute(), and pcoord_format_degree_short().
      
  | 
  inline | 
Converts a WGS84 coordinate pair to its string representation.
This function takes a coordinate pair with latitude and longitude in degrees and converts them to a string of the form
.
| gc | A WGS84 coordinate pair | |
| [out] | buffer | A buffer large enough to hold the output + a terminating NUL character (at least 25 bytes) | 
| size | The size of the buffer | |
| [in] | sep | The separator to use (if needed) between latitude and longitude (if NULL we will use a space) | 
References coord_format_with_sep(), dbg_assert, DEGREES_MINUTES_SECONDS_BRIEF, coord_geo::lat, coord_geo::lng, and size.
Referenced by gui_internal_append_attr().
| struct coord * coord_get | ( | unsigned char ** | p | ) | 
Get a coordinate
| p | Pointer to the coordinate | 
References p.
Referenced by street_name_number_get(), and street_name_numbers_get().
| unsigned int coord_hash | ( | const void * | key | ) | 
Generate a hash from a struct coord pointed by key.
| [in] | key | A pointer to the struct coord to hash | 
References c, key, pcoord::x, and pcoord::y.
Referenced by coord_hash_new().
| struct coord * coord_new | ( | int | x, | 
| int | y | ||
| ) | 
References c, x, pcoord::x, y, and pcoord::y.
Referenced by coord_new_from_attrs(), coord_new_py(), and update_transformation().
References attr_search(), attr::attrs, coord_new(), attr::num, and attr::u.
Referenced by osd_marker_init().
| int coord_parse | ( | const char * | coord_input, | 
| enum projection | output_projection, | ||
| struct coord * | result | ||
| ) | 
Parses char *coord_input and writes back the coordinates to coord *result, using projection output_projection. *coord_input may specify its projection at the beginning. The format for *coord_input can be: 
| *coord_input | String to be parsed | 
| output_projection | Desired projection of the result | 
| *result | For returning result | 
References c, dbg, coord_geo::lat, lat, coord_geo::lng, lvl_debug, lvl_error, lvl_info, offset, projection_from_name(), projection_mg, projection_none, projection_utm, transform_from_geo(), transform_to_geo(), x, pcoord::x, y, and pcoord::y.
Referenced by attr_new_from_text(), bookmarks_set_center_from_file(), navit_get_coord(), parse_line(), pcoord_parse(), pcoord_py(), and traffic_message_restore_segments().
| void coord_print | ( | enum projection | pro, | 
| struct coord * | c, | ||
| FILE * | out | ||
| ) | 
References c, projection_to_name(), x, pcoord::x, y, and pcoord::y.
Referenced by bookmarks_write_center_to_file().
| int coord_rect_contains | ( | struct coord_rect * | r, | 
| struct coord * | c | ||
| ) | 
References c, dbg_assert, coord_rect::lu, coord_rect::rl, x, pcoord::x, y, and pcoord::y.
Referenced by Backend::get_pois(), NGQPoint::getPOI(), gui_internal_cmd_pois(), town_get(), and traffic_traff_android_position_callback().
| void coord_rect_destroy | ( | struct coord_rect * | r | ) | 
Referenced by coord_rect_destroy_py().
| void coord_rect_extend | ( | struct coord_rect * | r, | 
| struct coord * | c | ||
| ) | 
References c, coord_rect::lu, coord_rect::rl, x, pcoord::x, y, and pcoord::y.
Referenced by binmap_search_get_item(), binmap_search_street_by_place(), gui_internal_cmd2_route_height_profile(), item_get_heightline(), map_route_occluded_bbox(), map_selection_contains_item_rect(), navit_populate_search_results_map(), navit_zoom_to_route(), route_calc_selection(), and transform_setup_source_rect().
| struct coord_rect * coord_rect_new | ( | struct coord * | lu, | 
| struct coord * | rl | ||
| ) | 
References dbg_assert, coord_rect::lu, coord_rect::rl, x, and y.
Referenced by coord_rect_new_py().
| int coord_rect_overlap | ( | struct coord_rect * | r1, | 
| struct coord_rect * | r2 | ||
| ) | 
References dbg, dbg_assert, coord_rect::lu, lvl_debug, coord_rect::rl, x, and y.
Referenced by block_init(), block_next(), block_next_lin(), gui_internal_cmd2_route_height_profile(), map_download_selection_check(), poly_get(), selection_contains(), tm_rect_new(), and traffic_process_messages_int().
      
  | 
  inline | 
Converts an integer mercator coordinate pair to its string representation.
This function takes a coordinate pair, transforms it to WGS84 and converts it to a string of the form
.
| pc | Coordinates as integer mercator | |
| [out] | buffer | A buffer large enough to hold the output + a terminating NUL character (at least 23 bytes) | 
| size | The size of the buffer | |
| [in] | sep | The separator to use (if needed) between latitude and longitude (if NULL we will use a space) | 
References c, coord_format_with_sep(), dbg_assert, DEGREES_DECIMAL_ABSOLUTE, coord_geo::lat, coord_geo::lng, pcoord::pro, size, transform_to_geo(), pcoord::x, and pcoord::y.
Referenced by Java_org_navitproject_navit_NavitGraphics_getCoordForPoint().
      
  | 
  inline | 
Converts an integer mercator coordinate pair to its string representation.
This function takes a coordinate pair, transforms it to WGS84 and converts it to a string of the form
.
| pc | Coordinates as integer mercator | |
| [out] | buffer | A buffer large enough to hold the output + a terminating NUL character (at least 25 bytes) | 
| size | The size of the buffer | |
| [in] | sep | The separator to use (if needed) between latitude and longitude (if NULL we will use a space) | 
References c, coord_format_with_sep(), dbg_assert, DEGREES_MINUTES_SECONDS_BRIEF, coord_geo::lat, coord_geo::lng, pcoord::pro, size, transform_to_geo(), pcoord::x, and pcoord::y.
Referenced by gui_internal_cmd_position_do(), Java_org_navitproject_navit_NavitCallbackHandler_callbackMessageChannel(), and Java_org_navitproject_navit_NavitGraphics_getCoordForPoint().
| int pcoord_parse | ( | const char * | c_str, | 
| enum projection | pro, | ||
| struct pcoord * | pc_ret | ||
| ) | 
A wrapper for coord_parse that also returns the projection. For parameters see coord_parse.
References c, coord_parse(), pcoord::pro, pcoord::x, and pcoord::y.
Referenced by gui_internal_cmd_enter_coord_do(), and pcoord_get_from_message().