Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I loaded a multilinestring layer into PostGIS Manager:

enter image description here enter image description here

and use the SQL query, trying to get the table with the node ids:

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

and got this error:

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

Is this error related to the multilinestring geometry?

I work under WIN7-64bits, with postgres 8.4, pgadmin 3, PostGIS 2.0 installed, and download Windows Binaries of pgroutingpgRouting-1.03_pg-8.4.2.zip.                           

share|improve this question

1 Answer 1

up vote 2 down vote accepted

There are 2 problems related to PostGIS 2.0

  • The function name must be ST_StartPoint, missing the "ST_" prefix, which is now required (or you must load legacy.sql into your database).
  • Geometry type MULTILINESTRING cannot be used anymore with ST_StartPoint or ST_EndPoint.
share|improve this answer
    
I uninstalled PostGIS 2.0, and installed the 1.5 one, it worked!So it does relate to the version of PostGIS. –  Heinz Apr 26 '13 at 5:57

Your Answer

 
discard

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.