Re: [OSM-talk] City routing grid for Australia and the US

2012-07-24 Thread Svavar Kjarrval
I checked the terms for the Google Maps API and noticed that the
collection of data, as done by the tool, is forbidden. Does anyone know
of any other services which could provide reference distances?

- Svavar Kjarrval

On 23/07/12 21:42, Pieren wrote:
 I've not checked the tool in details but if I understand correctly,
 the reference distance numbers are coming from Google API. Imo,
 massively extracting distance like this is a copyright infringement,
 even if it's just to compare, in the same way using GMaps to check
 the street names correctness in OSM.

 Pieren

 ___
 talk mailing list
 talk@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/talk





signature.asc
Description: OpenPGP digital signature
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] City routing grid for Australia and the US

2012-07-24 Thread Toby Murray
On Tue, Jul 24, 2012 at 2:04 PM, Mike N nice...@att.net wrote:
 On 7/24/2012 2:59 PM, Svavar Kjarrval wrote:

 Does anyone know
 of any other services which could provide reference distances?


  Does anyone have a pre-redaction planet that could have an OSRM instance
 created?   I would think that this would not violate the ODBL or CC-BY of
 either state if it is just used for route comparison.

Does anyone know if Mapquest stopped diff consumption when the bot
ran? When I first looked I thought they had stopped but now I can't
route across Australia so maybe they were just a little behind when I
looked before.

Or maybe Cloudmade? They seem to still be able to route across Australia...

Toby

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] City routing grid for Australia and the US

2012-07-24 Thread Jaakko Helleranta.com
Clodmade's (most!(!)) current data is from last December.
Close enough?
Dunno if you can query their API on the distance, so u gotta check that out.

I just got a response from them the other day asking about when it will be 
updated and the response was that their engineers are assigned to other 
things... 
So, it seems that it will be one pre-redaction OSM reference for a while. 

Cheers,
-Jaakko

Sent from my BlackBerry® device from Digicel
--
Mobile: +509-37-26 91 54, Skype/GoogleTalk: jhelleranta

-Original Message-
From: Mike N nice...@att.net
Date: Tue, 24 Jul 2012 15:04:33 
To: talk@openstreetmap.org
Subject: Re: [OSM-talk] City routing grid for Australia and the US

On 7/24/2012 2:59 PM, Svavar Kjarrval wrote:
 Does anyone know
 of any other services which could provide reference distances?

  Does anyone have a pre-redaction planet that could have an OSRM 
instance created?   I would think that this would not violate the ODBL 
or CC-BY of either state if it is just used for route comparison.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] City routing grid for Australia and the US

2012-07-24 Thread Svavar Kjarrval

On 24/07/12 19:04, Mike N wrote:
 On 7/24/2012 2:59 PM, Svavar Kjarrval wrote:
 Does anyone know
 of any other services which could provide reference distances?

  Does anyone have a pre-redaction planet that could have an OSRM
 instance created?   I would think that this would not violate the ODBL
 or CC-BY of either state if it is just used for route comparison.

I was thinking more about as a general QA thing, not just post-redaction.

- Svavar Kjarrval

 ___
 talk mailing list
 talk@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/talk





signature.asc
Description: OpenPGP digital signature
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] City routing grid for Australia and the US

2012-07-23 Thread Pieren
I've not checked the tool in details but if I understand correctly,
the reference distance numbers are coming from Google API. Imo,
massively extracting distance like this is a copyright infringement,
even if it's just to compare, in the same way using GMaps to check
the street names correctness in OSM.

Pieren

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] City routing grid for Australia and the US

2012-07-22 Thread Toby Murray
I already shared this on talk-us but since I have some degree of
worldwide coverage I guess I'll share it here too.

I noticed that the bot sometimes removed the highway=* tag but left
the oneway=* tag in place. At least here in the US, most such ways are
a part of the interstate system and since they are missing the highway
tag, greatly impact routing.

