From ba8c7a19f05f6491eb7f191d44a5af8506f619cf Mon Sep 17 00:00:00 2001 From: martin-s Date: Fri, 2 Dec 2005 10:41:56 +0000 Subject: Reorganisation git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@8 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 transform.h (limited to 'transform.h') diff --git a/transform.h b/transform.h new file mode 100644 index 00000000..fe0a0f23 --- /dev/null +++ b/transform.h @@ -0,0 +1,37 @@ +#ifndef TRANSFORM_H +#define TRANSFORM_H + +#include "point.h" + +struct transformation { + int width; /* Height of destination rectangle */ + int height; /* Width of destination rectangle */ + long scale; /* Scale factor */ + int angle; /* Rotation angle */ + double cos_val,sin_val; /* cos and sin of rotation angle */ + struct coord rect[2]; /* Source rectangle */ + struct coord center; /* Center of source rectangle */ +}; + +int transform(struct transformation *t, struct coord *c, struct point *p); +int is_visible(struct transformation *t, struct coord *c); +int is_too_small(struct transformation *t, struct coord *c, int limit); +void transform_lng_lat(struct coord *c, struct coord_geo *g); +void transform_reverse(struct transformation *t, struct point *p, struct coord *c); +void transform_print_deg(double deg); +double transform_scale(int y); +double transform_distance(struct coord *c1, struct coord *c2); +int transform_distance_sq(struct coord *c1, struct coord *c2); +int transform_distance_line_sq(struct coord *l0, struct coord *l1, struct coord *ref, struct coord *lpnt); + +void transform_mercator(double *lng, double *lat, struct coord *c); +int is_point_visible(struct transformation *t, struct coord *c); +int transform_get_scale(struct transformation *t); +void transform_setup_source_rect(struct transformation *t); +void transform_set_angle(struct transformation *t,int angle); +void transform_setup(struct transformation *t, int x, int y, int scale, int angle); +void transform_setup_source_rect_limit(struct transformation *t, struct coord *center, int limit); +void transform_geo_text(struct coord_geo *g, char *buffer); + + +#endif -- cgit v1.2.1 From 1226f5d4a7856cd3aad90fb7e10990669c53847e Mon Sep 17 00:00:00 2001 From: martin-s Date: Sun, 1 Jan 2006 23:11:16 +0000 Subject: First try on tracking git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@49 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'transform.h') diff --git a/transform.h b/transform.h index fe0a0f23..7e509355 100644 --- a/transform.h +++ b/transform.h @@ -15,6 +15,7 @@ struct transformation { int transform(struct transformation *t, struct coord *c, struct point *p); int is_visible(struct transformation *t, struct coord *c); +int is_line_visible(struct transformation *t, struct coord *c); int is_too_small(struct transformation *t, struct coord *c, int limit); void transform_lng_lat(struct coord *c, struct coord_geo *g); void transform_reverse(struct transformation *t, struct point *p, struct coord *c); @@ -32,6 +33,6 @@ void transform_set_angle(struct transformation *t,int angle); void transform_setup(struct transformation *t, int x, int y, int scale, int angle); void transform_setup_source_rect_limit(struct transformation *t, struct coord *center, int limit); void transform_geo_text(struct coord_geo *g, char *buffer); - +void transform_limit_extend(struct coord *rect, struct coord *c); #endif -- cgit v1.2.1 From c695377efc4881279211c6e19115e09739c503fa Mon Sep 17 00:00:00 2001 From: horwitz Date: Tue, 3 Jan 2006 22:20:09 +0000 Subject: improve memory allocation und fix some warnings git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@57 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 1 + 1 file changed, 1 insertion(+) (limited to 'transform.h') diff --git a/transform.h b/transform.h index 7e509355..f2099d25 100644 --- a/transform.h +++ b/transform.h @@ -34,5 +34,6 @@ void transform_setup(struct transformation *t, int x, int y, int scale, int angl void transform_setup_source_rect_limit(struct transformation *t, struct coord *center, int limit); void transform_geo_text(struct coord_geo *g, char *buffer); void transform_limit_extend(struct coord *rect, struct coord *c); +int transform_get_angle(struct coord *c, int dir); #endif -- cgit v1.2.1 From d71e49df9261a6968e7ffab33c6306914ac1d1c0 Mon Sep 17 00:00:00 2001 From: martin-s Date: Wed, 4 Jul 2007 22:44:46 +0000 Subject: Merge with modular_map git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@255 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 72 ++++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 32 deletions(-) (limited to 'transform.h') diff --git a/transform.h b/transform.h index f2099d25..6c9059e1 100644 --- a/transform.h +++ b/transform.h @@ -1,39 +1,47 @@ -#ifndef TRANSFORM_H -#define TRANSFORM_H - -#include "point.h" - -struct transformation { - int width; /* Height of destination rectangle */ - int height; /* Width of destination rectangle */ - long scale; /* Scale factor */ - int angle; /* Rotation angle */ - double cos_val,sin_val; /* cos and sin of rotation angle */ - struct coord rect[2]; /* Source rectangle */ - struct coord center; /* Center of source rectangle */ -}; - -int transform(struct transformation *t, struct coord *c, struct point *p); -int is_visible(struct transformation *t, struct coord *c); -int is_line_visible(struct transformation *t, struct coord *c); -int is_too_small(struct transformation *t, struct coord *c, int limit); -void transform_lng_lat(struct coord *c, struct coord_geo *g); +#ifdef __cplusplus +extern "C" { +#endif +/* prototypes */ +enum projection; +struct coord; +struct coord_geo; +struct coord_rect; +struct point; +struct transformation; +struct transformation *transform_new(void); +void transform_to_geo(enum projection pro, struct coord *c, struct coord_geo *g); +void transform_from_geo(enum projection pro, struct coord_geo *g, struct coord *c); +int transform(struct transformation *t, enum projection pro, struct coord *c, struct point *p); void transform_reverse(struct transformation *t, struct point *p, struct coord *c); -void transform_print_deg(double deg); +enum projection transform_get_projection(struct transformation *this_); +void transform_set_projection(struct transformation *this_, enum projection pro); +void transform_rect(struct transformation *this_, enum projection pro, struct coord_rect *r); +struct coord *transform_center(struct transformation *this_); +int transform_contains(struct transformation *this_, enum projection pro, struct coord_rect *r); +void transform_set_angle(struct transformation *t, int angle); +int transform_get_angle(struct transformation *this_, int angle); +void transform_set_size(struct transformation *t, int width, int height); +void transform_get_size(struct transformation *t, int *width, int *height); +void transform_setup(struct transformation *t, struct coord *c, int scale, int angle); +void transform_setup_source_rect_limit(struct transformation *t, struct coord *center, int limit); +void transform_setup_source_rect(struct transformation *t); +long transform_get_scale(struct transformation *t); +void transform_set_scale(struct transformation *t, long scale); +int transform_get_order(struct transformation *t); +void transform_geo_text(struct coord_geo *g, char *buffer); double transform_scale(int y); double transform_distance(struct coord *c1, struct coord *c2); int transform_distance_sq(struct coord *c1, struct coord *c2); int transform_distance_line_sq(struct coord *l0, struct coord *l1, struct coord *ref, struct coord *lpnt); - -void transform_mercator(double *lng, double *lat, struct coord *c); +int transform_distance_polyline_sq(struct coord *c, int count, struct coord *ref, struct coord *lpnt, int *pos); +void transform_print_deg(double deg); +int is_visible(struct transformation *t, struct coord *c); +int is_line_visible(struct transformation *t, struct coord *c); int is_point_visible(struct transformation *t, struct coord *c); -int transform_get_scale(struct transformation *t); -void transform_setup_source_rect(struct transformation *t); -void transform_set_angle(struct transformation *t,int angle); -void transform_setup(struct transformation *t, int x, int y, int scale, int angle); -void transform_setup_source_rect_limit(struct transformation *t, struct coord *center, int limit); -void transform_geo_text(struct coord_geo *g, char *buffer); -void transform_limit_extend(struct coord *rect, struct coord *c); -int transform_get_angle(struct coord *c, int dir); - +int is_too_small(struct transformation *t, struct coord *c, int limit); +int transform_get_angle_delta(struct coord *c1, struct coord *c2, int dir); +int transform_within_border(struct transformation *this_, struct point *p, int border); +/* end of prototypes */ +#ifdef __cplusplus +} #endif -- cgit v1.2.1 From cceba11d6878f17731d88d820a05b7448b1fd2fc Mon Sep 17 00:00:00 2001 From: kazer_ Date: Tue, 9 Oct 2007 16:48:44 +0000 Subject: Added include checks git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@448 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'transform.h') diff --git a/transform.h b/transform.h index 6c9059e1..ec0402d4 100644 --- a/transform.h +++ b/transform.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_TRANSFORM_H +#define NAVIT_TRANSFORM_H + #ifdef __cplusplus extern "C" { #endif @@ -45,3 +48,5 @@ int transform_within_border(struct transformation *this_, struct point *p, int b #ifdef __cplusplus } #endif + +#endif -- cgit v1.2.1 From 47b26372d8e3ef643b4903762c31e140a7628580 Mon Sep 17 00:00:00 2001 From: zaxl Date: Mon, 19 Nov 2007 10:41:32 +0000 Subject: Teach transform_distance about other projections git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@565 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'transform.h') diff --git a/transform.h b/transform.h index ec0402d4..593c8eeb 100644 --- a/transform.h +++ b/transform.h @@ -33,7 +33,7 @@ void transform_set_scale(struct transformation *t, long scale); int transform_get_order(struct transformation *t); void transform_geo_text(struct coord_geo *g, char *buffer); double transform_scale(int y); -double transform_distance(struct coord *c1, struct coord *c2); +double transform_distance(enum projection pro, struct coord *c1, struct coord *c2); int transform_distance_sq(struct coord *c1, struct coord *c2); int transform_distance_line_sq(struct coord *l0, struct coord *l1, struct coord *ref, struct coord *lpnt); int transform_distance_polyline_sq(struct coord *c, int count, struct coord *ref, struct coord *lpnt, int *pos); -- cgit v1.2.1 From 01e6907fbe9a5395a7040a051281830e690a41bf Mon Sep 17 00:00:00 2001 From: zaxl Date: Mon, 19 Nov 2007 19:58:19 +0000 Subject: Create struct pcoord containing the projection. Use it to propagate destinations/positions to route code. Use it to create the navit's instance. Use it in search structs so when you have the targets coordinates you know what projection they are. - SDL have to be fixed, GTK uses coordinates for lists data, SDL not. Fix memory leak when using route_rect, it allocates map_selection but users didn't free it. search_list_town/search_list_streets allocate the coordinate but do not free it - fixed. Store and read the projections in/from destinations.txt. git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@568 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'transform.h') diff --git a/transform.h b/transform.h index 593c8eeb..43e7cab0 100644 --- a/transform.h +++ b/transform.h @@ -7,6 +7,7 @@ extern "C" { /* prototypes */ enum projection; struct coord; +struct pcoord; struct coord_geo; struct coord_rect; struct point; @@ -25,7 +26,7 @@ void transform_set_angle(struct transformation *t, int angle); int transform_get_angle(struct transformation *this_, int angle); void transform_set_size(struct transformation *t, int width, int height); void transform_get_size(struct transformation *t, int *width, int *height); -void transform_setup(struct transformation *t, struct coord *c, int scale, int angle); +void transform_setup(struct transformation *t, struct pcoord *c, int scale, int angle); void transform_setup_source_rect_limit(struct transformation *t, struct coord *center, int limit); void transform_setup_source_rect(struct transformation *t); long transform_get_scale(struct transformation *t); -- cgit v1.2.1 From eadf55c249088f195fe59f766b3d10d35c8420c2 Mon Sep 17 00:00:00 2001 From: zaxl Date: Thu, 22 Nov 2007 19:37:27 +0000 Subject: Route code emulates a map driver to draw the route path, coordinates are cached in the route_path_segment. This will also allow to easy debuging of routing code. Fix route clear to avoid double free. Route supports roads with segments contained in one item. Route supports the map projections. Implement transform_array - saves function calls and fpu start/stop Get all coordinates with one call for polygons and lines, so item_get_coord with more than one coordinate is now used. Reorder do_draw_map, separated from do_draw, so it checks if the item is contained in the selection before transforming coordinates. Tune a bit calculation of route_point's hash value. git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@577 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 1 + 1 file changed, 1 insertion(+) (limited to 'transform.h') diff --git a/transform.h b/transform.h index 43e7cab0..d2a40047 100644 --- a/transform.h +++ b/transform.h @@ -16,6 +16,7 @@ struct transformation *transform_new(void); void transform_to_geo(enum projection pro, struct coord *c, struct coord_geo *g); void transform_from_geo(enum projection pro, struct coord_geo *g, struct coord *c); int transform(struct transformation *t, enum projection pro, struct coord *c, struct point *p); +int transform_array(struct transformation *t, enum projection pro, struct coord *c, struct point *p, int count, int uniq); void transform_reverse(struct transformation *t, struct point *p, struct coord *c); enum projection transform_get_projection(struct transformation *this_); void transform_set_projection(struct transformation *this_, enum projection pro); -- cgit v1.2.1 From 361120cf1717d302e98c998c4ad10d67245641e9 Mon Sep 17 00:00:00 2001 From: martin-s Date: Thu, 20 Dec 2007 20:39:48 +0000 Subject: Made viewport more flexible git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@656 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'transform.h') diff --git a/transform.h b/transform.h index d2a40047..b49485e7 100644 --- a/transform.h +++ b/transform.h @@ -7,28 +7,21 @@ extern "C" { /* prototypes */ enum projection; struct coord; -struct pcoord; struct coord_geo; -struct coord_rect; +struct map_selection; struct point; struct transformation; struct transformation *transform_new(void); void transform_to_geo(enum projection pro, struct coord *c, struct coord_geo *g); void transform_from_geo(enum projection pro, struct coord_geo *g, struct coord *c); -int transform(struct transformation *t, enum projection pro, struct coord *c, struct point *p); -int transform_array(struct transformation *t, enum projection pro, struct coord *c, struct point *p, int count, int uniq); +int transform(struct transformation *t, enum projection pro, struct coord *c, struct point *p, int count, int flags); void transform_reverse(struct transformation *t, struct point *p, struct coord *c); enum projection transform_get_projection(struct transformation *this_); void transform_set_projection(struct transformation *this_, enum projection pro); -void transform_rect(struct transformation *this_, enum projection pro, struct coord_rect *r); struct coord *transform_center(struct transformation *this_); -int transform_contains(struct transformation *this_, enum projection pro, struct coord_rect *r); void transform_set_angle(struct transformation *t, int angle); int transform_get_angle(struct transformation *this_, int angle); -void transform_set_size(struct transformation *t, int width, int height); -void transform_get_size(struct transformation *t, int *width, int *height); -void transform_setup(struct transformation *t, struct pcoord *c, int scale, int angle); -void transform_setup_source_rect_limit(struct transformation *t, struct coord *center, int limit); +void transform_set_screen_selection(struct transformation *t, struct map_selection *sel); void transform_setup_source_rect(struct transformation *t); long transform_get_scale(struct transformation *t); void transform_set_scale(struct transformation *t, long scale); @@ -40,9 +33,9 @@ int transform_distance_sq(struct coord *c1, struct coord *c2); int transform_distance_line_sq(struct coord *l0, struct coord *l1, struct coord *ref, struct coord *lpnt); int transform_distance_polyline_sq(struct coord *c, int count, struct coord *ref, struct coord *lpnt, int *pos); void transform_print_deg(double deg); -int is_visible(struct transformation *t, struct coord *c); -int is_line_visible(struct transformation *t, struct coord *c); -int is_point_visible(struct transformation *t, struct coord *c); +int transform_contains_polygon(struct transformation *t, struct coord *c, int count); +int transform_contains_polyline(struct transformation *t, struct coord *c, int count); +int transform_contains_point(struct transformation *t, struct coord *c); int is_too_small(struct transformation *t, struct coord *c, int limit); int transform_get_angle_delta(struct coord *c1, struct coord *c2, int dir); int transform_within_border(struct transformation *this_, struct point *p, int border); -- cgit v1.2.1 From 2fc8227a296d290ca83ed0085cc7c7c9f2b28a5a Mon Sep 17 00:00:00 2001 From: martin-s Date: Thu, 20 Dec 2007 21:17:44 +0000 Subject: More bugfixes git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@658 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'transform.h') diff --git a/transform.h b/transform.h index b49485e7..d06075bd 100644 --- a/transform.h +++ b/transform.h @@ -9,6 +9,7 @@ enum projection; struct coord; struct coord_geo; struct map_selection; +struct pcoord; struct point; struct transformation; struct transformation *transform_new(void); @@ -18,10 +19,13 @@ int transform(struct transformation *t, enum projection pro, struct coord *c, st void transform_reverse(struct transformation *t, struct point *p, struct coord *c); enum projection transform_get_projection(struct transformation *this_); void transform_set_projection(struct transformation *this_, enum projection pro); +struct map_selection *transform_get_selection(struct transformation *this_, enum projection pro, int order); struct coord *transform_center(struct transformation *this_); void transform_set_angle(struct transformation *t, int angle); int transform_get_angle(struct transformation *this_, int angle); void transform_set_screen_selection(struct transformation *t, struct map_selection *sel); +void transform_get_size(struct transformation *t, int *width, int *height); +void transform_setup(struct transformation *t, struct pcoord *c, int scale, int angle); void transform_setup_source_rect(struct transformation *t); long transform_get_scale(struct transformation *t); void transform_set_scale(struct transformation *t, long scale); @@ -33,10 +37,6 @@ int transform_distance_sq(struct coord *c1, struct coord *c2); int transform_distance_line_sq(struct coord *l0, struct coord *l1, struct coord *ref, struct coord *lpnt); int transform_distance_polyline_sq(struct coord *c, int count, struct coord *ref, struct coord *lpnt, int *pos); void transform_print_deg(double deg); -int transform_contains_polygon(struct transformation *t, struct coord *c, int count); -int transform_contains_polyline(struct transformation *t, struct coord *c, int count); -int transform_contains_point(struct transformation *t, struct coord *c); -int is_too_small(struct transformation *t, struct coord *c, int limit); int transform_get_angle_delta(struct coord *c1, struct coord *c2, int dir); int transform_within_border(struct transformation *this_, struct point *p, int border); /* end of prototypes */ -- cgit v1.2.1 From b551dae24d7b3f8c81d9a8167fbfa3a2c4a2b1b4 Mon Sep 17 00:00:00 2001 From: martin-s Date: Sat, 5 Jan 2008 22:46:19 +0000 Subject: Add:Core:Added graph segments to route graph map git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@723 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 1 + 1 file changed, 1 insertion(+) (limited to 'transform.h') diff --git a/transform.h b/transform.h index d06075bd..b47a268c 100644 --- a/transform.h +++ b/transform.h @@ -15,6 +15,7 @@ struct transformation; struct transformation *transform_new(void); void transform_to_geo(enum projection pro, struct coord *c, struct coord_geo *g); void transform_from_geo(enum projection pro, struct coord_geo *g, struct coord *c); +void transform_from_to(struct coord *cfrom, enum projection from, struct coord *cto, enum projection to); int transform(struct transformation *t, enum projection pro, struct coord *c, struct point *p, int count, int flags); void transform_reverse(struct transformation *t, struct point *p, struct coord *c); enum projection transform_get_projection(struct transformation *this_); -- cgit v1.2.1 From cf57c17b71bf495f4048479c56f5db8fb6a47142 Mon Sep 17 00:00:00 2001 From: horwitz Date: Thu, 5 Jun 2008 21:56:14 +0000 Subject: Add license files and headers git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@1100 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'transform.h') diff --git a/transform.h b/transform.h index b47a268c..6fcfce07 100644 --- a/transform.h +++ b/transform.h @@ -1,3 +1,22 @@ +/** + * 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 Library 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 Library General Public License for more details. + * + * You should have received a copy of the GNU Library 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. + */ + #ifndef NAVIT_TRANSFORM_H #define NAVIT_TRANSFORM_H -- cgit v1.2.1 From fdc56911dfb16016ba8bfdf8822bbce5be5c9a7f Mon Sep 17 00:00:00 2001 From: martin-s Date: Thu, 19 Jun 2008 21:18:22 +0000 Subject: Add:gui_internal:On-Screen-Keyboard now works partly git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@1150 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'transform.h') diff --git a/transform.h b/transform.h index 6fcfce07..d305ea79 100644 --- a/transform.h +++ b/transform.h @@ -24,9 +24,12 @@ extern "C" { #endif /* prototypes */ +enum item_type; +enum map_datum; enum projection; struct coord; struct coord_geo; +struct coord_geo_cart; struct map_selection; struct pcoord; struct point; @@ -35,7 +38,10 @@ struct transformation *transform_new(void); void transform_to_geo(enum projection pro, struct coord *c, struct coord_geo *g); void transform_from_geo(enum projection pro, struct coord_geo *g, struct coord *c); void transform_from_to(struct coord *cfrom, enum projection from, struct coord *cto, enum projection to); -int transform(struct transformation *t, enum projection pro, struct coord *c, struct point *p, int count, int flags); +void transform_geo_to_cart(struct coord_geo *geo, double a, double b, struct coord_geo_cart *cart); +void transform_cart_to_geo(struct coord_geo_cart *cart, double a, double b, struct coord_geo *geo); +void transform_datum(struct coord_geo *from, enum map_datum from_datum, struct coord_geo *to, enum map_datum to_datum); +int transform(struct transformation *t, enum projection pro, struct coord *c, struct point *p, int count, int unique); void transform_reverse(struct transformation *t, struct point *p, struct coord *c); enum projection transform_get_projection(struct transformation *this_); void transform_set_projection(struct transformation *this_, enum projection pro); @@ -59,6 +65,11 @@ int transform_distance_polyline_sq(struct coord *c, int count, struct coord *ref void transform_print_deg(double deg); int transform_get_angle_delta(struct coord *c1, struct coord *c2, int dir); int transform_within_border(struct transformation *this_, struct point *p, int border); +int transform_within_dist_point(struct coord *ref, struct coord *c, int dist); +int transform_within_dist_line(struct coord *ref, struct coord *c0, struct coord *c1, int dist); +int transform_within_dist_polyline(struct coord *ref, struct coord *c, int count, int close, int dist); +int transform_within_dist_polygon(struct coord *ref, struct coord *c, int count, int dist); +int transform_within_dist_item(struct coord *ref, enum item_type type, struct coord *c, int count, int dist); /* end of prototypes */ #ifdef __cplusplus } -- cgit v1.2.1 From ad0445388c0fcf4a2d6fd4ebe73ae0770f862565 Mon Sep 17 00:00:00 2001 From: martin-s Date: Fri, 22 Aug 2008 19:21:49 +0000 Subject: Fix:Core:Reworked routing code a bit git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@1302 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 1 + 1 file changed, 1 insertion(+) (limited to 'transform.h') diff --git a/transform.h b/transform.h index d305ea79..e770df3c 100644 --- a/transform.h +++ b/transform.h @@ -59,6 +59,7 @@ int transform_get_order(struct transformation *t); void transform_geo_text(struct coord_geo *g, char *buffer); double transform_scale(int y); double transform_distance(enum projection pro, struct coord *c1, struct coord *c2); +double transform_polyline_length(enum projection pro, struct coord *c, int count); int transform_distance_sq(struct coord *c1, struct coord *c2); int transform_distance_line_sq(struct coord *l0, struct coord *l1, struct coord *ref, struct coord *lpnt); int transform_distance_polyline_sq(struct coord *c, int count, struct coord *ref, struct coord *lpnt, int *pos); -- cgit v1.2.1 From 90263658c3aa353c4e8eeb295a6b9375cb726b9c Mon Sep 17 00:00:00 2001 From: martin-s Date: Thu, 6 Nov 2008 21:46:19 +0000 Subject: Fix:Core:Fix some compile warnings git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@1663 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'transform.h') diff --git a/transform.h b/transform.h index e770df3c..66eba913 100644 --- a/transform.h +++ b/transform.h @@ -50,6 +50,7 @@ struct coord *transform_center(struct transformation *this_); void transform_set_angle(struct transformation *t, int angle); int transform_get_angle(struct transformation *this_, int angle); void transform_set_screen_selection(struct transformation *t, struct map_selection *sel); +void transform_set_screen_center(struct transformation *t, struct point *p); void transform_get_size(struct transformation *t, int *width, int *height); void transform_setup(struct transformation *t, struct pcoord *c, int scale, int angle); void transform_setup_source_rect(struct transformation *t); @@ -71,6 +72,7 @@ int transform_within_dist_line(struct coord *ref, struct coord *c0, struct coord int transform_within_dist_polyline(struct coord *ref, struct coord *c, int count, int close, int dist); int transform_within_dist_polygon(struct coord *ref, struct coord *c, int count, int dist); int transform_within_dist_item(struct coord *ref, enum item_type type, struct coord *c, int count, int dist); +void transform_destroy(struct transformation *t); /* end of prototypes */ #ifdef __cplusplus } -- cgit v1.2.1 From 7b8f6589de23a307491e5b55996a931a6750980b Mon Sep 17 00:00:00 2001 From: zaxl Date: Fri, 7 Nov 2008 22:48:26 +0000 Subject: Core:fix: Projections support in tracking| Now garmin maps with tracking=1 are displayed ok. git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@1681 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 1 + 1 file changed, 1 insertion(+) (limited to 'transform.h') diff --git a/transform.h b/transform.h index 66eba913..21f92965 100644 --- a/transform.h +++ b/transform.h @@ -62,6 +62,7 @@ double transform_scale(int y); double transform_distance(enum projection pro, struct coord *c1, struct coord *c2); double transform_polyline_length(enum projection pro, struct coord *c, int count); int transform_distance_sq(struct coord *c1, struct coord *c2); +int transform_distance_sq_pc(struct pcoord *c1, struct pcoord *c2); int transform_distance_line_sq(struct coord *l0, struct coord *l1, struct coord *ref, struct coord *lpnt); int transform_distance_polyline_sq(struct coord *c, int count, struct coord *ref, struct coord *lpnt, int *pos); void transform_print_deg(double deg); -- cgit v1.2.1 From 52ad2d1d9143a3f5f05002a4f6c25b98ae676a43 Mon Sep 17 00:00:00 2001 From: steven_s Date: Sun, 9 Nov 2008 16:13:30 +0000 Subject: 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/navit@1709 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 1 - 1 file changed, 1 deletion(-) (limited to 'transform.h') diff --git a/transform.h b/transform.h index 21f92965..138a2183 100644 --- a/transform.h +++ b/transform.h @@ -57,7 +57,6 @@ void transform_setup_source_rect(struct transformation *t); long transform_get_scale(struct transformation *t); void transform_set_scale(struct transformation *t, long scale); int transform_get_order(struct transformation *t); -void transform_geo_text(struct coord_geo *g, char *buffer); double transform_scale(int y); double transform_distance(enum projection pro, struct coord *c1, struct coord *c2); double transform_polyline_length(enum projection pro, struct coord *c, int count); -- cgit v1.2.1 From 0d876b1029a63ea0fa07e7996871156fb13475bb Mon Sep 17 00:00:00 2001 From: martin-s Date: Thu, 25 Dec 2008 17:09:33 +0000 Subject: Add:Core:3d Support git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@1850 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'transform.h') diff --git a/transform.h b/transform.h index 138a2183..6599c92d 100644 --- a/transform.h +++ b/transform.h @@ -41,7 +41,7 @@ void transform_from_to(struct coord *cfrom, enum projection from, struct coord * void transform_geo_to_cart(struct coord_geo *geo, double a, double b, struct coord_geo_cart *cart); void transform_cart_to_geo(struct coord_geo_cart *cart, double a, double b, struct coord_geo *geo); void transform_datum(struct coord_geo *from, enum map_datum from_datum, struct coord_geo *to, enum map_datum to_datum); -int transform(struct transformation *t, enum projection pro, struct coord *c, struct point *p, int count, int unique); +int transform(struct transformation *t, enum projection pro, struct coord *c, struct point *p, int count, int unique, int width, int *width_return); void transform_reverse(struct transformation *t, struct point *p, struct coord *c); enum projection transform_get_projection(struct transformation *this_); void transform_set_projection(struct transformation *this_, enum projection pro); -- cgit v1.2.1 From 37f9b7dccf9e3ccbe86abcad1ae4cc6e2d3ef97c Mon Sep 17 00:00:00 2001 From: horwitz Date: Sun, 28 Dec 2008 21:23:41 +0000 Subject: core:fix:Fix some warnings and do some small cleanups git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@1864 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'transform.h') diff --git a/transform.h b/transform.h index 6599c92d..b9528c74 100644 --- a/transform.h +++ b/transform.h @@ -35,6 +35,7 @@ struct pcoord; struct point; struct transformation; struct transformation *transform_new(void); +struct transformation * transform_dup(struct transformation *t); void transform_to_geo(enum projection pro, struct coord *c, struct coord_geo *g); void transform_from_geo(enum projection pro, struct coord_geo *g, struct coord *c); void transform_from_to(struct coord *cfrom, enum projection from, struct coord *cto, enum projection to); @@ -45,6 +46,20 @@ int transform(struct transformation *t, enum projection pro, struct coord *c, st void transform_reverse(struct transformation *t, struct point *p, struct coord *c); enum projection transform_get_projection(struct transformation *this_); void transform_set_projection(struct transformation *this_, enum projection pro); +struct map_selection * transform_get_selection(struct transformation *this_, enum projection pro, int order); +struct coord * transform_center(struct transformation *this_); +struct coord * transform_get_center(struct transformation *this_); +void transform_set_center(struct transformation *this_, struct coord *c); +void transform_set_yaw(struct transformation *t,int yaw); +int transform_get_yaw(struct transformation *this_); +void transform_set_pitch(struct transformation *this_,int pitch); +int transform_get_pitch(struct transformation *this_); +#ifdef ENABLE_ROLL +void transform_set_roll(struct transformation *this_,int roll); +void transform_get_roll(struct transformation *this_); +#endif +void transform_set_distance(struct transformation *this_,int distance); +int transform_get_distance(struct transformation *this_); struct map_selection *transform_get_selection(struct transformation *this_, enum projection pro, int order); struct coord *transform_center(struct transformation *this_); void transform_set_angle(struct transformation *t, int angle); -- cgit v1.2.1 From 0f1c1590b50d8db1230b1426311009de11e50af7 Mon Sep 17 00:00:00 2001 From: martin-s Date: Fri, 2 Jan 2009 17:46:07 +0000 Subject: Fix:Core:Fixed transformation with ENABLE_ROLL off git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@1880 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'transform.h') diff --git a/transform.h b/transform.h index b9528c74..250443a1 100644 --- a/transform.h +++ b/transform.h @@ -54,10 +54,8 @@ void transform_set_yaw(struct transformation *t,int yaw); int transform_get_yaw(struct transformation *this_); void transform_set_pitch(struct transformation *this_,int pitch); int transform_get_pitch(struct transformation *this_); -#ifdef ENABLE_ROLL void transform_set_roll(struct transformation *this_,int roll); void transform_get_roll(struct transformation *this_); -#endif void transform_set_distance(struct transformation *this_,int distance); int transform_get_distance(struct transformation *this_); struct map_selection *transform_get_selection(struct transformation *this_, enum projection pro, int order); -- cgit v1.2.1 From e0707ee51c3404724a58d230e8be2faceeb71e1e Mon Sep 17 00:00:00 2001 From: horwitz Date: Mon, 5 Jan 2009 19:33:46 +0000 Subject: Fix:Core:Fix return value in header file git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@1897 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'transform.h') diff --git a/transform.h b/transform.h index 250443a1..44e0d2ee 100644 --- a/transform.h +++ b/transform.h @@ -55,7 +55,7 @@ int transform_get_yaw(struct transformation *this_); void transform_set_pitch(struct transformation *this_,int pitch); int transform_get_pitch(struct transformation *this_); void transform_set_roll(struct transformation *this_,int roll); -void transform_get_roll(struct transformation *this_); +int transform_get_roll(struct transformation *this_); void transform_set_distance(struct transformation *this_,int distance); int transform_get_distance(struct transformation *this_); struct map_selection *transform_get_selection(struct transformation *this_, enum projection pro, int order); -- cgit v1.2.1 From 0aa3bc0491f7ffe21c6413552aebcb1a820f4f7a Mon Sep 17 00:00:00 2001 From: tinloaf Date: Tue, 3 Feb 2009 17:11:09 +0000 Subject: Add:Core:Added autozoom support git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@1998 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 1 + 1 file changed, 1 insertion(+) (limited to 'transform.h') diff --git a/transform.h b/transform.h index 44e0d2ee..62ce3ff2 100644 --- a/transform.h +++ b/transform.h @@ -86,6 +86,7 @@ int transform_within_dist_polyline(struct coord *ref, struct coord *c, int count int transform_within_dist_polygon(struct coord *ref, struct coord *c, int count, int dist); int transform_within_dist_item(struct coord *ref, enum item_type type, struct coord *c, int count, int dist); void transform_destroy(struct transformation *t); +double transform_get_autozoom_factor(struct transformation *this_, struct point *center, struct coord *c); /* end of prototypes */ #ifdef __cplusplus } -- cgit v1.2.1 From 3fefd7884fea44412567e091aa4caf9604b9c693 Mon Sep 17 00:00:00 2001 From: tinloaf Date: Tue, 17 Feb 2009 20:56:15 +0000 Subject: Fix:Core:Changing the way autozoom works Add:Gui/GTK:Adding autozoom-toggle git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@2052 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'transform.h') diff --git a/transform.h b/transform.h index 62ce3ff2..d0035593 100644 --- a/transform.h +++ b/transform.h @@ -86,7 +86,7 @@ int transform_within_dist_polyline(struct coord *ref, struct coord *c, int count int transform_within_dist_polygon(struct coord *ref, struct coord *c, int count, int dist); int transform_within_dist_item(struct coord *ref, enum item_type type, struct coord *c, int count, int dist); void transform_destroy(struct transformation *t); -double transform_get_autozoom_factor(struct transformation *this_, struct point *center, struct coord *c); +struct coord transform_add_distance(enum projection pro, struct coord *c, int len, int dir); /* end of prototypes */ #ifdef __cplusplus } -- cgit v1.2.1 From cf31b8ad0053bb9466aabb829bd164432c80357f Mon Sep 17 00:00:00 2001 From: steven_s Date: Sat, 21 Mar 2009 17:34:10 +0000 Subject: Fix:transform:Use single precision vs double precision for lat/lng calculates when AVOID_FLOAT is set. git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@2157 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'transform.h') diff --git a/transform.h b/transform.h index d0035593..1d36baf2 100644 --- a/transform.h +++ b/transform.h @@ -23,6 +23,8 @@ #ifdef __cplusplus extern "C" { #endif +#include "coord.h" + /* prototypes */ enum item_type; enum map_datum; @@ -39,8 +41,8 @@ struct transformation * transform_dup(struct transformation *t); void transform_to_geo(enum projection pro, struct coord *c, struct coord_geo *g); void transform_from_geo(enum projection pro, struct coord_geo *g, struct coord *c); void transform_from_to(struct coord *cfrom, enum projection from, struct coord *cto, enum projection to); -void transform_geo_to_cart(struct coord_geo *geo, double a, double b, struct coord_geo_cart *cart); -void transform_cart_to_geo(struct coord_geo_cart *cart, double a, double b, struct coord_geo *geo); +void transform_geo_to_cart(struct coord_geo *geo, navit_float a, navit_float b, struct coord_geo_cart *cart); +void transform_cart_to_geo(struct coord_geo_cart *cart, navit_float a, navit_float b, struct coord_geo *geo); void transform_datum(struct coord_geo *from, enum map_datum from_datum, struct coord_geo *to, enum map_datum to_datum); int transform(struct transformation *t, enum projection pro, struct coord *c, struct point *p, int count, int unique, int width, int *width_return); void transform_reverse(struct transformation *t, struct point *p, struct coord *c); -- cgit v1.2.1 From efa21504abd975a042e6d786067126b78129c9ea Mon Sep 17 00:00:00 2001 From: martin-s Date: Sat, 25 Apr 2009 06:21:32 +0000 Subject: Fix:Core:Set minimum line width git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@2233 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'transform.h') diff --git a/transform.h b/transform.h index 1d36baf2..d6984215 100644 --- a/transform.h +++ b/transform.h @@ -37,6 +37,10 @@ struct pcoord; struct point; struct transformation; struct transformation *transform_new(void); +int transform_get_hog(struct transformation *this_); +void transform_set_hog(struct transformation *this_, int hog); +int transformation_get_order_base(struct transformation *this_); +void transform_set_order_base(struct transformation *this_, int order_base); struct transformation * transform_dup(struct transformation *t); void transform_to_geo(enum projection pro, struct coord *c, struct coord_geo *g); void transform_from_geo(enum projection pro, struct coord_geo *g, struct coord *c); -- cgit v1.2.1 From 61ace5383b06fa2bf01d53a722cd2833a60a6e41 Mon Sep 17 00:00:00 2001 From: martin-s Date: Wed, 27 May 2009 13:45:54 +0000 Subject: Add:Core:Added support for utm projection git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@2291 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 1 + 1 file changed, 1 insertion(+) (limited to 'transform.h') diff --git a/transform.h b/transform.h index d6984215..e1600b6a 100644 --- a/transform.h +++ b/transform.h @@ -47,6 +47,7 @@ void transform_from_geo(enum projection pro, struct coord_geo *g, struct coord * void transform_from_to(struct coord *cfrom, enum projection from, struct coord *cto, enum projection to); void transform_geo_to_cart(struct coord_geo *geo, navit_float a, navit_float b, struct coord_geo_cart *cart); void transform_cart_to_geo(struct coord_geo_cart *cart, navit_float a, navit_float b, struct coord_geo *geo); +void transform_utm_to_geo(const double UTMEasting, const double UTMNorthing, int ZoneNumber, int NorthernHemisphere, struct coord_geo *geo); void transform_datum(struct coord_geo *from, enum map_datum from_datum, struct coord_geo *to, enum map_datum to_datum); int transform(struct transformation *t, enum projection pro, struct coord *c, struct point *p, int count, int unique, int width, int *width_return); void transform_reverse(struct transformation *t, struct point *p, struct coord *c); -- cgit v1.2.1 From 5b403ebbcb479b02c2ee6f8ff9fb59af757a88a3 Mon Sep 17 00:00:00 2001 From: martin-s Date: Thu, 25 Jun 2009 09:13:35 +0000 Subject: Add:Core:Added possibility for vehicle position extrapolation to compensate for processing lag, improved turn around detection git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@2369 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- transform.h | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'transform.h') diff --git a/transform.h b/transform.h index e1600b6a..ee617d72 100644 --- a/transform.h +++ b/transform.h @@ -41,7 +41,7 @@ int transform_get_hog(struct transformation *this_); void transform_set_hog(struct transformation *this_, int hog); int transformation_get_order_base(struct transformation *this_); void transform_set_order_base(struct transformation *this_, int order_base); -struct transformation * transform_dup(struct transformation *t); +struct transformation *transform_dup(struct transformation *t); void transform_to_geo(enum projection pro, struct coord *c, struct coord_geo *g); void transform_from_geo(enum projection pro, struct coord_geo *g, struct coord *c); void transform_from_to(struct coord *cfrom, enum projection from, struct coord *cto, enum projection to); @@ -53,32 +53,29 @@ int transform(struct transformation *t, enum projection pro, struct coord *c, st void transform_reverse(struct transformation *t, struct point *p, struct coord *c); enum projection transform_get_projection(struct transformation *this_); void transform_set_projection(struct transformation *this_, enum projection pro); -struct map_selection * transform_get_selection(struct transformation *this_, enum projection pro, int order); -struct coord * transform_center(struct transformation *this_); -struct coord * transform_get_center(struct transformation *this_); +struct map_selection *transform_get_selection(struct transformation *this_, enum projection pro, int order); +struct coord *transform_center(struct transformation *this_); +struct coord *transform_get_center(struct transformation *this_); void transform_set_center(struct transformation *this_, struct coord *c); -void transform_set_yaw(struct transformation *t,int yaw); +void transform_set_yaw(struct transformation *t, int yaw); int transform_get_yaw(struct transformation *this_); -void transform_set_pitch(struct transformation *this_,int pitch); +void transform_set_pitch(struct transformation *this_, int pitch); int transform_get_pitch(struct transformation *this_); -void transform_set_roll(struct transformation *this_,int roll); +void transform_set_roll(struct transformation *this_, int roll); int transform_get_roll(struct transformation *this_); -void transform_set_distance(struct transformation *this_,int distance); +void transform_set_distance(struct transformation *this_, int distance); int transform_get_distance(struct transformation *this_); -struct map_selection *transform_get_selection(struct transformation *this_, enum projection pro, int order); -struct coord *transform_center(struct transformation *this_); -void transform_set_angle(struct transformation *t, int angle); -int transform_get_angle(struct transformation *this_, int angle); void transform_set_screen_selection(struct transformation *t, struct map_selection *sel); void transform_set_screen_center(struct transformation *t, struct point *p); void transform_get_size(struct transformation *t, int *width, int *height); -void transform_setup(struct transformation *t, struct pcoord *c, int scale, int angle); +void transform_setup(struct transformation *t, struct pcoord *c, int scale, int yaw); void transform_setup_source_rect(struct transformation *t); long transform_get_scale(struct transformation *t); void transform_set_scale(struct transformation *t, long scale); int transform_get_order(struct transformation *t); double transform_scale(int y); double transform_distance(enum projection pro, struct coord *c1, struct coord *c2); +void transform_project(enum projection pro, struct coord *c, int distance, int angle, struct coord *res); double transform_polyline_length(enum projection pro, struct coord *c, int count); int transform_distance_sq(struct coord *c1, struct coord *c2); int transform_distance_sq_pc(struct pcoord *c1, struct pcoord *c2); @@ -93,7 +90,6 @@ int transform_within_dist_polyline(struct coord *ref, struct coord *c, int count int transform_within_dist_polygon(struct coord *ref, struct coord *c, int count, int dist); int transform_within_dist_item(struct coord *ref, enum item_type type, struct coord *c, int count, int dist); void transform_destroy(struct transformation *t); -struct coord transform_add_distance(enum projection pro, struct coord *c, int len, int dir); /* end of prototypes */ #ifdef __cplusplus } -- cgit v1.2.1