[postgis-users] HINT: No function matches the given name and argument types

2010-05-14 Thread rakesh modi
hi,
i am using select query which is shown below
SELECT sum(length(the_geom))/1000 AS km_roads FROM routable;
and get error like -
HINT:  No function matches the given name and argument types. You might need
to add explicit type casts.

-- 
Rakesh Modi
Software Engineer
GIS Consortium
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] HINT: No function matches the given name and argument types

2010-05-14 Thread Maria Arias de Reyna
El Friday 14 May 2010, rakesh modi escribió:
 hi,
 i am using select query which is shown below
 SELECT sum(length(the_geom))/1000 AS km_roads FROM routable;
 and get error like -
 HINT:  No function matches the given name and argument types. You might
 need to add explicit type casts.

I usually prefer to use ST_length instead of length. Maybe that's the problem?


(Btw, are you sure you have postgis installed on that database?)

-- 
María Arias de Reyna Domínguez
Área de Operaciones

Emergya Consultoría 
Tfno: +34 954 51 75 77 / +34 607 43 74 27
Fax: +34 954 51 64 73 
www.emergya.es 
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] HINT: No function matches the given name and argument types

2010-05-14 Thread Emilie Laffray
On 14 May 2010 10:21, rakesh modi rakesh.modi1...@gmail.com wrote:

 hi,
 i am using select query which is shown below
 SELECT sum(length(the_geom))/1000 AS km_roads FROM routable;
 and get error like -
 HINT:  No function matches the given name and argument types. You might
 need to add explicit type casts.


what is the projection of your geometry? ST_Length returns a length in the
unit of the chosen projection. If you are working with lat, lon, you won't
have meters coming out of ST_Length.

Emilie Laffray
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users