pgrouting

postgresql+postgis+pgrouting安装(windows10)

只谈情不闲聊 提交于 2020-12-18 03:14:00
注:a. 以下安装皆指windows系统   b.只要安装了postgis,pgrouting自带就安装上了 一。postgresql版本10.9,posttgis版本2.5,pgrouting版本2.6( 三者版本必须对应!!! ) --查看postgresql版本 show server_version; --查看postgis版本 SELECT PostGIS_full_version(); --查看pgrouting版本 select pgr_version(); 二。安装文件下载地址( 点我下载 ),提取码:j2f8,下载文件名称:postgresql-10.9-2-windows-x64.exe,postgis-bundle-pg10x64-setup-2.5.2-1.exe 三。windows7,windows8安装参考   https://blog.csdn.net/antma/article/details/83579920 四。windows10安装步骤如下   4-1.postgresql安装:按照  上述所说的windows7,windows8安装方式正常安装 https://blog.csdn.net/antma/article/details/83579920 注:很大概率会报错: Problem running post-install step.

pgr_astar and impossible edges (e.g., locked doors)

孤者浪人 提交于 2019-12-11 17:45:39
问题 I'm using postgresql / PostGIS with pgrouting and I need to compute the shortest path. In a previous version of pgrouting, I was using shortest_path_astar. In my routing graph I had impossible segments, such as locked doors. I used: SELECT id FROM shortest_path_astar('SELECT edge_id AS id, vertex_id1 AS source, vertex_id2 AS target, ' || '(CASE WHEN door = ''S'' THEN -1.0 ELSE (length) ) END)::float8 AS cost, ' || '(CASE WHEN door_rev = ''S'' THEN -1.0 ELSE (length) ) END )::float8 AS reverse

Assign_vertex_id function

爱⌒轻易说出口 提交于 2019-12-08 08:55:52
问题 When I execute the following query; SELECT Assign_vertex_id('ways', 0.00001, 'the_geom', 'gid') I am getting the following error; 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 32 at EXECUTE statement ******

Postgres SSL SYSCALL error: EOF detected with python and psycopg

女生的网名这么多〃 提交于 2019-12-03 19:47:47
问题 Using psycopg2 package with python 2.7 I keep getting the titled error: psycopg2.DatabaseError: SSL SYSCALL error: EOF detected It only occurs when I add a WHERE column LIKE ''%X%'' clause to my pgrouting query. An example: SELECT id1 as node, cost FROM PGR_Driving_Distance( 'SELECT id, source, target, cost FROM edge_table WHERE cost IS NOT NULL and column LIKE ''%x%'' ', 1, 10, false, false) Threads on the internet suggest it is an issue with SSL intuitively, but whenever I comment out the

Postgres SSL SYSCALL error: EOF detected with python and psycopg

笑着哭i 提交于 2019-11-30 11:08:54
Using psycopg2 package with python 2.7 I keep getting the titled error: psycopg2.DatabaseError: SSL SYSCALL error: EOF detected It only occurs when I add a WHERE column LIKE ''%X%'' clause to my pgrouting query. An example: SELECT id1 as node, cost FROM PGR_Driving_Distance( 'SELECT id, source, target, cost FROM edge_table WHERE cost IS NOT NULL and column LIKE ''%x%'' ', 1, 10, false, false) Threads on the internet suggest it is an issue with SSL intuitively, but whenever I comment out the pattern matching side of things the query and connection to the database works fine. This is on a local

ERROR: function addgeometrycolumn is not unique

两盒软妹~` 提交于 2019-11-28 13:50:39
I am trying to use the following function; SELECT Assign_vertex_id('ways', 0.00001, 'the_geom', 'gid') but for some reason it is giving me the following error; 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: function addgeometrycolumn(unknown, unknown, integer, unknown, integer) is not unique LINE 1: SELECT addGeometryColumn('vertices_tmp', 'the_geom', 4326, '... ^ HINT: Could not choose a best