[pgrouting-users] ERROR: function startpoint(geometry) does not exist

Hi
I am in section 5.2 of this [tutorial](http://workshop.pgrouting.org/chapters/topology.html).

When i run this command

_**SELECT**_<i> **assign_vertex_id('ways', 0.00001, 'the_geom', 'gid'**</i>_**);**_

i get the following error

<i>**pgrouting-workshop=# SELECT assign_vertex_id('ways', 0.00001, 'the_geom', 'gid');**</i>
<i>**NOTICE:  CREATE TABLE will create implicit sequence "vertices_tmp_id_seq" for serial column "[vertices_tmp.id](http://vertices_tmp.id)"**</i>
<i><b>

CONTEXT:  SQL statement "CREATE TABLE vertices_tmp (id serial)"</b></i>
<i>**PL/pgSQL function "assign_vertex_id" line 15 at EXECUTE statement**</i>
_**ERROR:  function startpoint(geometry) does not exist**_
<i>**LINE 1: SELECT gid AS id, StartPoint(the_geom) AS source, EndPoint(t...**</i>
<i><b>

                          ^</b></i>
_**HINT:  No function matches the given name and argument types. You might need to add explicit type casts.**_
<i>**QUERY:  SELECT gid AS id, StartPoint(the_geom) AS source, EndPoint(the_geom) as target FROM ways**</i>
<i><b>

CONTEXT:  PL/pgSQL function "assign_vertex_id" line 27 at FOR over EXECUTE statement</b></i>
_**pgrouting-workshop=#**_ 

Seems like I am missing the startpoint(geometry) function. 

How can I fix this?

Thanks

Maruf


Right you are using postgis 2.0 and the tutorial was written for postgis 1.5.x

You might solve some of these problems but installing legacy.sql.
google: postgis 2.0 legacy.sql

-steve

On 3/12/2013 1:56 PM, maruf rahman wrote:

Hi
I am in section 5.2 of thistutorial <http://workshop.pgrouting.org/chapters/topology.html&gt;\.

When i run this command

/*
SELECT*//* assign_vertex_id('ways', 0.00001, 'the_geom', 'gid'*//*);*/

i get the following error/*

pgrouting-workshop=# SELECT assign_vertex_id('ways', 0.00001, 'the_geom', 'gid');
NOTICE: CREATE TABLE will create implicit sequence "vertices_tmp_id_seq" for serial column "vertices_tmp.id <http://vertices_tmp.id>"

CONTEXT: SQL statement "CREATE TABLE vertices_tmp (id serial)"
PL/pgSQL function "assign_vertex_id" line 15 at EXECUTE statement
ERROR: function startpoint(geometry) does not exist
LINE 1: SELECT gid AS id, StartPoint(the_geom) AS source, EndPoint(t...

                           ^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT gid AS id, StartPoint(the_geom) AS source, EndPoint(the_geom) as target FROM ways

CONTEXT: PL/pgSQL function "assign_vertex_id" line 27 at FOR over EXECUTE statement
pgrouting-workshop=#

*/

Seems like I am missing the startpoint(geometry) function.

How can I fix this?

Thanks

Maruf

_______________________________________________
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

To echo Stephen, in my experience, running the legacy.sql file against your database eliminates all the compatibility issues.

Best,
Steve

  Stephen V. Mather
GIS Manager
(216) 635-3243 (Work)
clevelandmetroparks.com

________________________________________
From: pgrouting-users-bounces@lists.osgeo.org [pgrouting-users-bounces@lists.osgeo.org] on behalf of Stephen Woodbridge [woodbri@swoodbridge.com]
Sent: Tuesday, March 12, 2013 2:13 PM
To: pgrouting-users@lists.osgeo.org
Subject: Re: [pgrouting-users] ERROR: function startpoint(geometry) does not exist

Right you are using postgis 2.0 and the tutorial was written for postgis
1.5.x

You might solve some of these problems but installing legacy.sql.
google: postgis 2.0 legacy.sql

-steve

On 3/12/2013 1:56 PM, maruf rahman wrote:

Hi
I am in section 5.2 of thistutorial <http://workshop.pgrouting.org/chapters/topology.html&gt;\.

When i run this command

/*
SELECT*//* assign_vertex_id('ways', 0.00001, 'the_geom', 'gid'*//*);*/

i get the following error/*

pgrouting-workshop=# SELECT assign_vertex_id('ways', 0.00001, 'the_geom', 'gid');
NOTICE: CREATE TABLE will create implicit sequence "vertices_tmp_id_seq" for serial column "vertices_tmp.id <http://vertices_tmp.id>"

CONTEXT: SQL statement "CREATE TABLE vertices_tmp (id serial)"
PL/pgSQL function "assign_vertex_id" line 15 at EXECUTE statement
ERROR: function startpoint(geometry) does not exist
LINE 1: SELECT gid AS id, StartPoint(the_geom) AS source, EndPoint(t...

                           ^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT gid AS id, StartPoint(the_geom) AS source, EndPoint(the_geom) as target FROM ways

CONTEXT: PL/pgSQL function "assign_vertex_id" line 27 at FOR over EXECUTE statement
pgrouting-workshop=#

*/

Seems like I am missing the startpoint(geometry) function.

How can I fix this?

Thanks

Maruf

_______________________________________________
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

_______________________________________________
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

I tried this a while back, and found that it's not all that much work to re-write the functions to support Postgis 2.0: the only requirement was adding 'ST_' to all most calls.

Regards,
Jelmer

-----Original Message-----
From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Stephen V. Mather
Sent: Tuesday, March 12, 2013 19:32
To: pgRouting users mailing list
Subject: Re: [pgrouting-users] ERROR: function startpoint(geometry) does not exist

To echo Stephen, in my experience, running the legacy.sql file against your database eliminates all the compatibility issues.

Best,
Steve

  Stephen V. Mather
GIS Manager
(216) 635-3243 (Work)
clevelandmetroparks.com

________________________________________
From: pgrouting-users-bounces@lists.osgeo.org [pgrouting-users-bounces@lists.osgeo.org] on behalf of Stephen Woodbridge [woodbri@swoodbridge.com]
Sent: Tuesday, March 12, 2013 2:13 PM
To: pgrouting-users@lists.osgeo.org
Subject: Re: [pgrouting-users] ERROR: function startpoint(geometry) does not exist

Right you are using postgis 2.0 and the tutorial was written for postgis
1.5.x

You might solve some of these problems but installing legacy.sql.
google: postgis 2.0 legacy.sql

-steve

On 3/12/2013 1:56 PM, maruf rahman wrote:

Hi
I am in section 5.2 of thistutorial <http://workshop.pgrouting.org/chapters/topology.html&gt;\.

When i run this command

/*
SELECT*//* assign_vertex_id('ways', 0.00001, 'the_geom', 'gid'*//*);*/

i get the following error/*

pgrouting-workshop=# SELECT assign_vertex_id('ways', 0.00001, 'the_geom', 'gid');
NOTICE: CREATE TABLE will create implicit sequence "vertices_tmp_id_seq" for serial column "vertices_tmp.id <http://vertices_tmp.id>"

CONTEXT: SQL statement "CREATE TABLE vertices_tmp (id serial)"
PL/pgSQL function "assign_vertex_id" line 15 at EXECUTE statement
ERROR: function startpoint(geometry) does not exist
LINE 1: SELECT gid AS id, StartPoint(the_geom) AS source, EndPoint(t...

                           ^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT gid AS id, StartPoint(the_geom) AS source, EndPoint(the_geom) as target FROM ways

CONTEXT: PL/pgSQL function "assign_vertex_id" line 27 at FOR over EXECUTE statement
pgrouting-workshop=#

*/

Seems like I am missing the startpoint(geometry) function.

How can I fix this?

Thanks

Maruf

_______________________________________________
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

_______________________________________________
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

_______________________________________________
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

Yes, the nice work that GreenInfo did for us with pgRouting notes the following:

-- Install PostGIS and PgRouting
-- For the most part PgRouting works fine with PostGIS 2.0 but I did need to fix some function names as noted below.
--
-- Changes to routing_core_wrappers.sql
-- * replace "length::double precision as cost" with "cost"; the cost field is now required but we can weight routes by something other than length
-- * fixed numerous references to X() and Y() and SRID() and SETSRID() and STARTPOINT() and ENDPOINT() to use the ST_* versions
-- Changes to routing_topology.sql
-- * assign_vertex_id() call to addGeometryColumn() now uses 3 dimensions instead of 2

The last of these is because we are using 3D shapes to get terrain profiles for our trails... .

Best,
Steve

  Stephen V. Mather
GIS Manager
(216) 635-3243 (Work)
clevelandmetroparks.com

________________________________________
From: pgrouting-users-bounces@lists.osgeo.org [pgrouting-users-bounces@lists.osgeo.org] on behalf of Jelmer Baas [baas@speerit.nl]
Sent: Tuesday, March 12, 2013 3:20 PM
To: pgRouting users mailing list
Subject: Re: [pgrouting-users] ERROR: function startpoint(geometry) does not exist

I tried this a while back, and found that it's not all that much work to re-write the functions to support Postgis 2.0: the only requirement was adding 'ST_' to all most calls.

Regards,
Jelmer

-----Original Message-----
From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Stephen V. Mather
Sent: Tuesday, March 12, 2013 19:32
To: pgRouting users mailing list
Subject: Re: [pgrouting-users] ERROR: function startpoint(geometry) does not exist

To echo Stephen, in my experience, running the legacy.sql file against your database eliminates all the compatibility issues.

Best,
Steve

  Stephen V. Mather
GIS Manager
(216) 635-3243 (Work)
clevelandmetroparks.com

________________________________________
From: pgrouting-users-bounces@lists.osgeo.org [pgrouting-users-bounces@lists.osgeo.org] on behalf of Stephen Woodbridge [woodbri@swoodbridge.com]
Sent: Tuesday, March 12, 2013 2:13 PM
To: pgrouting-users@lists.osgeo.org
Subject: Re: [pgrouting-users] ERROR: function startpoint(geometry) does not exist

Right you are using postgis 2.0 and the tutorial was written for postgis
1.5.x

You might solve some of these problems but installing legacy.sql.
google: postgis 2.0 legacy.sql

-steve

On 3/12/2013 1:56 PM, maruf rahman wrote:

Hi
I am in section 5.2 of thistutorial <http://workshop.pgrouting.org/chapters/topology.html&gt;\.

When i run this command

/*
SELECT*//* assign_vertex_id('ways', 0.00001, 'the_geom', 'gid'*//*);*/

i get the following error/*

pgrouting-workshop=# SELECT assign_vertex_id('ways', 0.00001, 'the_geom', 'gid');
NOTICE: CREATE TABLE will create implicit sequence "vertices_tmp_id_seq" for serial column "vertices_tmp.id <http://vertices_tmp.id>"

CONTEXT: SQL statement "CREATE TABLE vertices_tmp (id serial)"
PL/pgSQL function "assign_vertex_id" line 15 at EXECUTE statement
ERROR: function startpoint(geometry) does not exist
LINE 1: SELECT gid AS id, StartPoint(the_geom) AS source, EndPoint(t...

                           ^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT gid AS id, StartPoint(the_geom) AS source, EndPoint(the_geom) as target FROM ways

CONTEXT: PL/pgSQL function "assign_vertex_id" line 27 at FOR over EXECUTE statement
pgrouting-workshop=#

*/

Seems like I am missing the startpoint(geometry) function.

How can I fix this?

Thanks

Maruf

_______________________________________________
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

_______________________________________________
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

_______________________________________________
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

_______________________________________________
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

Hi

Thanks for the suggestions. I have executed the legacy.sql. Now I am getting the following error.
Could anyone describe the workaround of this issue?

pgrouting-workshop=# SELECT assign_vertex_id(‘ways’, 0.00001, ‘the_geom’, ‘gid’);
NOTICE: CREATE TABLE will create implicit sequence “vertices_tmp_id_seq” for serial column “vertices_tmp.id
CONTEXT: SQL statement “CREATE TABLE vertices_tmp (id serial)”
PL/pgSQL function “assign_vertex_id” line 15 at EXECUTE statement
ERROR: query string argument of EXECUTE is null
CONTEXT: PL/pgSQL function “assign_vertex_id” line 36 at EXECUTE statement
pgrouting-workshop=#

Thanks

Maruf

···

On Wed, Mar 13, 2013 at 2:28 AM, Stephen V. Mather <svm@clevelandmetroparks.com> wrote:

Yes, the nice work that GreenInfo did for us with pgRouting notes the following:

– Install PostGIS and PgRouting
– For the most part PgRouting works fine with PostGIS 2.0 but I did need to fix some function names as noted below.

– Changes to routing_core_wrappers.sql
– * replace “length::double precision as cost” with “cost”; the cost field is now required but we can weight routes by something other than length
– * fixed numerous references to X() and Y() and SRID() and SETSRID() and STARTPOINT() and ENDPOINT() to use the ST_* versions
– Changes to routing_topology.sql
– * assign_vertex_id() call to addGeometryColumn() now uses 3 dimensions instead of 2

The last of these is because we are using 3D shapes to get terrain profiles for our trails… .

Best,
Steve

Stephen V. Mather
GIS Manager
(216) 635-3243 (Work)
clevelandmetroparks.com


From: pgrouting-users-bounces@lists.osgeo.org [pgrouting-users-bounces@lists.osgeo.org] on behalf of Jelmer Baas [baas@speerit.nl]
Sent: Tuesday, March 12, 2013 3:20 PM

To: pgRouting users mailing list
Subject: Re: [pgrouting-users] ERROR: function startpoint(geometry) does not exist

I tried this a while back, and found that it’s not all that much work to re-write the functions to support Postgis 2.0: the only requirement was adding ‘ST_’ to all most calls.

Regards,
Jelmer

-----Original Message-----
From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Stephen V. Mather
Sent: Tuesday, March 12, 2013 19:32
To: pgRouting users mailing list
Subject: Re: [pgrouting-users] ERROR: function startpoint(geometry) does not exist

To echo Stephen, in my experience, running the legacy.sql file against your database eliminates all the compatibility issues.

Best,
Steve

Stephen V. Mather
GIS Manager
(216) 635-3243 (Work)
clevelandmetroparks.com


From: pgrouting-users-bounces@lists.osgeo.org [pgrouting-users-bounces@lists.osgeo.org] on behalf of Stephen Woodbridge [woodbri@swoodbridge.com]
Sent: Tuesday, March 12, 2013 2:13 PM
To: pgrouting-users@lists.osgeo.org
Subject: Re: [pgrouting-users] ERROR: function startpoint(geometry) does not exist

Right you are using postgis 2.0 and the tutorial was written for postgis
1.5.x

You might solve some of these problems but installing legacy.sql.
google: postgis 2.0 legacy.sql

-steve

On 3/12/2013 1:56 PM, maruf rahman wrote:

Hi
I am in section 5.2 of thistutorial <http://workshop.pgrouting.org/chapters/topology.html>.

When i run this command

/*
SELECT*//* assign_vertex_id(‘ways’, 0.00001, ‘the_geom’, ‘gid’//);*/

i get the following error/*

pgrouting-workshop=# SELECT assign_vertex_id(‘ways’, 0.00001, ‘the_geom’, ‘gid’);
NOTICE: CREATE TABLE will create implicit sequence “vertices_tmp_id_seq” for serial column “vertices_tmp.id <http://vertices_tmp.id>”

CONTEXT: SQL statement “CREATE TABLE vertices_tmp (id serial)”
PL/pgSQL function “assign_vertex_id” line 15 at EXECUTE statement
ERROR: function startpoint(geometry) does not exist
LINE 1: SELECT gid AS id, StartPoint(the_geom) AS source, EndPoint(t…

^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT gid AS id, StartPoint(the_geom) AS source, EndPoint(the_geom) as target FROM ways

CONTEXT: PL/pgSQL function “assign_vertex_id” line 27 at FOR over EXECUTE statement
pgrouting-workshop=#

*/

Seems like I am missing the startpoint(geometry) function.

How can I fix this?

Thanks

Maruf


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users