Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Before using pgrouting, I have to create the node ids. I loaded my polyline layer into PostGIS Manager:

enter image description here enter image description here enter image description here

I type this in SQL query:

select assign_vertex_id('split_4', 800, 'geom', 'gid')

But as I click the "Execute" button, I got this error: enter image description here

Error: Function StartPoint (geometry) does not exist
LINE 1: SELECT gid AS id, StartPoint (geom) AS source, EndPoint (geom) ...
HINT: did not comply with the specified name and parameter types of function. You may need to add explicit type conversion.
QUERY: SELECT gid AS id, StartPoint (geom) AS source, EndPoint (geom) as target FROM split_4
CONTEXT: PL / pgSQL function "assign_vertex_id" line 23 at target EXECUTE statement FOR

I searched for ST_StartPoint, and found that it needs working with linestring, so I cut my multilinestring to a linestring(named it "ways"), and then run the SQL:

ALTER TABLE ways ADD COLUMN source integer;
ALTER TABLE ways ADD COLUMN target integer;
SELECT assign_vertex_id('ways', 800, 'the_geom', 'gid');

but got the same error above.

How to solve this and to create the node ids, then I can proceed to the next step in A Beginner’s Guide to pgRouting?I'm working with pgadmin3, postgresql8.4, PostGIS2.0 under WIN7-64bits.

share|improve this question
Possible options: postgis not loaded, pgrouting wants a different version of postgis? Does it work (or complain about EndPoint instead) if you change it to say ST_StartPoint? If it does, that would suggest version mismatch. If it doesn't that would suggest missing postgis. – BradHards Apr 15 '13 at 6:55
up vote 0 down vote accepted

I change to work with PostGIS 1.5, and it works!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.