[Cartoweb-users] Pgdijkstra and PostGIS problems

Ville Antti Ensio Leinonen levian00 at students.oamk.fi
Thu Jul 13 03:27:33 EDT 2006


I can confirm that closing and opening works with OID error.

I have got also following errors.
cartoweb-users at lists.maptools.org
ERROR:  new row for relation "vertices_tmp" violates check constraint 
"enforce_dims_the_geom"

ERROR:  new row for relation "vertices_tmp" violates check constraint 
"enforce_srid_the_geom"

To fix these you need to change assign_vertex_id. There is line
EXECUTE $q$ SELECT addGeometryColumn('vertices_tmp', 'the_geom', -1, 'POINT', 2) $q$;
I had to change it to
EXECUTE $q$ SELECT addGeometryColumn('vertices_tmp', 'the_geom', 4258,'POINT', 4) $q$;.

Where -1 to 4258 is srid of data and 2 to 4 is if ihave understand right 4 
dimension geometry. When i used  shp2psql, i noticed that it sayd 
MULTILINE[4]. This seems to work with my data.

Is my solution right?
  if it is, I hope this helps someone




--          Ville Leinonen		--

On Wed, 12 Jul 2006, Fay Du wrote:

> I got similar error before.
> My solution is close connection to database and connection to database
> again. The call assign_vertex_id. I don't know if it works for you. You
> can try it.
>
> Fay
>
> -----Original Message-----
> From: cartoweb-users-bounces at lists.maptools.org
> [mailto:cartoweb-users-bounces at lists.maptools.org] On Behalf Of Ville
> Antti Ensio Leinonen
> Sent: Wednesday, July 12, 2006 4:10 AM
> To: cartoweb-users at lists.maptools.org
> Subject: [Cartoweb-users] Pgdijkstra and PostGIS problems
>
> 	Hi all. I have problem with PostgreSQL, PostGIS and Pgdijkstra.
> I
> have shapefile wich i have shp2sql and insert it to postgis database and
>
> it's working. The Problem comes when i try to use Pgdijkstra. I follow
> instruction to point where i need use assign_vertex_id('elements', 0.1):
> I get following error messages, depending luck.
>
>
> ERROR:  relation with OID 159110 does not exist
> CONTEXT:  SQL statement "SELECT  id, the_geom FROM vertices_tmp WHERE
> distance(the_geom,  $1 ) <  $2 "
> PL/pgSQL function "point_to_id" line 7 at select into variables
> PL/pgSQL function "assign_vertex_id" line 14 at assignment
>
> above with modified assign_vertex_id and orginal
>
> some times with orginal i get even whine about
> constrains enforce_dims_the_geom problem.
>
> my modified assign_vertex_id build vertices_tmp table out from
> assign_vertex_id function and it worked few times with windows
> installation. Now with linux installation i keep getting those "relation
>
> with ..." errors.
>
> with windows installation i get to point where dijkstra.README told me
> to
> use create_graph_table() wich didn't work too.
>
> Any idea howto get pgdijkstra to work. Wrong version from postgres or
> postgis ?
>
> Win: postgres 8.1, postgis 1.1.3, pgdijkstra from cartoweb win install
> link
> linux gentoo: postgres 8.0.8, postgis 1.1.2 and pgdijkstra from latest
> stable cartoweb source packakge
>
> --          Ville Leinonen		--
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>
>


More information about the Cartoweb-users mailing list