21 |
|
|
22 |
|
|
23 |
|
|
24 |
public static void main(String[] args) throws IOException { |
public static void main(String[] args) throws IOException { |
25 |
//System.out.println( GeocodeHelper.googleHelper(2800, "Chr. Xs Alle") ); |
int post = 8700; |
26 |
System.out.println( GeocodeHelper.openstreetmapHelper(2800, "Chr. Xs Alle") ); |
String vej = "Enebarvej"; |
27 |
System.out.println( GeocodeHelper.openstreetmapHelper(8700, "Enebaervej") ); |
|
28 |
|
long start1 = System.currentTimeMillis(); |
29 |
|
System.out.println( "Google:" + GeocodeHelper.googleHelper(post, vej) ); |
30 |
|
long stop1 = System.currentTimeMillis(); |
31 |
|
|
32 |
|
long start2 = System.currentTimeMillis(); |
33 |
|
System.out.println( "OSM:" + GeocodeHelper.openstreetmapHelper(post, vej) ); |
34 |
|
long stop2 = System.currentTimeMillis(); |
35 |
|
|
36 |
|
System.out.println("Google: " + (stop1-start1)); |
37 |
|
System.out.println("OSM: " + (stop2-start2)); |
38 |
} |
} |
39 |
|
|
40 |
public static String openstreetmapHelper(int postnr, String vejnavn) { |
public static String openstreetmapHelper(int postnr, String vejnavn) { |