So I queried for ways with a oneway tag but no highway tag and put
them on a map. I am pre-rendering the tiles using Maperitive so
worldwide coverage only goes down to z10. I have added up to z13 in
some areas and will add more for higher density areas. I have already
done the UK, Spain/Portugal, some of France and the big cities in
Australia down to z13. You can see the map here:
http://ni.kwsn.net/~toby/OSM/maps/redaction.html

Or use it as a tile URL in JOSM:
tms:http://ni.kwsn.net/~toby/OSM/maps/oneway/{zoom}/{x}/{y}.png

I hope this will help to get some of the major routing problems fixed
up since these problems are a simple fix: just add the appropriate
highway=* tag.

Toby

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] City routing grid for Australia and the US

2012-07-22 Thread James Mast

Kai, as I mentioned in talk-us (but I think you might have missed it), here's a 
few more cities for the US one that I would suggest adding that might help out 
in spotting problems. Pittsburgh
Cleveland
Las Vegas
Toronto, Ontario, Canada (mainly because you added Winnipeg which is also in 
Canada)Montreal, Quebec, Canada
 
-James___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] City routing grid for Australia and the US

2012-07-22 Thread James Mast

Kai, as I mentioned in talk-us (but I think you might have missed it), here's 
a few more cities for the US one that I would suggest adding that might help 
out in spotting problems.
 
Pittsburgh
Cleveland
Las Vegas
Toronto, Ontario, Canada (mainly because you added Winnipeg which is also in 
Canada)
Montreal, Quebec, Canada
 
-James
  

== On second thought, Nashville, TN would be a much better choice than 
Cleveland, OH.  But I still also suggest the other cities I mentioned.  Also 
add Miami, FL to that list. -James___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] City routing grid for Australia and the US

2012-07-22 Thread Simone Cortesi
On Sat, Jul 21, 2012 at 11:21 PM, Kai Krueger kakrue...@gmail.com wrote:

 On Sat, Jul 21, 2012 at 8:56 PM, Svavar Kjarrval sva...@kjarrval.is wrote:

 I want to make a similar routing table file for my country. Any chance
 of giving us instructions on how to generate such routing grids of our own?

 - Svavar Kjarrval


 I have now pushed the code I used to generate those tables to github. (
 https://github.com/apmon/RoutingGrid )

 It is a little java program that takes in a list of coordinates and city
 names and generates the html file for the routing grid.

 You can easily run it on your own list of coordinates / cities.

Thanks! I've just made a test one for Italy:
http://maps.cortesi.com/distanze_italia.html

-- 
-S

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] City routing grid for Australia and the US

2012-07-22 Thread Svavar Kjarrval

