navit 0.5.3-trunk
Loading...
Searching...
No Matches
projection.c File Reference
#include <string.h>
#include <glib.h>
#include <ctype.h>
#include "coord.h"
#include "debug.h"
#include "projection.h"

Data Structures

struct  projection_name
 

Functions

static int utmref_letter (char l)
 
enum projection projection_from_name (const char *name, struct coord *utm_offset)
 
char * projection_to_name (enum projection proj)
 

Variables

struct projection_name projection_names []
 

Function Documentation

◆ projection_from_name()

enum projection projection_from_name ( const char *  name,
struct coord utm_offset 
)

Look up a projection by name.

Parameters
namename of projection to look up (values from projection_names, and UTM projections) @utm_offset Only for UTM projections: Used to return the offset for the UTM projection
Returns
projection, or projection_none if no projection could be determined

References dbg, lvl_debug, lvl_error, name, projection_names, projection_none, projection_utm, utmref_letter(), coord::x, and coord::y.

Referenced by coord_parse(), and map_new_shapefile().

◆ projection_to_name()

char * projection_to_name ( enum projection  proj)

◆ utmref_letter()

static int utmref_letter ( char  l)
static

Referenced by projection_from_name().

Variable Documentation

◆ projection_names

struct projection_name projection_names[]
Initial value:
= {
{projection_mg, "mg"},
{projection_garmin, "garmin"},
{projection_utm, "utm"},
}
@ projection_none
Definition projection.h:24
@ projection_garmin
Definition projection.h:26
@ projection_mg
Definition projection.h:25
@ projection_utm
Definition projection.h:28

Referenced by projection_from_name(), and projection_to_name().