Logo TIB AV-Portal Logo TIB AV-Portal

Routing for Driving Pleasure

Video in TIB AV-Portal: Routing for Driving Pleasure

Formal Metadata

Routing for Driving Pleasure
Title of Series
Part Number
Number of Parts
CC Attribution 3.0 Germany:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Release Date

Content Metadata

Subject Area
Americans have miles and miles of open highways. Set the cruise and drive for hours in straight lines. Routing a user to find the fastest way from an origin to a destination is performed by any number of providers. But what if you're not interested in the shortest route? What if you're looking for the most scenic route? The most entertaining? This is a problem for planners of regularity rallies. Planners hope to provide challenging roads at legal speeds that avoid heavily residential and developed areas. OpenStreetMap, PostGIS, QGIS, and pgRouting to the rescue! Learn how to create alternative routing-cost structures to find and create new types of routes. An affinity for routing, driving, and/or gravel roads a plus. Dan "Ducky" Little (dbSpatial LLC)
Keywords dbSpatial LLC
web geometric Computer animation mapping states internet SLAM states reduce bits part platforms
point presentation Open Source code breadth lines time directions workstation sources curve maximal Contracts distances part total consultant number plan measures mathematics specific different configuration Geschwindigkeit circle tasks systems curve Graph point breadth lines open subsets distances mathematics specific Location Computer animation Software circle case topology computer scientist Right figure record WAN
script point mathematics Computer animation topology Java sets shell melt Right sun
topological link screens programme Computer animation Lecture/Conference building Development vertices part form computational
script point presentation Computer animation mapping terms topology calculations lines Board morphological
Actions user guide Computer animation time part distances Routing training
Actions Computer animation different real directions box lines Routing
area sources twin Computer animation states different directions coma contrast lines Actions
sources Computer animation orders projects unit coma ups sort form
presentation bottom Manufacturing execution system breadth differential states code integrators time views ones loss part Arm mathematics free energy rates high-speed different single model algebraic sources man algorithm relation maximal bits measures Demo connections curves sort reading spacetime record geometric point meter functionality services Sequel factor sign in events attributes diffs naturally level selection coma lines Actions system call residual loop Computer animation case calculations Gravity Routing
Computer animation
the alright so to I'll start with a
little bit more detail reduction from about myself and on the internet and usually known as the Duma sky and OSU web mapping platform I work with another guy from Minnesota called data bitter and together we run DB spatial I also have a habit of doing reckless things with automobiles in the 1st example is when I crashed my 1st rally car upside down in the woods you can't really tell because this is about 1 in the morning I am from the great state of Minnesota if you've think the US and you've never been there it's because it's the part of the country that's really really cold and bearing and I don't blame you it's where I'm from and how I party as trust me I'm getting the GIS in a minute but 1st
and it's a more about things that other things I really enjoy the rally is little more popular here in Europe than it is in the US last summer give this presentation I really needed to explain by the and there are 2 flavors of the 1st kind is the kind where you take a car like the 1 I'm driving over here and you try not ministries you drive through woods very very quickly and on that particular day of my car got up to 100 miles an hour on gravel roads between trees and the Audi quarter is really popular example of that kind of a car but there's another kind of rally called H were rally
or at times the distance traveled and the idea is you want to arrive at a very specific location very specific set of locations at a very very specific time this is actually how rally competitions started as you travel on average about 150 miles anyone check-ins you up to a dozen different checkpoints at exactly on a 2nd or a half a 2nd depending on how that it's being scored and speed average about 45 miles an hour so you're doing roughly 70 80 kilometers an hour and not missing a single 2nd when you get to different places that doesn't sound too tree for you you're welcome to come and try and answer it their local clubs all over the world for this kind of stuff alright GAS that's open from right GIS work not just me standing up here talking about cars and so when I explained my wife that'd be talking about reality and then tomorrow and Friday get to talk about motor sport she's what kind conferences go to a node is about GIS in his will get to it planning a rally can be very very difficult finding interesting roads to drive on making sure they're all interconnected in keeping everyone on time is actually really really tricky task just to set up so I sort of thought about it and thought will sounds like a problem a computer consultant got lots of data and that curves so it's all basically routing but what we do right now for what is the classic routing use case it is to take the least amount of time or to get to some place the fastest so your minimizing distance maximizing velocity and really that's kind of boring particularly if you ever been to the US you might be somewhat familiar with the interstate system and it is composed of these kinds of lines is a giant network where you set the cruise control at roughly 100 kilometers an hour and you hope that there's a decent radio station on within the next 100 miles and that can boring but it's also the fastest way to get from place to place so whenever you enter directions in Google Maps that's where it's going to take you so the next question was what makes a rope fund had we classify something as far as before we even get to that you know the computer science part of how you actually have fun in a car and so the ways you don't have fun are if it's really really long there's lots of traffic people complaining when you drive past if you go down a row of homes someone's likely to call the petite size but if you're having fun and it's twisty it's externally you've got some speed but you don't feel completely dangerous and there's graph now I know I'm completely subjective but I put a disclaimer on the slide so that you know that the gravel is described by as the presenter which less time command this is actually something I got to learn about will trying to solve this problem and called tortuosity and it is a way of relatively measuring how curvy all line and it's basically the distance of the line so how long it is if you were to calculate it out for those of us familiar with posters st length versus the distance between the starting and the end point a boring example a straight line has a tortuosity of 1 because of the starting and the ending point that distance is equal to the distance that the measured distance of aligners calculate distance line this is a more fun example because there's a curve and my artistic skills in presenting are very obvious here if anyone needs a contract for a good-looking hand-drawn presentation for half a circle i'm gonna find a and you can see here we do all the math and it's got a higher tortuosity value which means it's more fun so today due to find some roads I got the OpenStreetMap data for Minnesota and I use PostgreSQL is and PT routing which if you're new to the open source sectors great documentation on how to install all of that stuff but after you've installed it is where things can get them a little or I for example I found that even loading up the data can be problematic there are a number of different ways to create topologies with the various open-source tools and the 2 that I tried were always the PG routing in but I got frustrated when the 0 around which is 0 7 2 0 it worked really really well for these examples but I need to can we disclose that the licenses and particularly open and I tried to find the source and gets more clarity on it but it's not what I would consider a and free tool and so that the data all I had to do was figure out this very simple command and and if you're doing the same thing you'd have to go through and discover all of those command options yourself or like a good presenter all my code is on get
hold so the shell scripts that make everything easier right so get all the data loaded calculate the tortuosity which is a really simple script again also available and at home and we
finally get to the point where you can make a topology this is where things can get a little risky
because as I mentioned before and generally developer
I like to code things and now many user desktop GIS and many do it as a part of a light down so realistically folks be warned alright here
is right see I have it on the wrong screen the computer use
have it down all right so this is the map that I got from those 1st 2 steps this is where each 1 purple nodes is an a node in the topology that is generated by Ellis and to and each 1 of these lines is systematically mapped to measure the amount of funds and the
darker the orange the morphology as for example down here there's a red road and there so few others this is only in medium road in terms of entertainment but um this was all generated by the interest you well a 2 we can give my presentation back on board here as and and so we have so I had all of that data that I needed so the next thing I wanna do is built around and around based on that fun calculation so created script greater Python script that takes into geometric points and it will create out now so that out at 1 of the 1 of the best
parts about these rallies they go for miles and miles and miles and you're paying attention to the road your speed the entire time is that generally speaking in the morning you start with coffee then you do some stuff and step 3 is you and appear so in every 1 of my examples I'm giving you I picked a coffee house that was some distance away from apart so we're going to get from coffee took ball are taking the most entertaining about possible now you're going the reverse if you're going from the bar coffee that should probably be a public transit route i'd that's not covered here I
don't think there's a way to find a more fun training Cervantes UGS for this which is conveniently already happened extreme so the first one
is is actually a rally that I have brought so this is using real data action and turned off since you difference in the lines so the green line it is the most direct route from particular bar there like in Duluth Minnesota to the excuse me that's the coffee house but to a and bar that's basically in the middle of nowhere in a town of less than a thousand people but it's seats 300 and even 3rd of town in that box and that's the most direct way to get to it on the other
side what you'll see is the purple line which is the most fun way to get there and what I did some statistics on around about 75 per cent of that is gravel roads some of them I know for a fact are used for logging so they're barely wider than the car and you can just go drive up there using those
directions but the other example I have is 1 that's more by a populated area this is in the twin cities which is the is that which is near the the largest place but the largest population center in Minnesota so again you start a coffee you ended beer and you go out roughly halfway across the state of Minnesota doing this and again you can get a kind of a kind of contrast and the difference between routing for speed and running for fun it's all about having the squiggly lines that look like static if there were sound and all right so
well I did this basically for trying to find from hundreds to drive on for myself and my friends into that kind of thing you can really use this technique for any sort of routing we have a very specific costs and almost all of the tools can be recycled in order to do so and and I really hope that by checking this stuff out or using some I couldn't get home and you can actually save more people sometime in headache when they're trying to figure out how to do these kind of projects and also if you are inspired by traders and fund driving in 1 and it's an interesting people and you can always try rally there it again there's clubs all over the world that's my local club from back home and thank you very much the you know so that's not the the lower the
operating units this form so that means that all of them so you all
all this is about that 1 you know was the you know that was my some of following is still so 1 of the things that so so let I I can I can repeat the question so 1 of the problems with calculating tortuosity which I also ran into is that it is scale-dependent so if you have some this the the it's in a sense an average so the longer the line is that he had a really Curry did in the middle but it was straight otherwise and you could get a misread on the tortuosity so 1 of the things I did when calculating it is I actually wrote some code and you have to forgive me if it is not and have to actually break up the the maximum allowable segment length and I think it's said that to somewhere around 3 or 400 meters so that you're never calculated tortuosity furry node-to-node connection I was more than 3 400 meters long necks I ran into that exact same thing which is because it's a perpetuity front frustrating and where I'm from most of the roads are designed univariate grid layout just because we have the space and so you can have 1 road that is a node that is about 3 miles long you here year year you can on 5 kilometers 1st single segment in length and in the end it doesn't we have a very high tortuosity but somewhere in the middle it runs through forest and at that point they were going around ponds and ditches and logs and things and then it'll have kind big deal so the irony of this ransom problem but but setting a grading your data or a or just adding extra nodes fixed but we calculate more cleanly it the latter think if other presentation was 1 and then the sitting around doing it generally minimize the costs and in this case you want to maximize the from some other give translate the following to the costs select max from foreign and then invert the dataset so then they would do the minimum I use subtraction so I found the maximum fine level and then an inverted the columns that all of the PG routing algorithms work required us to follow the things it thinks that so that there's 2 columns in the dataset function like the 1st of which is the calculated which goes from 0 to much fun and then the there is a 2nd call on that um does a little bit of math just to in inverted so that the most fun roads have the least amount of costs that way when PG routing does it still trying to minimize costs from a to B but what it really ends up doing is it interacts with most fun so that's the funds and our correspond to the length of the rows or others in completely independent from the length of the the final reading that corresponds to 2 factors the 1st of which is the tortuosity so how curvatures and that's a relative measure that is scale-dependent butts relative measure and the 2nd is I had a multiplier to make it more fun if it was a gravel road surface flight it as the as the service being gravel ago like a double rating because really loose gravel roads in the US have the car going on like this at high speed anyway so it's more fun that way we think and crashed thank you but had 2 comments did you consider it bringing about a vertical curvature as well because the road goes up and down should be more fun than a flat road and yes I did and ran out of time for the the other on side of that is where I live the elevation changes are not as substantial as they are in and various parts of Europe and the highest differential over road is the 300 meters and another just small common maybe bring in the amount of snow or ice that could increase the fun as well but it very much could luckily that can be done and based on and latitude in Minnesota basically from the bottom of the state as you get farther north there will be more snow and ice thank you for the presentation of and you notion of is very specific hazardous have that I was just thinking as you did in some sort of altered the listening try out of tools to provide a synchronic to attend to end users um we some landmark contributed to a describe a point of view so instead of thinking just geometry of being a you have used some attribute like gravity applying and model to to a crawled was a best point of view if you had to be done like landmarks and the point of view of the nature what the yeah and I said to a lot of times when and we're doing these types of events that you find yourselves out in pretty scenic and places and but that that's actually a suggestion someone else give me while I was just spit balling this presentation is how how do you find most scenic route some places where most beautiful the most landmark and ostensibly if you had the data you could go from landmark to landmark as your way points and calculate times and things like that so 1 last question of I is just last I'm sure there are other measures for curving for Corvinus as our 1st further no so so there there are I don't remember everything and everything but I know that they are ones based on uh the scene so course and this was something that the residuals are considered those those kind of I will I went through a couple of different um methods for calculating currently but to make it computationally realistic without having to do a lot of it as I found I found some of the others to be too slow this is a very quick way for me to um calculate the tortuosity and and then classified and some of the other methods found required during the integrals over the whole of the line and so I didn't really want add another insert loop for calculating the integral even if I worked out the algebra for it this this was easy to translate the sequel and was very very fast so I have to be developed but I'm sure encountered cartographic generalization this kind of measure is very important to all but don't to make a readable a readable and it is kind of very curvy lines in the in the in the Alps and things like this so that that's why I know a little bit that there must be some other but think you get then they feel for that