<br><br><div class="gmail_quote">On Sun, Jun 12, 2011 at 8:00 PM, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Jay,<br>
<br>
Try:<br>
<br>
select class_id, count(*) as cnt from ways group by class_id oder by classid;<br>
<br>
Typically you should a a distribution in real world data something like:<br>
<br>
5% limited access major highways<br>
15% major roads<br>
75% minor roads<br>
5% trails, pedestrian ways, etc<br>
<br></blockquote><div><br>Hi, <br><br>We have got following data in the pgrouting-workshop ways table.<br></div><div><br>pgrouting-workshop=# select distinct(count(class_id)) as no_of_entries,class_id from ways group by class_id order by no_of_entries;<br>
no_of_entries | class_id <br>---------------+----------<br> 2 | 111<br> 11 | 117<br> 17 | 102<br> 21 | 101<br> 43 | 100<br> 45 | 122<br>
90 | 112<br> 109 | 401<br> 221 | 108<br> 234 | 106<br> 248 | 109<br> 252 | 119<br> 1259 | 114<br> 2761 | 110<br>
(14 rows)<br><br><br>The classes table in routing database gives more information on the class_id field. Also available here: <a href="http://workshop.pgrouting.org/chapters/advanced.html">http://workshop.pgrouting.org/chapters/advanced.html</a><br>
<br>So, we have: <br><br>class_id name no_of_entries<br><br>110 track 2761<br>114 path 1259<br>119 steps 252<br>109 service 248<br>
106 primary 234<br>108 living_street 221<br>401 roundabout 109<br><br>These are the major class_types with more than 100 entries in ways table. <br><br>Steve had earlier suggested following idea for time dependent data generation:<br>
<br> "If we think about "rush hour" around a major city, the highways (based
on road class) flowing into the city in the morning would get reduced
average speeds you could apply curve like average speed*percent based on
6am (90%), 7am(75%), 8am(45%), 9am(50%), 10am(85%) and do something
similar in the evening rush. It might be too hard to figure on direction
of flow in/out bound so apply the curve to all traffic. The assumption
is that the highways are congested which will force traffic onto side
streets. You might want to also reduce the lower class speeds by say a
constant 80% during rush hour."<br><br>So, what classes should I consider as highways, what classes as streets and so on? Or What should be the pattern of speed changes in various classes? <br><br>The main focus would be, we should be routed through less congested areas during rush hours right?<br>
<br>Once we finalise this model, I can write the plsql function to generate the corresponding data.<br>
<br><br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Well in the US anyway. Also if this is OSM data then you might get a better clue on classes by looking to that .... OH!, look what I found in google :)<br>
<br>
<a href="http://workshop.pgrouting.org/chapters/advanced.html" target="_blank">http://workshop.pgrouting.org/chapters/advanced.html</a><br>
<br>
Looks like first digit is type and the three digits are from the classes table.<br>
<br>
-Steve<div class="im"><br>
<br>
On 6/12/2011 4:33 AM, Jay Mahadeokar wrote:<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
<br>
<br>
On Sun, Jun 12, 2011 at 1:32 PM, Anton Patrushev<br></div>
<<a href="mailto:anton.patrushev@georepublic.de" target="_blank">anton.patrushev@georepublic.de</a> <mailto:<a href="mailto:anton.patrushev@georepublic.de" target="_blank">anton.patrushev@georepublic.de</a>>><div class="im">
<br>
wrote:<br>
<br>
Hi Jay,<br>
<br>
No, there was no specific meaning, just king of cyphering - first<br>
digit for road class and then two last digits for road type.<br>
<br>
<br>
Hi Anton,<br>
<br>
So, as you said last 2 digits are for road type. I can see they are<br>
mainly 00, 01, 02, 06, 08, 09, 10, 11, 12 ,14, 17.<br>
<br>
Road class is just 1 or 4.<br>
<br>
Can I differentiate major highways, minor highways, streets etc using<br>
this info?<br>
<br>
Anton.<br>
<br>
On 6/12/11, Jay Mahadeokar <<a href="mailto:jai.mahadeokar@gmail.com" target="_blank">jai.mahadeokar@gmail.com</a><br></div><div><div></div><div class="h5">
<mailto:<a href="mailto:jai.mahadeokar@gmail.com" target="_blank">jai.mahadeokar@gmail.com</a>>> wrote:<br>
>> Hi Jay,<br>
>><br>
>> I think that instead of just random times, I would take a different<br>
>> approach to generate this data. If we think about "rush hour"<br>
around a<br>
>> major<br>
>> city, the highways (based on road class) flowing into the city<br>
in the<br>
>> morning would get reduced average speeds you could apply curve like<br>
>> average<br>
>> speed*percent based on 6am (90%), 7am(75%), 8am(45%), 9am(50%),<br>
10am(85%)<br>
>> and do something similar in the evening rush. It might be too<br>
hard to<br>
>> figure<br>
>> on direction of flow in/out bound so apply the curve to all<br>
traffic. The<br>
>> assumption is that the highways are congested which will force<br>
traffic<br>
>> onto<br>
>> side streets. You might want to also reduce the lower class<br>
speeds by say<br>
>> a<br>
>> constant 80% during rush hour.<br>
>><br>
>> If we can get OSM data then it should be easy to populate the<br>
table with<br>
>> that data.<br>
>><br>
>> -Steve<br>
>><br>
><br>
> I am trying to write plpgsql query to generate time-dependent data<br>
> corresponding to the ways table in pgrouting workshop. As<br>
suggested by Steve<br>
> above, instead of generating random data, I will follow patterns<br>
(see above<br>
> message) so that the data is nearer to the real worlds scenario.<br>
><br>
> So, now I need to make distinction between highways, streets etc.<br>
I saw the<br>
> attribute class_id in ways table. It has 14 distinct values:<br>
> class_id<br>
><br>
> ----------<br>
><br>
><br>
> 102<br>
><br>
><br>
> 122<br>
><br>
><br>
> 106<br>
><br>
><br>
> 111<br>
><br>
><br>
> 108<br>
><br>
><br>
> 100<br>
><br>
><br>
> 109<br>
><br>
><br>
> 112<br>
><br>
><br>
> 101<br>
><br>
><br>
> 110<br>
><br>
><br>
> 401<br>
><br>
><br>
> 119<br>
><br>
><br>
> 117<br>
><br>
> 114<br>
><br>
> Any specific meaning attached to these values? I did not find any<br>
> information on the pgRouting-workshop website [1].<br>
><br>
><br>
> Thanks in advance.<br>
><br>
> [1] <a href="http://workshop.pgrouting.org/chapters/topology.html" target="_blank">http://workshop.pgrouting.org/chapters/topology.html</a><br>
><br>
> --<br>
> Regards,<br>
> -Jay Mahadeokar<br>
><br>
<br>
<br>
--<br>
Georepublic UG (haftungsbeschränkt)<br>
Salzmannstraße 44,<br>
81739 München, Germany<br>
<br>
Anton Patrushev<br>
CTO<br>
<br>
eMail: <a href="mailto:anton.patrushev@georepublic.de" target="_blank">anton.patrushev@georepublic.de</a><br></div></div>
<mailto:<a href="mailto:anton.patrushev@georepublic.de" target="_blank">anton.patrushev@georepublic.de</a>><div class="im"><br>
Web: <a href="http://georepublic.de" target="_blank">http://georepublic.de</a><br>
<br>
Tel: +49 (089) 420 959 519<br></div>
Sip: <a href="mailto:1959519@sipgate.de" target="_blank">1959519@sipgate.de</a> <mailto:<a href="mailto:1959519@sipgate.de" target="_blank">1959519@sipgate.de</a>><div class="im"><br>
<br>
Commercial register: Amtsgericht München, HRB 181428<br>
CEO: Daniel Kastl<br>
_______________________________________________<br>
pgrouting-dev mailing list<br></div>
<a href="mailto:pgrouting-dev@lists.osgeo.org" target="_blank">pgrouting-dev@lists.osgeo.org</a> <mailto:<a href="mailto:pgrouting-dev@lists.osgeo.org" target="_blank">pgrouting-dev@lists.osgeo.org</a>><div class="im">
<br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
<br>
<br>
<br>
<br>
--<br>
Regards,<br>
-Jay Mahadeokar<br>
<br>
<br>
<br>
_______________________________________________<br>
pgrouting-dev mailing list<br>
<a href="mailto:pgrouting-dev@lists.osgeo.org" target="_blank">pgrouting-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
</div></blockquote><div><div></div><div class="h5">
<br>
_______________________________________________<br>
pgrouting-dev mailing list<br>
<a href="mailto:pgrouting-dev@lists.osgeo.org" target="_blank">pgrouting-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>-Jay Mahadeokar<br><br>