[pgrouting-users] pgr_createTopology

Is pgr_createTopology deterministic in how it numbers nodes in a built topology?

Thanks,
Best,
Steve

On 11/30/2013 2:18 PM, Stephen Mather wrote:

Is pgr_createTopology deterministic in how it numbers nodes in a built
topology?

Stephen,

What do you mean by this?

If you build a topology on the same edge table twice, do we guarantee that the nodes numbers will be identical?

I think the answer is NO, on line:303 of src/common/sql/pgrouting_topology.sql there is no "order by" clause. This would need to be added to make it deterministic because relational set theory does not guarantee order of records in a query without explicitly including and "order by" clause.

Write a bug if you think this is needed and state why.

Thanks,
   -Steve

Cool, I’ll write a ticket. It would be mostly useful in the case of e.g. tutorial development.

Best,
Steve

···

On Sat, Nov 30, 2013 at 2:46 PM, Stephen Woodbridge <woodbri@swoodbridge.com> wrote:

On 11/30/2013 2:18 PM, Stephen Mather wrote:

Is pgr_createTopology deterministic in how it numbers nodes in a built
topology?

Stephen,

What do you mean by this?

If you build a topology on the same edge table twice, do we guarantee that the nodes numbers will be identical?

I think the answer is NO, on line:303 of src/common/sql/pgrouting_topology.sql there is no “order by” clause. This would need to be added to make it deterministic because relational set theory does not guarantee order of records in a query without explicitly including and “order by” clause.

Write a bug if you think this is needed and state why.

Thanks,
-Steve


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

Done. Issue #220.

Thanks,
Best,
Steve

···

On Sat, Nov 30, 2013 at 2:52 PM, Stephen Mather <stephen@smathermather.com> wrote:

Cool, I’ll write a ticket. It would be mostly useful in the case of e.g. tutorial development.

Best,
Steve

On Sat, Nov 30, 2013 at 2:46 PM, Stephen Woodbridge <woodbri@swoodbridge.com> wrote:

On 11/30/2013 2:18 PM, Stephen Mather wrote:

Is pgr_createTopology deterministic in how it numbers nodes in a built
topology?

Stephen,

What do you mean by this?

If you build a topology on the same edge table twice, do we guarantee that the nodes numbers will be identical?

I think the answer is NO, on line:303 of src/common/sql/pgrouting_topology.sql there is no “order by” clause. This would need to be added to make it deterministic because relational set theory does not guarantee order of records in a query without explicitly including and “order by” clause.

Write a bug if you think this is needed and state why.

Thanks,
-Steve


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

I don’t know if I did this correctly, but:

https://github.com/pgRouting/pgrouting/pull/221

···

On Sat, Nov 30, 2013 at 4:43 PM, Stephen Mather <stephen@smathermather.com> wrote:

Done. Issue #220.

Thanks,
Best,
Steve

On Sat, Nov 30, 2013 at 2:52 PM, Stephen Mather <stephen@smathermather.com> wrote:

Cool, I’ll write a ticket. It would be mostly useful in the case of e.g. tutorial development.

Best,
Steve

On Sat, Nov 30, 2013 at 2:46 PM, Stephen Woodbridge <woodbri@swoodbridge.com> wrote:

On 11/30/2013 2:18 PM, Stephen Mather wrote:

Is pgr_createTopology deterministic in how it numbers nodes in a built
topology?

Stephen,

What do you mean by this?

If you build a topology on the same edge table twice, do we guarantee that the nodes numbers will be identical?

I think the answer is NO, on line:303 of src/common/sql/pgrouting_topology.sql there is no “order by” clause. This would need to be added to make it deterministic because relational set theory does not guarantee order of records in a query without explicitly including and “order by” clause.

Write a bug if you think this is needed and state why.

Thanks,
-Steve


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

Hi Stephen,

Thanks for looking into this!
I just wanted to mention that it would be better, if a pull request would be in “develop” branch (I already didn’t look careful recently and just clicked “merge pull request” accidentally and it was merged into master branch).

So in general making changes in “develop” branch is better, because “develop” might be also ahead of “master” anyway.

Daniel

···

On Tue, Dec 3, 2013 at 11:54 AM, Stephen Mather <stephen@smathermather.com> wrote:

I don’t know if I did this correctly, but:

https://github.com/pgRouting/pgrouting/pull/221


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

On Sat, Nov 30, 2013 at 4:43 PM, Stephen Mather <stephen@smathermather.com> wrote:

Done. Issue #220.

Thanks,
Best,
Steve

On Sat, Nov 30, 2013 at 2:52 PM, Stephen Mather <stephen@smathermather.com> wrote:

Cool, I’ll write a ticket. It would be mostly useful in the case of e.g. tutorial development.

Best,
Steve

On Sat, Nov 30, 2013 at 2:46 PM, Stephen Woodbridge <woodbri@swoodbridge.com> wrote:

On 11/30/2013 2:18 PM, Stephen Mather wrote:

Is pgr_createTopology deterministic in how it numbers nodes in a built
topology?

Stephen,

What do you mean by this?

If you build a topology on the same edge table twice, do we guarantee that the nodes numbers will be identical?

I think the answer is NO, on line:303 of src/common/sql/pgrouting_topology.sql there is no “order by” clause. This would need to be added to make it deterministic because relational set theory does not guarantee order of records in a query without explicitly including and “order by” clause.

Write a bug if you think this is needed and state why.

Thanks,
-Steve


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

Resubmitted on the correct branch. In nominal tests here (not a full rebuild but just a loading of that sql file), it seems to retain node numbers very nicely.

Best,
Steve

···

On Tue, Dec 3, 2013 at 12:15 AM, Daniel Kastl <daniel@georepublic.de> wrote:

Hi Stephen,

Thanks for looking into this!
I just wanted to mention that it would be better, if a pull request would be in “develop” branch (I already didn’t look careful recently and just clicked “merge pull request” accidentally and it was merged into master branch).

So in general making changes in “develop” branch is better, because “develop” might be also ahead of “master” anyway.

Daniel


pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

On Tue, Dec 3, 2013 at 11:54 AM, Stephen Mather <stephen@smathermather.com> wrote:

I don’t know if I did this correctly, but:

https://github.com/pgRouting/pgrouting/pull/221


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

On Sat, Nov 30, 2013 at 4:43 PM, Stephen Mather <stephen@smathermather.com> wrote:

Done. Issue #220.

Thanks,
Best,
Steve

On Sat, Nov 30, 2013 at 2:52 PM, Stephen Mather <stephen@smathermather.com> wrote:

Cool, I’ll write a ticket. It would be mostly useful in the case of e.g. tutorial development.

Best,
Steve

On Sat, Nov 30, 2013 at 2:46 PM, Stephen Woodbridge <woodbri@swoodbridge.com> wrote:

On 11/30/2013 2:18 PM, Stephen Mather wrote:

Is pgr_createTopology deterministic in how it numbers nodes in a built
topology?

Stephen,

What do you mean by this?

If you build a topology on the same edge table twice, do we guarantee that the nodes numbers will be identical?

I think the answer is NO, on line:303 of src/common/sql/pgrouting_topology.sql there is no “order by” clause. This would need to be added to make it deterministic because relational set theory does not guarantee order of records in a query without explicitly including and “order by” clause.

Write a bug if you think this is needed and state why.

Thanks,
-Steve


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users