On 22/07/12 03:49, Kai Krueger wrote:
 On 07/21/2012 04:56 PM, Svavar Kjarrval wrote:

 On 21/07/12 21:21, Kai Krueger wrote:
 On 07/21/2012 01:05 PM, Simone Cortesi wrote:
 Yes please,
 I would like to do the same too...

 -S

 On Sat, Jul 21, 2012 at 8:56 PM, Svavar Kjarrval sva...@kjarrval.is 
 wrote:
 I want to make a similar routing table file for my country. Any chance
 of giving us instructions on how to generate such routing grids of our 
 own?

 - Svavar Kjarrval

 I have now pushed the code I used to generate those tables to
 github. ( https://github.com/apmon/RoutingGrid )

 It is a little java program that takes in a list of coordinates and
 city names and generates the html file for the routing grid.

 You can easily run it on your own list of coordinates / cities.

 Dennis, who is responsible for the OSRM server, was OK with me
 running the code against his server, and I suspect he wouldn't mind
 if others do the same.

 It uses Google's directions API as a reference, so it is subject to
 their terms. Currently they seem to allow 2500 requests per day,
 which would correspond to a maximum sized grid of 50 cities. It can
 cache the results from Google in a reference list, so you only need
 to query google once per city list.

 Kai

 Thanks a lot! I had an idea of a larger list of co-ordinates and
 could use this code to make a databased version. I'd probably have to
 host my own OSRM instance so I wouldn't bombard the main one with so
 many queries in a short time interval.
 OSRM really is amazingly fast (assuming you have a server with
 sufficient ram to convert the data into a routing db in the first
 place), so I don't see too much issue in principle in significantly
 expanding the routing grid. Calculating a route from New York to Los
 Angeles takes 500ms and that includes network round trip time across
 the Atlantic (ping time to the server from here is 150 ms). Depending
 on how far you want to expand it, you might even still be able to use
 the current instance, although you would have to ask Dennis about that.


I was thinking about expanding the grid to every town in Iceland, which
are at least 75. With Google's limit of 2500 queries a day, I'd have to
make a program which makes regular queries and is careful about not
going over that limit. And this is only the towns. This does not take
into account addresses within them. Surely, I won't do this for every
town as most of them are only a few streets but nontheless, it would
generate a big queue of queries against Google. I don't know how the
OSRM will react to such a large number of queries on a regular basis as
I need to refresh the OSRM distances.


 If there is interest, I will try and expand the routing grid my self
 over the next couple of days, either to new countries or to more
 cities in a country.

 With the current code, the bigger short term issue is that it uses
 Google as a reference source and its limited allowance. However, once
 the routing problems are fixed again in OSM, there is no reason to not
 use a known good snapshot of OSM data as a reference in future and use
 it in quality assurance to check for any new broken routes. You could
 also use a snapshot from before the bot ran if you have access to it.
 Overall, this is really only a very small script that I hacked
 together in a couple of hours yesterday of which most of the time was
 spend in getting the coordinates for the cities list. So if you are
 planning to make too many changes, you might be better of writing it
 from scratch.

It does give me ideas and I'll probably convert it anyway to another
programming language. The command flow will give me neat ideas.


 It would be a kind of a quality assurance checker where I'd not only
 check links between cities/towns, but also links between some of the
 addresses inside them. Maybe add important POIs in the country as
 well. I really want the map to be of superior quality.

 You would likely need to go about it a bit different than to display
 routes in a grid (so the current code probably isn't a great basis),
 but the idea of automated quality control by generating a large set of
 routes between cities/towns/POIs has been floating around for quite a
 while. It is one of the reasons why there is still a debate about
 getting OSMF to operate a routing server itself to support these kind
 of QA checks.

 Personally, however, I suspect that an automated system will only
 every be able to check a fraction of the most prominent (and
 important) routes / roads and it will be more important to expose as
 many mappers as possible to the routing interface for them to try
 their own local routes for which they know the optimal solution.

 Kai


 - Svavar Kjarrval


 On 21/07/12 18:32, Kai Krueger wrote:
 Hello everyone,

 Inspired by the US 250 cities routing grid[1] used in the original TIGER
 cleanup in 2009, I have now created a similar routing grid for the USA
 and Australia.

 Australia: 

Re: [OSM-talk] City routing grid for Australia and the US

2012-07-22 Thread Toby Murray
On Sun, Jul 22, 2012 at 3:01 AM, Toby Murray toby.mur...@gmail.com wrote:
 I already shared this on talk-us but since I have some degree of
 worldwide coverage I guess I'll share it here too.

 I noticed that the bot sometimes removed the highway=* tag but left
 the oneway=* tag in place. At least here in the US, most such ways are
 a part of the interstate system and since they are missing the highway
 tag, greatly impact routing.

 So I queried for ways with a oneway tag but no highway tag and put
 them on a map. I am pre-rendering the tiles using Maperitive so
 worldwide coverage only goes down to z10. I have added up to z13 in
 some areas and will add more for higher density areas. I have already
 done the UK, Spain/Portugal, some of France and the big cities in
 Australia down to z13. You can see the map here:
 http://ni.kwsn.net/~toby/OSM/maps/redaction.html

 Or use it as a tile URL in JOSM:
 tms:http://ni.kwsn.net/~toby/OSM/maps/oneway/{zoom}/{x}/{y}.png

I've been using this to guide my remapping efforts today and it is
indeed quite useful, even without high zoom levels. I did add z11 for
most of Europe though. I load it up in JOSM to find an area to edit.
Once I download data, it is usually pretty easy to pick out the way
that is missing its highway tag. It will be at the middle of the big
red blob from the tiles. But don't just fix the highway tag. I find
that where there is one way without a highway tag, there will usually
be other problems too like missing or disconnected _link roads or
missing bridges or the like.

Toby

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] City routing grid for Australia and the US

2012-07-21 Thread Svavar Kjarrval
I want to make a similar routing table file for my country. Any chance
of giving us instructions on how to generate such routing grids of our own?

- Svavar Kjarrval

On 21/07/12 18:32, Kai Krueger wrote:
 Hello everyone,

 Inspired by the US 250 cities routing grid[1] used in the original TIGER
 cleanup in 2009, I have now created a similar routing grid for the USA
 and Australia.

 Australia: http://apmon.dev.openstreetmap.org/aus_routing_grid.html
 USA: http://apmon.dev.openstreetmap.org/us_routing_grid.html

 It takes the top cities of the country and calculates the routing
 distances between them and displays the result in a routing grid. It
 allows to check the top tear inter city road network. Unusually long
 routes are likely caused by broken data and indicates where things need
 fixing.

 In the grid, all routes that are more than 5% longer or slower than
 expected* are show in red, otherwise they are considered as
 superficially OK. The reference values are in brackets. If you click on
 the link, you will be sent to the detailed routing information.

 Unfortunately the situation, particularly in Australia, is pretty bad.
 In Australlia currently non of the routes between the top ten cities
 pass this criterion and in fact most of the routes can't be calculated
 at all any more due to disconnectedness of the road network.

 So for all those who are finished remapping their own area and are
 looking to help with a bit of armchair mapping, trying to get more of
 these routes green could be a good idea for arm chair mappers. Let's see
 how quickly we can get all of them green!

 The routing information is calculated using the Open Source Routing
 Machine ( http://map.project-osrm.org/ ) and if I am not mistaken,
 updates its data once a day. I will equally try and recreate those grids
 on a daily basis to help track progress on the remapping.

 Happy remapping,

 Kai

 * The time and distance that is expected is currently determined using
 google's directions API. Although not perfect by any means, it is
 probably the most reliable source for now as a reference.



 [1] http://wiki.openstreetmap.org/wiki/TIGER_fixup/250_cities/routing_grid

 ___
 talk mailing list
 talk@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/talk





signature.asc
Description: OpenPGP digital signature
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] City routing grid for Australia and the US

2012-07-21 Thread Simone Cortesi
Yes please,
I would like to do the same too...

-S

On Sat, Jul 21, 2012 at 8:56 PM, Svavar Kjarrval sva...@kjarrval.is wrote:
 I want to make a similar routing table file for my country. Any chance
 of giving us instructions on how to generate such routing grids of our own?

 - Svavar Kjarrval

 On 21/07/12 18:32, Kai Krueger wrote:
 Hello everyone,

 Inspired by the US 250 cities routing grid[1] used in the original TIGER
 cleanup in 2009, I have now created a similar routing grid for the USA
 and Australia.

 Australia: http://apmon.dev.openstreetmap.org/aus_routing_grid.html
 USA: http://apmon.dev.openstreetmap.org/us_routing_grid.html

 It takes the top cities of the country and calculates the routing
 distances between them and displays the result in a routing grid. It
 allows to check the top tear inter city road network. Unusually long
 routes are likely caused by broken data and indicates where things need
 fixing.

 In the grid, all routes that are more than 5% longer or slower than
 expected* are show in red, otherwise they are considered as
 superficially OK. The reference values are in brackets. If you click on
 the link, you will be sent to the detailed routing information.

 Unfortunately the situation, particularly in Australia, is pretty bad.
 In Australlia currently non of the routes between the top ten cities
 pass this criterion and in fact most of the routes can't be calculated
 at all any more due to disconnectedness of the road network.

 So for all those who are finished remapping their own area and are
 looking to help with a bit of armchair mapping, trying to get more of
 these routes green could be a good idea for arm chair mappers. Let's see
 how quickly we can get all of them green!

 The routing information is calculated using the Open Source Routing
 Machine ( http://map.project-osrm.org/ ) and if I am not mistaken,
 updates its data once a day. I will equally try and recreate those grids
 on a daily basis to help track progress on the remapping.

 Happy remapping,

 Kai

 * The time and distance that is expected is currently determined using
 google's directions API. Although not perfect by any means, it is
 probably the most reliable source for now as a reference.



 [1] http://wiki.openstreetmap.org/wiki/TIGER_fixup/250_cities/routing_grid

 ___
 talk mailing list
 talk@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/talk




 ___
 talk mailing list
 talk@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/talk




-- 
-S

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] City routing grid for Australia and the US

2012-07-21 Thread Kai Krueger
On 07/21/2012 01:05 PM, Simone Cortesi wrote:
 Yes please,
 I would like to do the same too...

 -S

 On Sat, Jul 21, 2012 at 8:56 PM, Svavar Kjarrval sva...@kjarrval.is wrote:
 I want to make a similar routing table file for my country. Any chance
 of giving us instructions on how to generate such routing grids of our own?

 - Svavar Kjarrval

I have now pushed the code I used to generate those tables to github. (
https://github.com/apmon/RoutingGrid )

It is a little java program that takes in a list of coordinates and city
names and generates the html file for the routing grid.

You can easily run it on your own list of coordinates / cities.

Dennis, who is responsible for the OSRM server, was OK with me running
the code against his server, and I suspect he wouldn't mind if others do
the same.

It uses Google's directions API as a reference, so it is subject to
their terms. Currently they seem to allow 2500 requests per day, which
would correspond to a maximum sized grid of 50 cities. It can cache the
results from Google in a reference list, so you only need to query
google once per city list.

Kai


 On 21/07/12 18:32, Kai Krueger wrote:
 Hello everyone,

 Inspired by the US 250 cities routing grid[1] used in the original TIGER
 cleanup in 2009, I have now created a similar routing grid for the USA
 and Australia.

 Australia: http://apmon.dev.openstreetmap.org/aus_routing_grid.html
 USA: http://apmon.dev.openstreetmap.org/us_routing_grid.html

 It takes the top cities of the country and calculates the routing
 distances between them and displays the result in a routing grid. It
 allows to check the top tear inter city road network. Unusually long
 routes are likely caused by broken data and indicates where things need
 fixing.

 In the grid, all routes that are more than 5% longer or slower than
 expected* are show in red, otherwise they are considered as
 superficially OK. The reference values are in brackets. If you click on
 the link, you will be sent to the detailed routing information.

 Unfortunately the situation, particularly in Australia, is pretty bad.
 In Australlia currently non of the routes between the top ten cities
 pass this criterion and in fact most of the routes can't be calculated
 at all any more due to disconnectedness of the road network.

 So for all those who are finished remapping their own area and are
 looking to help with a bit of armchair mapping, trying to get more of
 these routes green could be a good idea for arm chair mappers. Let's see
 how quickly we can get all of them green!

 The routing information is calculated using the Open Source Routing
 Machine ( http://map.project-osrm.org/ ) and if I am not mistaken,
 updates its data once a day. I will equally try and recreate those grids
 on a daily basis to help track progress on the remapping.

 Happy remapping,

 Kai

 * The time and distance that is expected is currently determined using
 google's directions API. Although not perfect by any means, it is
 probably the most reliable source for now as a reference.



 [1] http://wiki.openstreetmap.org/wiki/TIGER_fixup/250_cities/routing_grid

 ___
 talk mailing list
 talk@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/talk


 ___
 talk mailing list
 talk@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/talk




___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] City routing grid for Australia and the US

2012-07-21 Thread Svavar Kjarrval

On 21/07/12 21:21, Kai Krueger wrote:
 On 07/21/2012 01:05 PM, Simone Cortesi wrote:
 Yes please,
 I would like to do the same too...

 -S

 On Sat, Jul 21, 2012 at 8:56 PM, Svavar Kjarrval sva...@kjarrval.is wrote:
 I want to make a similar routing table file for my country. Any chance
 of giving us instructions on how to generate such routing grids of our own?

 - Svavar Kjarrval

 I have now pushed the code I used to generate those tables to github.
 ( https://github.com/apmon/RoutingGrid )

 It is a little java program that takes in a list of coordinates and
 city names and generates the html file for the routing grid.

 You can easily run it on your own list of coordinates / cities.

 Dennis, who is responsible for the OSRM server, was OK with me running
 the code against his server, and I suspect he wouldn't mind if others
 do the same.

 It uses Google's directions API as a reference, so it is subject to
 their terms. Currently they seem to allow 2500 requests per day, which
 would correspond to a maximum sized grid of 50 cities. It can cache
 the results from Google in a reference list, so you only need to query
 google once per city list.

 Kai

Thanks a lot! I had an idea of a larger list of co-ordinates and could
use this code to make a databased version. I'd probably have to host my
own OSRM instance so I wouldn't bombard the main one with so many
queries in a short time interval.

It would be a kind of a quality assurance checker where I'd not only
check links between cities/towns, but also links between some of the
addresses inside them. Maybe add important POIs in the country as well.
I really want the map to be of superior quality.

- Svavar Kjarrval


 On 21/07/12 18:32, Kai Krueger wrote:
 Hello everyone,

 Inspired by the US 250 cities routing grid[1] used in the original TIGER
 cleanup in 2009, I have now created a similar routing grid for the USA
 and Australia.

 Australia: http://apmon.dev.openstreetmap.org/aus_routing_grid.html
 USA: http://apmon.dev.openstreetmap.org/us_routing_grid.html

 It takes the top cities of the country and calculates the routing
 distances between them and displays the result in a routing grid. It
 allows to check the top tear inter city road network. Unusually long
 routes are likely caused by broken data and indicates where things need
 fixing.

 In the grid, all routes that are more than 5% longer or slower than
 expected* are show in red, otherwise they are considered as
 superficially OK. The reference values are in brackets. If you click on
 the link, you will be sent to the detailed routing information.

 Unfortunately the situation, particularly in Australia, is pretty bad.
 In Australlia currently non of the routes between the top ten cities
 pass this criterion and in fact most of the routes can't be calculated
 at all any more due to disconnectedness of the road network.

 So for all those who are finished remapping their own area and are
 looking to help with a bit of armchair mapping, trying to get more of
 these routes green could be a good idea for arm chair mappers. Let's see
 how quickly we can get all of them green!

 The routing information is calculated using the Open Source Routing
 Machine ( http://map.project-osrm.org/ ) and if I am not mistaken,
 updates its data once a day. I will equally try and recreate those grids
 on a daily basis to help track progress on the remapping.

 Happy remapping,

 Kai

 * The time and distance that is expected is currently determined using
 google's directions API. Although not perfect by any means, it is
 probably the most reliable source for now as a reference.



 [1] http://wiki.openstreetmap.org/wiki/TIGER_fixup/250_cities/routing_grid

 ___
 talk mailing list
 talk@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/talk

 ___
 talk mailing list
 talk@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/talk







signature.asc
Description: OpenPGP digital signature
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] City routing grid for Australia and the US

2012-07-21 Thread Kai Krueger
On 07/21/2012 04:56 PM, Svavar Kjarrval wrote:

 On 21/07/12 21:21, Kai Krueger wrote:
 On 07/21/2012 01:05 PM, Simone Cortesi wrote:
 Yes please,
 I would like to do the same too...

 -S

 On Sat, Jul 21, 2012 at 8:56 PM, Svavar Kjarrval sva...@kjarrval.is wrote:
 I want to make a similar routing table file for my country. Any chance
 of giving us instructions on how to generate such routing grids of our own?

 - Svavar Kjarrval

 I have now pushed the code I used to generate those tables to github.
 ( https://github.com/apmon/RoutingGrid )

 It is a little java program that takes in a list of coordinates and
 city names and generates the html file for the routing grid.

 You can easily run it on your own list of coordinates / cities.

 Dennis, who is responsible for the OSRM server, was OK with me
 running the code against his server, and I suspect he wouldn't mind
 if others do the same.

 It uses Google's directions API as a reference, so it is subject to
 their terms. Currently they seem to allow 2500 requests per day,
 which would correspond to a maximum sized grid of 50 cities. It can
 cache the results from Google in a reference list, so you only need
 to query google once per city list.

 Kai

 Thanks a lot! I had an idea of a larger list of co-ordinates and could
 use this code to make a databased version. I'd probably have to host
 my own OSRM instance so I wouldn't bombard the main one with so many
 queries in a short time interval.
OSRM really is amazingly fast (assuming you have a server with
sufficient ram to convert the data into a routing db in the first
place), so I don't see too much issue in principle in significantly
expanding the routing grid. Calculating a route from New York to Los
Angeles takes 500ms and that includes network round trip time across the
Atlantic (ping time to the server from here is 150 ms). Depending on how
far you want to expand it, you might even still be able to use the
current instance, although you would have to ask Dennis about that.


If there is interest, I will try and expand the routing grid my self
over the next couple of days, either to new countries or to more cities
in a country.

With the current code, the bigger short term issue is that it uses
Google as a reference source and its limited allowance. However, once
the routing problems are fixed again in OSM, there is no reason to not
use a known good snapshot of OSM data as a reference in future and use
it in quality assurance to check for any new broken routes. You could
also use a snapshot from before the bot ran if you have access to it.

Overall, this is really only a very small script that I hacked
together in a couple of hours yesterday of which most of the time was
spend in getting the coordinates for the cities list. So if you are
planning to make too many changes, you might be better of writing it
from scratch.

 It would be a kind of a quality assurance checker where I'd not only
 check links between cities/towns, but also links between some of the
 addresses inside them. Maybe add important POIs in the country as
 well. I really want the map to be of superior quality.

You would likely need to go about it a bit different than to display
routes in a grid (so the current code probably isn't a great basis), but
the idea of automated quality control by generating a large set of
routes between cities/towns/POIs has been floating around for quite a
while. It is one of the reasons why there is still a debate about
getting OSMF to operate a routing server itself to support these kind of
QA checks.

Personally, however, I suspect that an automated system will only every
be able to check a fraction of the most prominent (and important) routes
/ roads and it will be more important to expose as many mappers as
possible to the routing interface for them to try their own local routes
for which they know the optimal solution.

Kai


 - Svavar Kjarrval


 On 21/07/12 18:32, Kai Krueger wrote:
 Hello everyone,

 Inspired by the US 250 cities routing grid[1] used in the original TIGER
 cleanup in 2009, I have now created a similar routing grid for the USA
 and Australia.

 Australia: http://apmon.dev.openstreetmap.org/aus_routing_grid.html
 USA: http://apmon.dev.openstreetmap.org/us_routing_grid.html

 It takes the top cities of the country and calculates the routing
 distances between them and displays the result in a routing grid. It
 allows to check the top tear inter city road network. Unusually long
 routes are likely caused by broken data and indicates where things need
 fixing.

 In the grid, all routes that are more than 5% longer or slower than
 expected* are show in red, otherwise they are considered as
 superficially OK. The reference values are in brackets. If you click on
 the link, you will be sent to the detailed routing information.

 Unfortunately the situation, particularly in Australia, is pretty bad.
 In Australlia currently non of the routes between the top ten cities
 pass this