Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2011

    A problem that I cannot solve by myself

    Thanks for reading, I have a problem with the creation of a database which I don't have an idea where to start and I need the help of somebody with this kind of experience.

    I need to create a database, or graph system (you tellme what option is the best) or wathever, for the Road Map of my country.

    There's not a lot of routes, almost 20, but I need to know how to handle it, I need to understand how to start something like that and then I can "fly by myself". I don't know if there's possible to do it on a database or should I use graphics, or something.

    I cannot use google maps or something like that, we need to start this from the scratch, but I was looking for a solution since 24 hours ago and I can't do it by myself.

    I need directions from someone who's have the experience or at least give me a clue how to do it. I need to create a system that will search through the roads to get from one city to another. I know how works the A* search, but I don't know if this is the case that I should use.

    I have the roads information, distance among cities, but I don't know how should I do that on a database, or if I'm wrong, how to save that information to be used by an algorithm that will look for the accurate route from one city to another.

    Thanks in advance, and my apologyzes if this is not the correct place to write this question.


  2. #2
    Join Date
    Nov 2004
    out on a limb
    you say you want to find routes
    to do that reliably and accurately you need the geographical data.
    I don't know how mapping software stores its data internally ( I guess its going to be point by point with an associuation between two points that identfies there is a valid route between those two points. in the GPS mapping There's probably hordes of points as each curve, turning and so on is stored.

    for you purposes you are probably looking at something similar although with less data.
    you would need some location information (eg lat / long, probably expressed in degrees)
    ideally that location would be the midpoint of the road.
    a unique ID (yes you could use the lat long to uniquely identify the position but Its not that smart over time)

    I'd also want to add some other information such as road type, distance, speed limit
    then I'd want to define the next position on the road, that could be the next relevant turning point, speed limit, change in road type. if you want a map appearance then you'd also want to define each change in direction relevent to the scale you portray the map. ferinstance
    if the road follows a straight line from junction to junction then two points will do
    if the road gently meanders accross the rhumb line then two points may be sufficient if your map scale is not too small. however the distance travelled on thsat route will be larger as it isn't following the rhumb (direct) line. (a smaller map scale means the same features on the map cover a larger visible area to a large scale).

    if you mapping is about finding the quickest, or shortest or whatever routes (Im not sure what you mean by accurate route) and not about accurate representation of the geographical area then I think a juntion to junction approach will work.

    other information you may want could also include things like gradients. some sort of rule of thumb to identify what is a 'good' route for the proposed means of travel (eg you wouldnt' want to send a truck or bus down a very narrow lane, or up and down hairpin bends with steep gradients.

    you also need to allow for the different speed charadteristics to calculate fasates times. thoie speed characteristics include rates of acceleration, braking, expected speeds.
    agasn ferinstance the sped limit may be 70mph for a section of motorway. a person driving a car may elect to drive at 55, or 70 or more
    driving a van could be likewise
    driving a lorry the theoretical speed is say 70, but the vehicle may be speed restricted
    ridign a bike may mean th erider can achive higher average speeeds as the can carry more speed through corners, accelerate faster and so on

    equally when climbing on motorway / freeway / dual carriageway roads trucks and vans may struggle to maintain speed.

    all these factors affect what is a 'good' route

    also there is another factor
    trucks and busses may well want the shortest time (and you may need to factor in the time of travel), others may want the shortest distance, yet more may want the twistiest route (eg bikers)
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Oct 2011

    Thank you!

    thank you very very much! You help me a lot, when I start reading your response, the ideas come up to my mind like a flood, you opened my mind in sort way, so I now have a clue where to start and what to do, thank you a lot !

    Best regards,

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts