[Talk-cz] Je OSM routovatelna nebo neni?
Pavel Machek
pavel na suse.cz
Pondělí Září 29 13:40:15 UTC 2008
Ahoj!
> > SamozĹejmÄ, Ĺže kdyĹž chybĂ vÄtĹĄina silnic
> > III. tĹĂdy a jednosmÄrek, tak ten vĂ˝sledek nebude nic moc.
>
> I kdyĹž budou, bude stĂĄle problĂŠm s ostatnĂmi chybÄjĂcĂmi restrikcemi
> (napĹ. zĂĄkaz odboÄenĂ vlevo {relation type=restriction
> restriction=no_left_turn}, zåkaz vjezdu motorových vozidel
> {motorcar=no}, prĹŻjezd zakĂĄzĂĄn {motorcar=destination}), a v pĹĂpadÄ
> nĂĄkladnĂch aut takĂŠ s chybÄjĂcĂm maxheight.
>
> NicmĂŠnÄ na vĹĄe toto jsou jiĹž v OSM konvence (nebo alespoĹ nĂĄvrhy
> konvencĂ), takĹže staÄĂ to vĹĄe zmapovat.
Tak tak ;-).
> NapĹ. na Praze 2 uĹž zaÄĂnĂĄ výťe odkazovanĂ˝ program dĂĄvat rozumnĂŠ
> vĂ˝sledky, pĹestoĹže je tato oblast ponÄkud "pĹejednosmÄrkovanĂĄ".
Ktery program to byl?
Jinak navit (z http://www.navit-project.org/) po aplikovani patche
routuje po cechach... Bezi to i na openmoku, a umi to v podstate vse
potrebne, vcetne hlasove navigace.
Patch je dole, ale asi by bylo lepsi nastavit vsem mestum/vesnicim v
cechach is_in=Czech Republic,Europe (umi to nekdo udelat rozume
hromadne? Mel jsem skvely napad ze vemu planet czechia, vysekam z toho
mesta pomoci osmosis, a pak to nahradim v josm. Problem je ze osmosis
nezkompiluju :-().
Pavel
Index: src/country.c
===================================================================
RCS file: /cvsroot/navit/navit/src/country.c,v
retrieving revision 1.12
diff -u -u -r1.12 country.c
--- src/country.c 21 Mar 2008 19:38:45 -0000 1.12
+++ src/country.c 29 Sep 2008 13:35:56 -0000
@@ -267,6 +267,7 @@
{710, "ZA", "ZA", "ZAF", /* 710 */ _n("South Africa") },
{894, "Z", "ZM", "ZMB", /* 894 */ _n("Zambia")},
{716, "ZW", "ZW", "ZWE", /* 716 */ _n("Zimbabwe")},
+ {999, "*", "*", "*", _n("* Unknown, add is_in tags to those cities")},
};
Index: src/navit.xml
===================================================================
RCS file: /cvsroot/navit/navit/src/navit.xml,v
retrieving revision 1.65
diff -u -u -r1.65 navit.xml
--- src/navit.xml 7 May 2008 22:39:25 -0000 1.65
+++ src/navit.xml 29 Sep 2008 13:36:02 -0000
@@ -14,11 +14,11 @@
Change to your home coordinates.
-->
<navit center="4808 N 1134 E" zoom="256" tracking="1" cursor="1" orientation="0">
-<!--
<osd type="compass" />
<osd type="eta" />
<osd type="navigation" />
--->
+ <osd type="street_name" />
+
<gui type="gtk" menubar="1" toolbar="1" statusbar="1" />
<graphics type="gtk_drawing_area" />
<!-- For SDL, use rather the following lines
@@ -35,7 +35,7 @@
<vehicle name="Meins" enabled="yes" source="gpsd://localhost" color="#0000ff" follow="1" refresh="1"/>
-->
- <vehicle name="Demo" enabled="no" source="demo://" color="#0000aa"/>
+ <vehicle name="Demo" enabled="yes" source="demo://" color="#0000aa"/>
<tracking>
</tracking>
<route>
@@ -60,7 +60,7 @@
<announce type="street_n_lanes,highway_land" level0="100" level1="1000" level2="2000" unit="m" />
</navigation>
- <speech type="cmdline" data="echo 'Fix the speech tag in navit.xml to let navit say:' '%s'" />
+ <speech type="cmdline" data="echo '%s' | flite &" />
<!-- If you have the reiseplaner maps installed, set enabled="yes" in the next line -->
<mapset enabled="no">
<map type="mg" enabled="yes" data="/opt/reiseplaner/travel/DE.map" />
Index: src/osm2navit.c
===================================================================
RCS file: /cvsroot/navit/navit/src/osm2navit.c,v
retrieving revision 1.80
diff -u -u -r1.80 osm2navit.c
--- src/osm2navit.c 3 May 2008 22:01:23 -0000 1.80
+++ src/osm2navit.c 29 Sep 2008 13:36:07 -0000
@@ -284,9 +284,11 @@
} country_table[] = {
{ 40,"Austria,Ăsterreich,AUT"},
{124,"Canada"},
+ {203,"Czech Republic"},
{276,"Germany,Deutschland,Bundesrepublik Deutschland"},
{528,"Nederland,The Netherlands,Niederlande,NL"},
{756,"Schweiz"},
+ {999,"Unknown"},
};
static GHashTable *country_table_hash;
@@ -977,6 +979,8 @@
#ifdef GENERATE_INDEX
if (IS_TOWN(item) && town_name_attr.len) {
char *tok,*buf=is_in_buffer;
+ if (!buf[0])
+ strcpy(is_in_buffer, "Unknown");
while ((tok=strtok(buf, ","))) {
while (*tok==' ')
tok++;
@@ -2235,7 +2239,7 @@
fprintf(f,"-c (--dump-coordinates) : dump coordinates after phase 1\n");
fprintf(f,"-e (--end) : end at specified phase\n");
fprintf(f,"-k (--keep-tmpfiles) : do not delete tmp files after processing. useful to reuse them\n\n");
- fprintf(f,"-o (--coverage) : map every street to item overage\n");
+ fprintf(f,"-o (--coverage) : map every street to item coverage\n");
fprintf(f,"-s (--start) : start at specified phase\n");
fprintf(f,"-i (--input-file) : specify the input file name (OSM), overrules default stdin\n");
fprintf(f,"-w (--dedupe-ways) : ensure no duplicate ways or nodes. useful when using several input files\n");
Index: src/route.c
===================================================================
RCS file: /cvsroot/navit/navit/src/route.c,v
retrieving revision 1.42
diff -u -u -r1.42 route.c
--- src/route.c 20 Apr 2008 10:40:39 -0000 1.42
+++ src/route.c 29 Sep 2008 13:36:09 -0000
@@ -90,7 +90,6 @@
#define RF_AVOIDHW (1<<2)
#define RF_AVOIDPAID (1<<3)
#define RF_LOCKONROAD (1<<4)
-#define RF_SHOWGRAPH (1<<5)
struct route {
int version;
@@ -1697,16 +1696,6 @@
NULL,
};
-void
-route_toggle_routegraph_display(struct route *route)
-{
- if (route->flags & RF_SHOWGRAPH) {
- route->flags &= ~RF_SHOWGRAPH;
- } else {
- route->flags |= RF_SHOWGRAPH;
- }
-}
-
static struct map_priv *
route_map_new_helper(struct map_methods *meth, struct attr **attrs, int graph)
{
Index: src/route.h
===================================================================
RCS file: /cvsroot/navit/navit/src/route.h,v
retrieving revision 1.19
diff -u -u -r1.19 route.h
--- src/route.h 20 Apr 2008 10:40:39 -0000 1.19
+++ src/route.h 29 Sep 2008 13:36:09 -0000
@@ -75,7 +75,6 @@
void route_draw(struct route *this, struct transformation *t, struct displaylist *dsp);
struct map *route_get_map(struct route *route);
struct map *route_get_graph_map(struct route *route);
-void route_toggle_routegraph_display(struct route *route);
void route_set_projection(struct route *this_, enum projection pro);
void route_init(void);
/* end of prototypes */
Index: src/search.c
===================================================================
RCS file: /cvsroot/navit/navit/src/search.c,v
retrieving revision 1.14
diff -u -u -r1.14 search.c
--- src/search.c 21 Mar 2008 20:23:48 -0000 1.14
+++ src/search.c 29 Sep 2008 13:36:10 -0000
@@ -165,7 +165,7 @@
g_free(this_);
}
-static struct search_list_street *
+struct search_list_street *
search_list_street_new(struct item *item)
{
struct search_list_street *ret=g_new0(struct search_list_street, 1);
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Další informace o konferenci talk-cz