[pgrouting-users] routing_core_smart problem

Stephen Woodbridge woodbri at swoodbridge.com
Sun Dec 4 19:39:35 EST 2011


Hi Worth and all,

Thanks for the offer but no need for that now.
My main concern was that looking at it, it does not seem that we want to 
make it a part of the core functionality for a few reasons:

o it is not documented
o as pointed out it is not generalized and has some assumptions
o a lot of the code could be simplified and made more efficient nor is 
it the best example, although I'm sure it did the job that was needed at 
the time
o our experience has been that wrappers that get release as examples 
tend to get used as the "main" API to pgrouting and therefore need to be 
clear, easy to follow and well documented.

Having said that, we need some nice wrappers. I have written my own 
wrappers, but alas they also suffer from many of the same ills, I 
mentioned because I wrote them for my own use/reuse and not for the 
general public. If I can find some time it is on my list of things to do 
for pgrouting.

Thanks,
   -Steve

On 12/4/2011 6:35 PM, Worth Lutz wrote:
> As Daniel noted, the function will not work with all types of data.
>
> I cannot remember now but I had to change something in it to make it
> work with my data. I could diff against the original and tell you what
> if anyone is interested.
>
> It is a great example though. It taught me how to use pl/pgsql to solve
> problems I was having.
>
> Worth Lutz
>
> *From: * pgrouting-users-bounces at lists.osgeo.org
> [mailto:pgrouting-users-bounces at lists.osgeo.org] *On Behalf Of *Daniel Kastl
> *Sent:* Sunday, December 04, 2011 10:39 AM
> *To:* pgRouting users mailing list
> *Subject:* Re: [pgrouting-users] routing_core_smart problem
>
> On Mon, Dec 5, 2011 at 12:28 AM, Stephen Woodbridge
> <woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.com>> wrote:
>
> Hi Daniel,
>
> Who wrote the routing_core_smart.sql functions?
>
> Anton
>
>     Is there any documentation of them? It would be nice if we had:
>
> Right ... would be nice to have ;-)
>
> I actually just decided to publish the wrapper, because there were
> several questions in the past how the pgRouting demo could start the
> route from/to the point you clicked.
>
>     1. description of the major public entry points and what the
>     arguments should be.
>
> It even needs an extra table "network_statistics" to work.
>
> But on the other hand it was supposed to be an example of writing a more
> complex wrapper function. It's not really a generic function and may not
> work with any type of data.
>
> There are probably several possibilities to improve the functions.
>
> Daniel
>
>     2. comments in the code that explain what the overview strategy is
>     and/or a high level pseudocode of how it executes
>
>     Thanks,
>     -Steve
>
>
>
>     On 12/2/2011 9:57 PM, Daniel Kastl wrote:
>
>         Hi Lutz,
>
>         Thank you very much for sharing this information!
>         I have also created this ticket:
>         https://github.com/pgRouting/pgrouting-contrib/issues/3
>
>         So you're talking about the following two lines?
>
>         * Line 191
>         https://github.com/pgRouting/pgrouting-contrib/blob/master/wrapper/routing_core_smart.sql#L191
>         * Line 205
>
>
>         https://github.com/pgRouting/pgrouting-contrib/blob/master/wrapper/routing_core_smart.sql#L205
>
>         Best regards,
>         Daniel
>
>
>         On Sat, Dec 3, 2011 at 4:26 AM, Worth Lutz <wal3 at mindspring.com
>         <mailto:wal3 at mindspring.com>
>
>         <mailto:wal3 at mindspring.com <mailto:wal3 at mindspring.com>>> wrote:
>
>         Hi all,
>
>         I have found what appears to be a problem in one of the
>         routing_core_smart functions.
>
>         In the function locate_point_as_geometry there are two lines which
>         call the function geometryfromtext.
>
>         These functions are called when line_substring returns a point.
>
>         In the geometryfromtext function calls, there is no second argument
>         for the srid. This produces a geometry with a “-1” for the srid.
>
>         When I use shootingstar_smart in my script, MapServer fails on
>         trying to work with two geometries with different srids.
>
>         Adding the second argument to the geometryfromtext function fixed
>         this problem. The only geometry with the “-1” srid was the one
>         created by these function calls.
>
>         I hope this helps someone.
>
>         Worth Lutz
>
>
>         _______________________________________________
>         Pgrouting-users mailing list
>
>         Pgrouting-users at lists.osgeo.org
>         <mailto:Pgrouting-users at lists.osgeo.org>
>         <mailto:Pgrouting-users at lists.osgeo.org
>         <mailto:Pgrouting-users at lists.osgeo.org>>
>
>
>         http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>
>
>
>
>         --
>         Georepublic UG & Georepublic Japan
>
>         eMail: daniel.kastl at georepublic.de
>         <mailto:daniel.kastl at georepublic.de>
>         <mailto:daniel.kastl at georepublic.de
>         <mailto:daniel.kastl at georepublic.de>>
>         Web: http://georepublic.de <http://georepublic.de/>
>
>
>
>
>         _______________________________________________
>         Pgrouting-users mailing list
>         Pgrouting-users at lists.osgeo.org
>         <mailto:Pgrouting-users at lists.osgeo.org>
>         http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>
>
>     _______________________________________________
>     Pgrouting-users mailing list
>     Pgrouting-users at lists.osgeo.org <mailto:Pgrouting-users at lists.osgeo.org>
>     http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>
>
>
> --
> Georepublic UG & Georepublic Japan
> eMail: daniel.kastl at georepublic.de <mailto:daniel.kastl at georepublic.de>
> Web: http://georepublic.de <http://georepublic.de/>
>
> No virus found in this message.
> Checked by AVG - www.avg.com <http://www.avg.com>
> Version: 2012.0.1873 / Virus Database: 2102/4656 - Release Date: 12/04/11
>
>
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users



More information about the Pgrouting-users mailing list