Giter Club home page Giter Club logo

Comments (5)

robhawkes avatar robhawkes commented on June 20, 2024

Currently experimenting with different snapping tolerances on the pgr_createTopology function. Will report back with findings.

from osm2pgrouting.

robhawkes avatar robhawkes commented on June 20, 2024

Ok, ran the following (changing the tolerance in Export2DB.cpp from 0.00001 to 0.0000001):

SELECT pgr_createTopology('ways', 0.0000001, 'the_geom', 'gid');

Followed by:

SELECT pgr_analyzeGraph('ways', 0.0000001,'the_geom','gid','source','target');

Which stated that the topology was "OK"

Now there don't seem to be any ways with the same source and target, as verified by running:

SELECT * FROM ways WHERE source = target

I need to continue testing to see if this causes any other problems with my routes, but so far so good.

from osm2pgrouting.

dkastl avatar dkastl commented on June 20, 2024

Thanks for looking at this. The "snapping tolerance" is an attribute of the pgRouting function and if there exist tiny ways as you mention, then this looks like a data issue. If these ways are valid though, then the tolerance needs to be smaller.
But this means that other areas, where mappers are not careful with connecting ways would get disconnected networks.

Probably it would be best to make the snapping tolerance an optional parameter of osm2pgrouting.

from osm2pgrouting.

robhawkes avatar robhawkes commented on June 20, 2024

The ways mentioned were definitely legitimate (tiny bits of road wedged between 2 slightly-offset junctions), however I understand that changing the tolerance has an impact on others who may not have these issues.

Having the tolerance as a user-definable parameter (and mention in the documentation) would be perfect.

from osm2pgrouting.

cvvergara avatar cvvergara commented on June 20, 2024

With the alpha version this no longer happens
Test on Washington dc area:

select gid from ospr.ways where source = target;
 gid 
-----
(0 rows)

from osm2pgrouting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.