[pgrouting-users] assign_vertex_id error

Dave Potts dave.potts at pinan.co.uk
Tue Jun 12 11:03:55 PDT 2012


what does the dt command say?

If you do \dt roads_lines,  it will list the type and srid of the expected
geometry for this table.

It might also be worth doing at \dt on vertices_tmp as well.
D.

What postgis is saying, you have attempt to insert geometry object and I
do not like the srid type.
Annu Anurag wrote:
> You were right sir. The entries were actually null entries. I had not
> assigned any length and other parameters to them. They were just names.
> Anyways, I deleted them. The query still hasn't run. The same error is
> being thrown back.
>
> VSDelhidb=# select * from roads_line where the_geom is NULL;
> VSDelhidb=# delete from roads_line where the_geom is Null;
> DELETE 11
> VSDelhidb=# SELECT assign_vertex_id('roads_line', 0.0002, '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:  new row for relation "vertices_tmp" violates check constraint
> "enforce_srid_the_geom"
> CONTEXT:  SQL statement "INSERT INTO vertices_tmp(the_geom) VALUES
> (SetSRID(p,_srid))"
> PL/pgSQL function "point_to_id" line 26 at SQL statement
> PL/pgSQL function "assign_vertex_id" line 33 at assignment
>
>
> I'm new to postgis and postgresql. Most of the details don't make very
> much
> sense to me. But I just need to get the routing function running. I'm
> trying my best to find a solution from all the posts I can find but you
> know the functioning of pgrouting, please try and help me solve this
> problem. Thank you!
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>


-- 




More information about the Pgrouting-users mailing list