Hi Steve,<div><br></div><div>I fully agree. Well, the idea of the pgrouting-contrib repository is to collect stuff like that: wrapper examples, scripts like the one to create a pgRouting database template, etc..</div><div>

The purpose of this repository is not to provide widely tested and perfect wrappers. But as Worth said, it can be of great help to have some examples if you want to write your first own wrapper function. And it&#39;s not a good idea to put too many wrapper functions into core library. There are already too many.</div>

<div><br></div><div>So I think it&#39;s better to publish &quot;unfinished&quot; and custom code samples, because that still helps users more than no examples at all, right? ;-) In the worst case it&#39;s just there and can be taken as a reference to answer questions in the mailing list, in the best case someone contributes feedback or even improvements.</div>

<div><br></div><div>Unfortunately it pgrouting-contrib has never grown beyond the one wrapper and a few other things. Probably it wasn&#39;t explained clear enough that everyone is welcome to add their examples there. Or it&#39;s too difficult to contribute.</div>

<div><br></div><div>Daniel</div><div><br></div><div><br></div><div><br></div><div><br><div class="gmail_quote">On Mon, Dec 5, 2011 at 9:39 AM, Stephen Woodbridge <span dir="ltr">&lt;<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Worth and all,<br>
<br>
Thanks for the offer but no need for that now.<br>
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:<br>
<br>
o it is not documented<br>
o as pointed out it is not generalized and has some assumptions<br>
o a lot of the code could be simplified and made more efficient nor is it the best example, although I&#39;m sure it did the job that was needed at the time<br>
o our experience has been that wrappers that get release as examples tend to get used as the &quot;main&quot; API to pgrouting and therefore need to be clear, easy to follow and well documented.<br>
<br>
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.<br>


<br>
Thanks,<br>
  -Steve<div class="im"><br>
<br>
On 12/4/2011 6:35 PM, Worth Lutz wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
As Daniel noted, the function will not work with all types of data.<br>
<br>
I cannot remember now but I had to change something in it to make it<br>
work with my data. I could diff against the original and tell you what<br>
if anyone is interested.<br>
<br>
It is a great example though. It taught me how to use pl/pgsql to solve<br>
problems I was having.<br>
<br>
Worth Lutz<br>
<br></div>
*From: * <a href="mailto:pgrouting-users-bounces@lists.osgeo.org" target="_blank">pgrouting-users-bounces@lists.<u></u>osgeo.org</a><br>
[mailto:<a href="mailto:pgrouting-users-bounces@lists.osgeo.org" target="_blank">pgrouting-users-<u></u>bounces@lists.osgeo.org</a>] *On Behalf Of *Daniel Kastl<br>
*Sent:* Sunday, December 04, 2011 10:39 AM<br>
*To:* pgRouting users mailing list<br>
*Subject:* Re: [pgrouting-users] routing_core_smart problem<div class="im"><br>
<br>
On Mon, Dec 5, 2011 at 12:28 AM, Stephen Woodbridge<br></div><div><div class="h5">
&lt;<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a> &lt;mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>&gt;&gt; wrote:<br>
<br>
Hi Daniel,<br>
<br>
Who wrote the routing_core_smart.sql functions?<br>
<br>
Anton<br>
<br>
    Is there any documentation of them? It would be nice if we had:<br>
<br>
Right ... would be nice to have ;-)<br>
<br>
I actually just decided to publish the wrapper, because there were<br>
several questions in the past how the pgRouting demo could start the<br>
route from/to the point you clicked.<br>
<br>
    1. description of the major public entry points and what the<br>
    arguments should be.<br>
<br>
It even needs an extra table &quot;network_statistics&quot; to work.<br>
<br>
But on the other hand it was supposed to be an example of writing a more<br>
complex wrapper function. It&#39;s not really a generic function and may not<br>
work with any type of data.<br>
<br>
There are probably several possibilities to improve the functions.<br>
<br>
Daniel<br>
<br>
    2. comments in the code that explain what the overview strategy is<br>
    and/or a high level pseudocode of how it executes<br>
<br>
    Thanks,<br>
    -Steve<br>
<br>
<br>
<br>
    On 12/2/2011 9:57 PM, Daniel Kastl wrote:<br>
<br>
        Hi Lutz,<br>
<br>
        Thank you very much for sharing this information!<br>
        I have also created this ticket:<br>
        <a href="https://github.com/pgRouting/pgrouting-contrib/issues/3" target="_blank">https://github.com/pgRouting/<u></u>pgrouting-contrib/issues/3</a><br>
<br>
        So you&#39;re talking about the following two lines?<br>
<br>
        * Line 191<br>
        <a href="https://github.com/pgRouting/pgrouting-contrib/blob/master/wrapper/routing_core_smart.sql#L191" target="_blank">https://github.com/pgRouting/<u></u>pgrouting-contrib/blob/master/<u></u>wrapper/routing_core_smart.<u></u>sql#L191</a><br>


        * Line 205<br>
