Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add icons for menu. Art work from openclipart.org
On the fly switching of pak file when bbox test fails. All ports now use the same options. Translations once again functional.. WinCE port is once again operational. Display routing decisions to user with icons. git-svn-id: http://svn.openstreetmap.org/applications/rendering/gosmore@18429 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
- Loading branch information
nic
committed
Nov 2, 2009
1 parent
00aa95e
commit 2fea3c1
Showing
25 changed files
with
8,355 additions
and
2,946 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// To run this program : | ||
// wget http://download.geonames.org/export/dump/cities1000.zip | ||
// unzip cities1000.zip | ||
// gcc geonames2osm.c && sort -nr -t$'\t' -k 15 cities1000.txt | | ||
// ./a.out >lowres.osm | ||
|
||
#include <stdio.h> | ||
#include <strings.h> | ||
|
||
char list[180000][80], line[5000]; // Space for Jerusalem and its translations | ||
|
||
int main (void) | ||
{ | ||
int cnt = 0, i, j, idx[30], ppl; // Do we need to set idx[0] = 0 ? | ||
while (fgets (line, sizeof (line), stdin)) { | ||
for (i = 0, j = 1; line[i] != '\0' && j < 30; i++) { | ||
if (line[i] == '\t') idx[j++] = i + 1; | ||
} | ||
if (j < 14) continue; // Bad line | ||
// For each geonames entry we generate 2 names and convert the ones that | ||
// are unique into OSM-XML. | ||
for (i = 1; i >= 0; i--) { | ||
sprintf (list[cnt], i ? "%.2s %.*s" : "%.0s%.*s", line + | ||
idx[line[idx[8]] == 'U' && line[idx[8]+1] == 'S' ? 10 : 8], | ||
idx[2] - idx[1] - 1, line + idx[1]); | ||
for (j = 0; j < cnt && strcasecmp (list[j], list[cnt]) != 0; j++) {} | ||
if (j < cnt) break; // If seen before | ||
ppl = atoi (line + idx[14]); | ||
if (i == 1) printf ("<node id='%d' lat='%.*s' lon='%.*s'>\n" | ||
" <tag k='place' v='%s' />\n", 0x7fffffff - cnt, | ||
idx[5] - idx[4] - 1, line + idx[4], | ||
idx[6] - idx[5] - 1, line + idx[5], ppl > 456789 ? "city" : | ||
ppl > 23456 ? "town" : ppl > 789 ? "village" : "hamlet"); | ||
printf (" <tag k='%s' v=\"%s\" />\n", i ? "ref" : "name", list[cnt++]); | ||
} | ||
if (i < 1) printf ("</node>\n"); | ||
} | ||
} |
Oops, something went wrong.