[pgrouting-dev] Support for Time Constraints
Jay Mahadeokar
jai.mahadeokar at gmail.com
Sun Jun 12 14:59:03 EDT 2011
On Sun, Jun 12, 2011 at 8:00 PM, Stephen Woodbridge <woodbri at swoodbridge.com
> wrote:
> Jay,
>
> Try:
>
> select class_id, count(*) as cnt from ways group by class_id oder by
> classid;
>
> Typically you should a a distribution in real world data something like:
>
> 5% limited access major highways
> 15% major roads
> 75% minor roads
> 5% trails, pedestrian ways, etc
>
> 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 :)
>
> http://workshop.pgrouting.org/chapters/advanced.html
>
Hi Steve,
Thanks for giving me the link. I somehow never tried doing advanced part of
the workshop.
Well, it is using routing database which we generate during this step:
http://workshop.pgrouting.org/chapters/osm2pgrouting.html
I am doing exact steps outlined there but unfortunately, after I run
osmtopgrouting command, get following output:
.....
<lots of mesages regarding different class name, and ids>
.......
class name = roundabout
class id = 401
class id = 401 name = roundabout added to type name=junction
Trying to load data
Trying to parse data
I find only the following 3 tables generated in routing database:
List of relations
Schema | Name | Type | Owner
--------+-------------------+-------+----------
public | geography_columns | view | postgres
public | geometry_columns | table | postgres
public | spatial_ref_sys | table | postgres
(3 rows)
The tutorial says a total of 8 tables should be generated.
I do not get any other warning or error messages.
On other hand, I am able to do all steps here:
http://workshop.pgrouting.org/chapters/topology.html correctly, and hence
till now I was working with pgrouting-workshop database.
I am sorry if this are very silly errors, but I have no previous experience
working with such data. Any hint/link why I am not able to generate routing
database?
> Looks like first digit is type and the three digits are from the classes
> table.
>
> -Steve
>
>
> On 6/12/2011 4:33 AM, Jay Mahadeokar wrote:
>
>>
>>
>> On Sun, Jun 12, 2011 at 1:32 PM, Anton Patrushev
>> <anton.patrushev at georepublic.de <mailto:anton.patrushev at georepublic.de>>
>>
>> wrote:
>>
>> Hi Jay,
>>
>> No, there was no specific meaning, just king of cyphering - first
>> digit for road class and then two last digits for road type.
>>
>>
>> Hi Anton,
>>
>> So, as you said last 2 digits are for road type. I can see they are
>> mainly 00, 01, 02, 06, 08, 09, 10, 11, 12 ,14, 17.
>>
>> Road class is just 1 or 4.
>>
>> Can I differentiate major highways, minor highways, streets etc using
>> this info?
>>
>> Anton.
>>
>> On 6/12/11, Jay Mahadeokar <jai.mahadeokar at gmail.com
>> <mailto:jai.mahadeokar at gmail.com>> wrote:
>> >> Hi Jay,
>> >>
>> >> I think that instead of just random times, I would take a different
>> >> approach to generate this data. 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.
>> >>
>> >> If we can get OSM data then it should be easy to populate the
>> table with
>> >> that data.
>> >>
>> >> -Steve
>> >>
>> >
>> > I am trying to write plpgsql query to generate time-dependent data
>> > corresponding to the ways table in pgrouting workshop. As
>> suggested by Steve
>> > above, instead of generating random data, I will follow patterns
>> (see above
>> > message) so that the data is nearer to the real worlds scenario.
>> >
>> > So, now I need to make distinction between highways, streets etc.
>> I saw the
>> > attribute class_id in ways table. It has 14 distinct values:
>> > class_id
>> >
>> > ----------
>> >
>> >
>> > 102
>> >
>> >
>> > 122
>> >
>> >
>> > 106
>> >
>> >
>> > 111
>> >
>> >
>> > 108
>> >
>> >
>> > 100
>> >
>> >
>> > 109
>> >
>> >
>> > 112
>> >
>> >
>> > 101
>> >
>> >
>> > 110
>> >
>> >
>> > 401
>> >
>> >
>> > 119
>> >
>> >
>> > 117
>> >
>> > 114
>> >
>> > Any specific meaning attached to these values? I did not find any
>> > information on the pgRouting-workshop website [1].
>> >
>> >
>> > Thanks in advance.
>> >
>> > [1] http://workshop.pgrouting.org/chapters/topology.html
>> >
>> > --
>> > Regards,
>> > -Jay Mahadeokar
>> >
>>
>>
>> --
>> Georepublic UG (haftungsbeschränkt)
>> Salzmannstraße 44,
>> 81739 München, Germany
>>
>> Anton Patrushev
>> CTO
>>
>> eMail: anton.patrushev at georepublic.de
>> <mailto:anton.patrushev at georepublic.de>
>>
>> Web: http://georepublic.de
>>
>> Tel: +49 (089) 420 959 519
>> Sip: 1959519 at sipgate.de <mailto:1959519 at sipgate.de>
>>
>>
>> Commercial register: Amtsgericht München, HRB 181428
>> CEO: Daniel Kastl
>> _______________________________________________
>> pgrouting-dev mailing list
>> pgrouting-dev at lists.osgeo.org <mailto:pgrouting-dev at lists.osgeo.org>
>>
>> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>>
>>
>>
>>
>> --
>> Regards,
>> -Jay Mahadeokar
>>
>>
>>
>> _______________________________________________
>> pgrouting-dev mailing list
>> pgrouting-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>>
>
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>
--
Regards,
-Jay Mahadeokar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20110613/d7bb7c56/attachment-0001.html
More information about the pgrouting-dev
mailing list