[pgrouting-users] Re: Many errors : function driving_distance
does not exist, shortest_path_astar , tps
Daniel Kastl
daniel at georepublic.de
Wed Aug 24 08:38:52 EDT 2011
Hi Jules,
Any argument against using the latest workshop?
The one you try is 4 years old now and uses a very old version of
OpenLayers. I should remove it from the website actually.
Daniel
On Wed, Aug 24, 2011 at 9:25 PM, Jules Kouadio <sekedoua at gmail.com> wrote:
>
> Hi Daniel.
> For my table "ways" i follow step by step this tutorial :
> http://www.pgrouting.org/docs/foss4g2007/ch03.html
>
> but i dont see any map on my web page 06.indexhtml
> Can you please help me and tell me why i have this problem ?
>
> Thanks .
>
>
> 2011/8/22 Daniel Kastl <daniel at georepublic.de>
>
>> If you want to write some web application, then you can use
>> OpenLayers/GeoExt for example.
>> See the pgRouting workshop: http://workshop.pgrouting.org/ (there will be
>> an updated on released with FOSS4G in September).
>> Instead of PHP (or some other server side coding) you can also use
>> Geoserver "SQL views":
>> http://docs.geoserver.org/stable/en/user/data/sqlview.html
>> It's a new feature of Geoserver andvery convenient.
>>
>> If you only want to check results you can use QGIS:
>>
>> - Create a database connection and add the "ways" table as a
>> background layer.
>> - Add another layer of the "ways" table but select Build query before
>> adding it.
>> - Type for example "gid" IN ( SELECT gid FROM
>> dijkstra_sp('ways',5700,6733)) into the SQL where clause field.
>>
>> Hope that helps.
>>
>> Daniel
>>
>>
>>
>> On Tue, Aug 23, 2011 at 1:01 AM, Jules Kouadio <sekedoua at gmail.com>wrote:
>>
>>> Thank you so mutch ! All is running !
>>> I see that my request was not correctly wrotte .
>>> How can i now visualyse all this result on a map (on a web map server).
>>> Do you have a good tutorial, step by step, whith all details ?
>>>
>>> Thanks again
>>>
>>>
>>> 2011/8/22 Daniel Kastl <daniel at georepublic.de>
>>>
>>>> Hi Jules,
>>>>
>>>> Here are working examples of your queries:
>>>>
>>>> SELECT * FROM shortest_path_astar(
>>>> 'SELECT gid AS id,source::integer,target::integer,length::double
>>>> precision AS cost,x1,y1,x2,y2 FROM ways',
>>>> 300,400,false,false
>>>> );
>>>>
>>>> SELECT * FROM driving_distance(
>>>> 'SELECT gid AS id,source,target,length::double precision AS cost
>>>> FROM ways',
>>>> 300,1.0,false,false
>>>> );
>>>>
>>>> SELECT * FROM tsp(
>>>> 'SELECT DISTINCT source AS source_id,x1::double precision as
>>>> x,y1::double precision AS y FROM ways WHERE source IN(91,35,75,504,254)',
>>>> '91,35,75,504,254',75
>>>> );
>>>>
>>>> Best regards,
>>>> Daniel
>>>>
>>>>
>>>> On Tue, Aug 23, 2011 at 12:08 AM, Jules Kouadio <sekedoua at gmail.com>wrote:
>>>>
>>>>> This is all my databse (routing).
>>>>> Please look at this.
>>>>>
>>>>>
>>>>>
>>>>> 2011/8/22 Jules Kouadio <sekedoua at gmail.com>
>>>>>
>>>>>> Hello Danniel. Thanks again for your support. I progress but i have so
>>>>>> much to learn.
>>>>>>
>>>>>> why this error for this 3 request ?*
>>>>>>
>>>>>> SELECT * from driving_distance('select gid as
>>>>>> id,source,target,length::double precision as cost from ways',22777838,0.01);
>>>>>> *
>>>>>>
>>>>>> ERROR: function driving_distance ("unknown", integer, numeric) does
>>>>>> not exist
>>>>>> HINT: No function matches the given name and argument types. You need
>>>>>> to add explicit type conversions.
>>>>>>
>>>>>> *SELECT * FROM shortest_path_astar('select gid as
>>>>>> id,source::int4,target::int4,reverse_cost::double precision as
>>>>>> reverse_cost,x1,y1,x2,y2 from ways',22,150,false,false);*
>>>>>> ERREUR: Error, query must return columns 'id', 'source', 'target' and
>>>>>> 'cost'
>>>>>>
>>>>>>
>>>>>> *SELECT * from tsp('select distinct source as source_id,x1::double
>>>>>> precision as x,y1::double precision as y from ways where source
>>>>>> in(91,35,75,504,254)','91,35,75,504,254',353);*
>>>>>>
>>>>>> WARNING: stop the connection because of crash of another server
>>>>>> process
>>>>>> DETAIL: The postmaster has commanded this server process to cancel
>>>>>> the transaction
>>>>>> Current and leave because another process server left abnormally
>>>>>> and there is probably corrupted shared memory.
>>>>>> TIP: In a moment you should be able to reconnect to the base of
>>>>>> data and restart your order.
>>>>>> the server connection was cut off unexpectedly
>>>>>> The server may have terminated abnormally before or during
>>>>>> processing the request.
>>>>>> The server connection was lost. Attempting reset: success / or
>>>>>> sometimes not.
>>>>>>
>>>>>>
>>>>>>
>>>>>> I don't understand why all thes errors becose shortest_path function
>>>>>> run correctly. Exple
>>>>>>
>>>>>> SELECT * FROM shortest_path('SELECT gid as
>>>>>> id,source::integer,target::integer,length::double precision as cost FROM
>>>>>> ways',300,400, false, false); give to me :
>>>>>>
>>>>>> vertex_id | edge_id | cost
>>>>>> -----------+---------+--------------------
>>>>>> 300 | 339 | 0.139255214687805
>>>>>> 299 | 338 | 0.179544765048058
>>>>>> 195 | 337 | 0.203993410356029
>>>>>> 63 | 56 | 0.163071365291157
>>>>>> 64 | 57 | 0.0210195901922476
>>>>>> 13 | 592 | 0.154135925931186
>>>>>> 353 | 593 | 0.167432867084967
>>>>>> 255 | 594 | 0.0922310799956524
>>>>>> 111 | 595 | 0.410249680272814
>>>>>> 435 | 596 | 0.323252439058039
>>>>>> 400 | -1 | 0
>>>>>> (11 lignes)
>>>>>>
>>>>>> My table "ways" is join.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks !
>>>>>> --
>>>>>> *
>>>>>> *
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *
>>>>> *
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Georepublic UG & Georepublic Japan
>>>> eMail: daniel.kastl at georepublic.de
>>>> Web: http://georepublic.de
>>>>
>>>> _______________________________________________
>>>> Pgrouting-users mailing list
>>>> Pgrouting-users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>>>>
>>>>
>>>
>>>
>>> --
>>> *
>>> *
>>>
>>>
>>>
>>> _______________________________________________
>>> Pgrouting-users mailing list
>>> Pgrouting-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>>>
>>>
>>
>>
>> --
>> Georepublic UG & Georepublic Japan
>> eMail: daniel.kastl at georepublic.de
>> Web: http://georepublic.de
>>
>> _______________________________________________
>> Pgrouting-users mailing list
>> Pgrouting-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>>
>>
>
>
> --
> *
> *
>
>
>
--
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20110824/2ebd1b20/attachment.html
More information about the Pgrouting-users
mailing list