[Routing] OSM data to database
RP
rauldiogo at yahoo.com
Thu May 13 05:03:42 BST 2010
Hi, thanks for helping out.
What i need is to build a database with the following tables:
- nodes : with the lat and lng points, category of the road (extracted
from the osm file) and possible other info like elevation that i would
get from other sources
- edges : this would ideally have the from_node to_node fields,
direction (oneway or both) road category, length and road name.
- an edges_nodes: this would have a field that identifies the edge.
Also, a from_node and to_node fields that would describe the points that
link the start and end nodes of the edge.
As I said i'm starting this work and for what i have read so far this
would be enough information for a routing algorithm to run.
Do you have any suggestions on how i could build this tables or at least
export the data to a csv file in excel? Your tool only works in Linux
right? I'm thinking about building a parser myself to do this but i
thought something like this would already be available.
Once again, thanks for you help.
Regards
On 11-05-2010 22:05, Tristram Gräbener wrote:
> Hello,
>
> As I'm the developper of osm4routing if you give more informations of
> what you want, I should be able to add a support.
>
> I'm bad with windows environment, so i'm not really how to build it for windows.
>
> And considering the geometry, I create a nodes tables, and edges
> table, and this edges table contains the geometry (in wkt format, but
> if you specify how you would like to have it, it shouldn't be
> difficult to adapt). I however don't keep references to the OSM nodes.
>
> As you want to do routing, you will need a graph form I suppose. I
> don't think that osmosis does this kind of transformations.
>
> On Thu, May 6, 2010 at 3:36 AM, RP<rauldiogo at yahoo.com> wrote:
>> Hi,
>> i'm starting to build a cycling web routing application using OSM
>> data for Lisbon. Basically the user selects a start and end point and
>> some criteria for the trip and it should display the map with route
>> drawn on it. The routing itself would have to be coded by me since some
>> parameters like the elevations, pavement and other type of criteria
>> should be included.
>>
>> I have several doubts that I'm hoping somebody can point me in the right
>> direction to solve them:
>> . I got the osm dataa of the city and i want to put it in a database. I
>> have been looking for ways to do this and osmosis, osm4routing, OSM
>> Library (Coded in ruby with the possibility to convert to SQLITE) and
>> pgRouting (PostgreSQL) are some of the possibilities. Which one is most
>> suited for my goal? And for what i have seen the tutorials are mainly
>> for Unix system, and since I work in a Windows enviroment which one is
>> more suited?
>>
>> . I understand some of the tools create the nodes table as well as the
>> ways table, which has a start and end node, length and possible other
>> attributes. But my problem is that if i want to draw the route (as well
>> as understand the elevations in a way), i have to know exactly which
>> nodes belong to a way, not just the start and end node. Is this possible
>> to do?
>>
>> Regards,
>>
>> Raul
>>
>>
>>
>>
>> _______________________________________________
>> Routing mailing list
>> Routing at openstreetmap.org
>> http://lists.openstreetmap.org/listinfo/routing
>>
More information about the Routing
mailing list