Skip to content

Is osm2pgrouting 2.1 compatible with pgr_dijkstra? #129

Open
@lab348

Description

@lab348

In version 2.0 of osm2pgrouting length was not calculated in m, but rather in degrees, so I used this query to fix this:
UPDATE public.ways
SET
length= ST_Length(the_geom::geography),
reverse_cost= CASE WHEN length>=reverse_cost THEN ST_Length(the_geom::geography) ELSE ST_Length(the_geom::geography)_1000000 END,
to_cost= CASE WHEN length<=reverse_cost THEN ST_Length(the_geom::geography) ELSE ST_Length(the_geom::geography)_1000000 END;

In version 2.1 I see that there already is length_m, so I could use it, but I am concerned about reverse_cost. It is still in degrees and negative numbers rather than *1000000 are used for one way streets. Will pgr_dijkstra be compatible with such values or should I run above query?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions