[pgrouting-users] Re: Many errors : function driving_distance does
not exist, shortest_path_astar , tps
Daniel Kastl
daniel at georepublic.de
Mon Aug 22 09:44:38 EDT 2011
Hi Jules,
I can't manage to import your dump file. It only contains data, but not the
"ways".
This is how the "ways" table looks in the pgRouting workshop:
CREATE TABLE ways (
gid integer NOT NULL,
class_id integer,
length double precision,
"name" character(200),
x1 double precision,
y1 double precision,
x2 double precision,
y2 double precision,
reverse_cost double precision,
"rule" text,
to_cost double precision,
the_geom geometry,
source integer,
target integer,
CONSTRAINT ways_pkey PRIMARY KEY (gid),
CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2),
CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) =
'MULTILINESTRING'::text OR the_geom IS NULL),
CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4326)
) WITH (
OIDS=FALSE
);
> *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.
>
There are two functions with this name that take different arguments:
https://github.com/pgRouting/pgrouting/blob/master/extra/driving_distance/sql/routing_dd_wrappers.sql#L78
https://github.com/pgRouting/pgrouting/blob/master/extra/driving_distance/sql/routing_dd.sql#L24
>
> *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'
>
>
There could be something wrong with your "ways" table, because I couldn't
load the table dump either.
> *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.
Have you tried one of the TSP wrapper functions?
https://github.com/pgRouting/pgrouting/blob/master/extra/tsp/sql/routing_tsp_wrappers.sql
They take less arguments, so maybe easier to make the query correct.
Daniel
--
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/20110822/2aa07f11/attachment.html
More information about the Pgrouting-users
mailing list