<br>
<br>
        <a href="https://github.com/pgRouting/pgrouting-contrib/blob/master/wrapper/routing_core_smart.sql#L205" target="_blank">https://github.com/pgRouting/<u></u>pgrouting-contrib/blob/master/<u></u>wrapper/routing_core_smart.<u></u>sql#L205</a><br>


<br>
        Best regards,<br>
        Daniel<br>
<br>
<br>
        On Sat, Dec 3, 2011 at 4:26 AM, Worth Lutz &lt;<a href="mailto:wal3@mindspring.com" target="_blank">wal3@mindspring.com</a><br>
        &lt;mailto:<a href="mailto:wal3@mindspring.com" target="_blank">wal3@mindspring.com</a>&gt;<br>
<br></div></div><div class="im">
        &lt;mailto:<a href="mailto:wal3@mindspring.com" target="_blank">wal3@mindspring.com</a> &lt;mailto:<a href="mailto:wal3@mindspring.com" target="_blank">wal3@mindspring.com</a>&gt;&gt;&gt; wrote:<br>
<br>
        Hi all,<br>
<br>
        I have found what appears to be a problem in one of the<br>
        routing_core_smart functions.<br>
<br>
        In the function locate_point_as_geometry there are two lines which<br>
        call the function geometryfromtext.<br>
<br>
        These functions are called when line_substring returns a point.<br>
<br>
        In the geometryfromtext function calls, there is no second argument<br>
        for the srid. This produces a geometry with a “-1” for the srid.<br>
<br>
        When I use shootingstar_smart in my script, MapServer fails on<br>
        trying to work with two geometries with different srids.<br>
<br>
        Adding the second argument to the geometryfromtext function fixed<br>
        this problem. The only geometry with the “-1” srid was the one<br>
        created by these function calls.<br>
<br>
        I hope this helps someone.<br>
<br>
        Worth Lutz<br>
<br>
<br>
        ______________________________<u></u>_________________<br>
        Pgrouting-users mailing list<br>
<br>
        <a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br>
        &lt;mailto:<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.<u></u>osgeo.org</a>&gt;<br></div>
        &lt;mailto:<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.<u></u>osgeo.org</a><div class="im"><br>
        &lt;mailto:<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.<u></u>osgeo.org</a>&gt;&gt;<br>
<br>
<br>
        <a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
<br>
<br>
<br>
<br>
        --<br>
        Georepublic UG &amp; Georepublic Japan<br>
<br>
        eMail: <a href="mailto:daniel.kastl@georepublic.de" target="_blank">daniel.kastl@georepublic.de</a><br>
        &lt;mailto:<a href="mailto:daniel.kastl@georepublic.de" target="_blank">daniel.kastl@<u></u>georepublic.de</a>&gt;<br></div>
        &lt;mailto:<a href="mailto:daniel.kastl@georepublic.de" target="_blank">daniel.kastl@<u></u>georepublic.de</a><div class="im"><br>
        &lt;mailto:<a href="mailto:daniel.kastl@georepublic.de" target="_blank">daniel.kastl@<u></u>georepublic.de</a>&gt;&gt;<br>
        Web: <a href="http://georepublic.de" target="_blank">http://georepublic.de</a> &lt;<a href="http://georepublic.de/" target="_blank">http://georepublic.de/</a>&gt;<br>
<br>
<br>
<br>
<br>
        ______________________________<u></u>_________________<br>
        Pgrouting-users mailing list<br>
        <a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br></div>
        &lt;mailto:<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.<u></u>osgeo.org</a>&gt;<div class="im"><br>
        <a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
<br>
<br>
    ______________________________<u></u>_________________<br>
    Pgrouting-users mailing list<br></div><div class="im">
    <a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a> &lt;mailto:<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.<u></u>osgeo.org</a>&gt;<br>


    <a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
<br>
<br>
<br>
--<br>
Georepublic UG &amp; Georepublic Japan<br>
eMail: <a href="mailto:daniel.kastl@georepublic.de" target="_blank">daniel.kastl@georepublic.de</a> &lt;mailto:<a href="mailto:daniel.kastl@georepublic.de" target="_blank">daniel.kastl@<u></u>georepublic.de</a>&gt;<br>
Web: <a href="http://georepublic.de" target="_blank">http://georepublic.de</a> &lt;<a href="http://georepublic.de/" target="_blank">http://georepublic.de/</a>&gt;<br>
<br></div><div class="im">
No virus found in this message.<br></div>
Checked by AVG - <a href="http://www.avg.com" target="_blank">www.avg.com</a> &lt;<a href="http://www.avg.com" target="_blank">http://www.avg.com</a>&gt;<div class="im"><br>
Version: 2012.0.1873 / Virus Database: 2102/4656 - Release Date: 12/04/11<br>
<br>
<br>
<br></div><div class="im">
______________________________<u></u>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
</div></blockquote><div class="HOEnZb"><div class="h5">
<br>
______________________________<u></u>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG &amp; Georepublic Japan<br>eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66, 99, 171)" target="_blank">daniel.kastl@georepublic.de</a><br>

Web: <a href="http://georepublic.de/" style="color:rgb(66, 99, 171)" target="_blank">http://georepublic.de</a></span><br>
</div>