Navit SVN

/work/compile/navit/src/navit/transform.h

00001 
00020 #ifndef NAVIT_TRANSFORM_H
00021 #define NAVIT_TRANSFORM_H
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 #include "coord.h"
00027 
00028 /* prototypes */
00029 enum attr_type;
00030 enum item_type;
00031 enum map_datum;
00032 enum projection;
00033 struct attr;
00034 struct attr_iter;
00035 struct coord;
00036 struct coord_geo;
00037 struct coord_geo_cart;
00038 struct map_selection;
00039 struct pcoord;
00040 struct point;
00041 struct transformation;
00042 struct transformation *transform_new(void);
00043 int transform_get_hog(struct transformation *this_);
00044 void transform_set_hog(struct transformation *this_, int hog);
00045 int transform_get_attr(struct transformation *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
00046 int transform_set_attr(struct transformation *this_, struct attr *attr);
00047 int transformation_get_order_base(struct transformation *this_);
00048 void transform_set_order_base(struct transformation *this_, int order_base);
00049 struct transformation *transform_dup(struct transformation *t);
00050 void transform_to_geo(enum projection pro, struct coord *c, struct coord_geo *g);
00051 void transform_from_geo(enum projection pro, struct coord_geo *g, struct coord *c);
00052 void transform_from_to_count(struct coord *cfrom, enum projection from, struct coord *cto, enum projection to, int count);
00053 void transform_from_to(struct coord *cfrom, enum projection from, struct coord *cto, enum projection to);
00054 void transform_geo_to_cart(struct coord_geo *geo, navit_float a, navit_float b, struct coord_geo_cart *cart);
00055 void transform_cart_to_geo(struct coord_geo_cart *cart, navit_float a, navit_float b, struct coord_geo *geo);
00056 void transform_utm_to_geo(const double UTMEasting, const double UTMNorthing, int ZoneNumber, int NorthernHemisphere, struct coord_geo *geo);
00057 void transform_datum(struct coord_geo *from, enum map_datum from_datum, struct coord_geo *to, enum map_datum to_datum);
00058 int transform(struct transformation *t, enum projection pro, struct coord *c, struct point *p, int count, int mindist, int width, int *width_return);
00059 int transform_reverse(struct transformation *t, struct point *p, struct coord *c);
00060 enum projection transform_get_projection(struct transformation *this_);
00061 void transform_set_projection(struct transformation *this_, enum projection pro);
00062 struct map_selection *transform_get_selection(struct transformation *this_, enum projection pro, int order);
00063 struct coord *transform_center(struct transformation *this_);
00064 struct coord *transform_get_center(struct transformation *this_);
00065 void transform_set_center(struct transformation *this_, struct coord *c);
00066 void transform_set_yaw(struct transformation *t, int yaw);
00067 int transform_get_yaw(struct transformation *this_);
00068 void transform_set_pitch(struct transformation *this_, int pitch);
00069 int transform_get_pitch(struct transformation *this_);
00070 void transform_set_roll(struct transformation *this_, int roll);
00071 int transform_get_roll(struct transformation *this_);
00072 void transform_set_distance(struct transformation *this_, int distance);
00073 int transform_get_distance(struct transformation *this_);
00074 void transform_set_scales(struct transformation *this_, int xscale, int yscale, int wscale);
00075 void transform_set_screen_selection(struct transformation *t, struct map_selection *sel);
00076 void transform_set_screen_center(struct transformation *t, struct point *p);
00077 void transform_get_size(struct transformation *t, int *width, int *height);
00078 void transform_setup(struct transformation *t, struct pcoord *c, int scale, int yaw);
00079 void transform_setup_source_rect(struct transformation *t);
00080 long transform_get_scale(struct transformation *t);
00081 void transform_set_scale(struct transformation *t, long scale);
00082 int transform_get_order(struct transformation *t);
00083 double transform_scale(int y);
00084 double transform_distance(enum projection pro, struct coord *c1, struct coord *c2);
00085 void transform_project(enum projection pro, struct coord *c, int distance, int angle, struct coord *res);
00086 double transform_polyline_length(enum projection pro, struct coord *c, int count);
00087 int transform_distance_sq(struct coord *c1, struct coord *c2);
00088 navit_float transform_distance_sq_float(struct coord *c1, struct coord *c2);
00089 int transform_distance_sq_pc(struct pcoord *c1, struct pcoord *c2);
00090 int transform_distance_line_sq(struct coord *l0, struct coord *l1, struct coord *ref, struct coord *lpnt);
00091 navit_float transform_distance_line_sq_float(struct coord *l0, struct coord *l1, struct coord *ref, struct coord *lpnt);
00092 int transform_distance_polyline_sq(struct coord *c, int count, struct coord *ref, struct coord *lpnt, int *pos);
00093 int transform_douglas_peucker(struct coord *in, int count, int dist_sq, struct coord *out);
00094 int transform_douglas_peucker_float(struct coord *in, int count, navit_float dist_sq, struct coord *out);
00095 void transform_print_deg(double deg);
00096 int transform_get_angle_delta(struct coord *c1, struct coord *c2, int dir);
00097 int transform_within_border(struct transformation *this_, struct point *p, int border);
00098 int transform_within_dist_point(struct coord *ref, struct coord *c, int dist);
00099 int transform_within_dist_line(struct coord *ref, struct coord *c0, struct coord *c1, int dist);
00100 int transform_within_dist_polyline(struct coord *ref, struct coord *c, int count, int close, int dist);
00101 int transform_within_dist_polygon(struct coord *ref, struct coord *c, int count, int dist);
00102 int transform_within_dist_item(struct coord *ref, enum item_type type, struct coord *c, int count, int dist);
00103 void transform_copy(struct transformation *src, struct transformation *dst);
00104 void transform_destroy(struct transformation *t);
00105 /* end of prototypes */
00106 #ifdef __cplusplus
00107 }
00108 #endif
00109 
00110 #endif