navit  0.5.3-trunk
coord.c File Reference
#include <stdlib.h>
#include <glib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "debug.h"
#include "item.h"
#include "coord.h"
#include "transform.h"
#include "projection.h"

Functions

struct coordcoord_get (unsigned char **p)
 
struct coordcoord_new (int x, int y)
 
struct coordcoord_new_from_attrs (struct attr *parent, struct attr **attrs)
 
void coord_destroy (struct coord *c)
 
struct coord_rectcoord_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...