Questions tagged [pgrouting]

pgRouting extends the PostGIS / PostgreSQL geospatial database to provide geospatial routing functionality.

Filter by
Sorted by
Tagged with
0
votes
1answer
19 views

Speed up pgr_dijkstraCost

I have a pgRouting network graph of ~ 1 mio edges and ~ 0.4 mio vertices. I want to find out something like "nearest facility" for bigger subsets. E.g. i have a bigger number of source ...
0
votes
0answers
53 views

PostGIS : Find direction between custom GPS tracks (linestrings) intersected with pgr_dijkstra route

I have many custom GPS tracks(linestrings) and a route generated by pgr_dijkstra by giving source & destination as input. Using ST_Intersects, I able to filter required GPS tracks belongs to the ...
2
votes
1answer
27 views

Converting the result of pgr_dijkstra routing to an encoded polyline

I have this query for routing which is working, and would like it to give me an encoded polyline as a result instead of segmented geometries because I want to display it easily on a mobile Google ...
0
votes
0answers
36 views

Taking line substring from pgr_withpoints output

I want to compute the shortest route through a network between two arbitrary points along edges in the network and then get the line substring for that route. I have achieved this with the code below ...
0
votes
1answer
29 views

How to add links to a GIS road network, for example, for ferry routes?

I am using PostgreSQL with PostGIS (for spatial queries like ST_LineLocatePoint()) and pgRouting (for shortest path). The road network I have does not include links for ferries, which is the ...
0
votes
1answer
25 views

Pgr_WithPoints : POIs in different tables

Is it possible to calculate the minimal distance between 2 points outside of routing network using pgr_withPoints, knowing that these points are from different tables? I tried to group them in one ...
1
vote
1answer
32 views

PgRouting : pgr_withpoints issue

Following my Other Question about non-network integrating routing, I have tried the with-points functions using the code proposed in the answer. The problem is I don't get the shortest path using ...
1
vote
2answers
55 views

House numbers as multiple stops route with pgRouting

How do I create a routing with multiple stops? Currently I have uploaded on PostGIS the nodes and edges of the road graph but I want the stops to match the housenumbers. The ideal work would be to ...
0
votes
1answer
37 views

Is there a routing solution for PostGIS that supports Theta Star?

I have a data set with 10m of accuracy. I have drones with a GPS that provides far finer resolution. I would like to provide pathing for my drone that exceeds the 10m of accuracy. I believe theta star ...
2
votes
0answers
42 views

Using shortest path pgr_dijkstra

Versions PostGIS Bundle 3 for PostgreSQL x64 12 pgAdmin 4.24 pgrouting 3.1.0 I have also enabled the postgis and pgrouting extensions on a public schema. I am only just starting with pgrouting so I am ...
0
votes
0answers
14 views

pgr_createTopology does not create vertices at every end of the lines of a street network

I am using pgRouting with a street network. I added lines to the network that represent straight lines from destination points I am interested to the nearest street using ST_ShortestLine(). Now I ran ...
0
votes
0answers
14 views

Automatically adding vertices to network in pgRouting

I am trying to add extra vertices based on the intersections of my edges with a polygon to get access points to those polygons, from where I could run pg_drivingDistance. Therefore, it would this way: ...
1
vote
0answers
22 views

TSP function with pgrouting

I'm trying the TSP function with pgrouting with just a few of the many nodes obtained with osm2pgrouting (I also have the edges, of course). I'm not an expert but once I run the query, it works and ...
0
votes
0answers
26 views

How to find shortest route between ANY source for ALL targets?

I have a list of starting points and a list of target points for pgRouting. I want to calculate the shortest path for every pair of [source,target]. I am using a subselect to pass an array of node id'...
1
vote
3answers
70 views

How to calculate shortest path dynamically considering other shortest paths calculated in same run?

My topic is to minimize the cost of construction line digging. Starting from a source point I have several households that need to be connected to the that line. My plan was to calculate the shortest ...
1
vote
1answer
41 views

How to identify pgrouting nodes I am interested after splitting road network in for many to many routing?

So I have a list of source points and a list of destination points. I also have a street network and I have created connection lines using ST_ShortestLine() between source/destination points and the ...
3
votes
1answer
41 views

Pgrouting: problem with pgr_withpointsDD

I'd like to calculate a propagation from sources using my road graph. In extenso, I'd like to answer the following question: where are the limits of my isochrones for every sources I got. My sources (...
2
votes
1answer
89 views

PgRouting : Shortest path starting from the closest vertex not the closest node

I am currently working on a routing solution with PgRouting (Dijkstra's algorithm), but the shortest path it creates always start from the nearest nodes generated from the edge table, and sometimes ...
1
vote
1answer
23 views

What is priority in mapconfig_for_cars.xml of osm2pgrouting?

I am new user to pgrouting. I wonder what the meaning of "priority" value means? By default, the values are 1, 1.05, 1.15, 1.5, etc. How to calculate it and why it becomes a value. Also, is ...
0
votes
0answers
38 views

Shortest road route calculation on OpenLayers GeoDjango

I have created a web based GIS application using Django, Mapnik, Mapproxy, OpenLayers 6. Now I need to develop a shortest path(road distance) between two points selected by the user. What is the best ...
1
vote
1answer
29 views

Use Common Table Expressions with pgr_TSP

I have a query that uses a handful of CTEs to return a generated set of points. The actual query is more complicated, but the following will do as an example: WITH geom AS ( SELECT unnest('{ ...
0
votes
0answers
46 views

PostgreSQL/PostGIS/pgRouting function (written in PL/pgSQL) not found nor run in user but can be used and gives correct result by admin

A function using pgr_dijkstra (pgRouting) is returning correct answer when run from "admin". The same function run from a simple user returns an error (ERROR: function pgr_dijkstra(unknown, ...
0
votes
0answers
49 views

Time taken to build the routing network in the pgrouting

I am using: PostgreSQL 9.6 pgRouting 2.6.2 PostGIS 2.5 I have line geometry shapefile of count 700K. When I build the network using pgr_createTopology in the new DB, network created within 1 ...
0
votes
1answer
132 views

Can't run pgRouting Layer plugin in QGIS 3.10.3

I was able to use osm2pgrouting tool successfully on Windows with PostgreSQL version 11.9 and pgRouting version 3.1.0. I successfully generated my "ways" file in a PostGIS conection in QGIS ...
0
votes
0answers
40 views

pgrouting is very slow

I have the following code but the output is empty. It is very slow. I want a pair to pair pgr_dijstracost rather than many to many. Is there a feasible solution? DO $do$ DECLARE ii int := 1; BEGIN ...
1
vote
1answer
82 views

ST_MakeLine returns Unsupported geometries not rendered in geometry viewer

I am trying to run a ST_MakeLine query that will return the shortest distance between given coordinates The code is as follows: SELECT ST_MakeLine(route.geom) as test FROM (SELECT * FROM ...
0
votes
1answer
36 views

Dashed lines in pgRouting [closed]

pgr_dijkstra returns a dashed line. I tried with different databases and tables and always returns a dasher line. Some explanation?
0
votes
1answer
30 views

Runtime split our the line based on moving nearest vertex in pgrouting?

I attached my screenshot using pgrouting. Is it possible to runtime split our the line based on moving nearest vertex in pgrouting? Is there any easiest function or solution over there? Thank you
0
votes
0answers
58 views

How to use pg_routing to connect a point to the closest point of a set of points?

Imagine we have the location of a person (point) and 100 restaurants (each is a point). My objective is to calculate the path from the person to the nearest restaurant (just one), but I want to avoid ...
1
vote
1answer
58 views

Creating a Bounding box on pgr_Dijkstra to make it faster

I have a problem with the Dijkstra algorithm in regards to the query speed. My current php script for the query is looking like this: $sql = "SELECT * FROM pgr_dijkstra( 'SELECT id, ...
0
votes
1answer
114 views

Routing Layer does not show on Leaflet Map

I am trying to develop a routing application. I have published my layers and SQL view on GeoServer. Currently I am trying to display my pgRouting Layer on my leaflet map using markers as start and end ...
3
votes
1answer
79 views

Grade separation routing using pgRouting

I am using pgRouting version 2.6. I am creating a routing topology from a subset of lion data https://www1.nyc.gov/site/planning/data-maps/open-data/dwn-lion.page I have gone through the process of ...
0
votes
1answer
80 views

Getting meters from pgr_dijkstra

I imported http://download.geofabrik.de/europe/germany/baden-wuerttemberg.html into my PostgreSQL database which supports PostGIS. Now I wrote a PHP script which gets two points (lon, lat, which are ...
1
vote
1answer
45 views

Routing only with specified points

I'm very new to GIS and to pgRouting. We're implementing a Routing system in our app and we need to route between points that we'll define ourself. So far, we have a working pgRouting on Postgis (on ...
2
votes
0answers
54 views

pgRouting: pgr_KSP() does not return shortest path when k > 1

I am trying to get an arbitrary number of paths between two points in a network. I am using pgr_KSP — Returns the “K” shortest paths. My aim is to get the K cheapest routes between two points. ...
0
votes
1answer
34 views

Analysis electric network with pgRouting

Electric network is a kind of utility network in GIS. In this network we have a point layer that consist power stations and end users. Power stations called source and end users called sink. And also ...
0
votes
0answers
30 views

Losing connection to the server when using PG Routing function pgr_alphaShapes

I am running PG Routing v. 3.0 on Postgresql 12.2 and the pgr_alphaShapes function is giving me a lot of trouble. Following the documentation here, I passed a geometry and a spoon radius. SELECT * ...
1
vote
1answer
41 views

Replacement for pgr_pointToEdgeNode for pgr 3.0

I am working through the book 'pgRouting: A Practical Guide' and have come across a function that has been deprecated. The function is pgr_pointToEdgeNode. Is there a similar function I can use to ...
1
vote
1answer
42 views

Error load new layer from query result

I tried many times to create new layer from query result, but i got this error message, when loading it. " PostgreSQL layer has no primary key." SELECT * FROM pgr_drivingDistance('select gid::...
1
vote
0answers
31 views

Connect pg routing to HTML webpage for routing application

I am trying to create a web based routing application for my final year project. I am currently trying to connect my web page with pg_routing. I have all my features loaded in GeoServer and PostgreSQL....
0
votes
0answers
20 views

How to install pgRouting and use it in pgadmin4 in OSX

Is there a straightforward way to install pgRouting in my existing PostgreSQL(version 11) installation and use it through my pgadmin4 by creating an extension? I am using OSX.
1
vote
1answer
106 views

How to limit the search for facilities to only 1 unit with PG Routing? … Closest Facility in PostGIS?

I'm working in PGROUTING - POSTGIS I have my road network and two sets of points -firestation and the entire cityblocks from town (in diferent tables, 1 for origin, and 1 for destination). The plan ...
0
votes
1answer
26 views

PGRouting Error Missing table?

I am trying to use pgrouting to find the shortest path in GeoServer. So I created new layer in sql view but its giving me error. I created 3 table in database: at_2po_4pgr = main table ...
1
vote
0answers
75 views

Finding nearest POIs by travel time(not distance) given current location and travel method

A user can choose between walking, bicycling, public transit, or driving for X minutes. Their current location is a latitude and longitude pair given by the HTML5 Geolocation API(wgs84). The (roughly ...
0
votes
0answers
29 views

Issues with pg_routing installation on Mac

I've never had issues with installation on PC but now I'm trying to install on Mac and at first, when I went to create the extension after I downloaded I got a message that said something like cannot ...
0
votes
1answer
91 views

Distance in Meters/Kilometers from pgr_drivingdistance

I am having trouble calculating distance (driving distance) along a route with the pgr_drivingdistance function. I have a straightforward workflow, I download OSM data, and put that into postgresql ...
2
votes
1answer
94 views

PGrouting costs

Most algorithms have two functions: A normal one: like dijkstra() A Cost-version: like DijkstraCost() I want the result of the cost version: A fast computation of the total seconds. In mine edges ...
1
vote
1answer
113 views

Bounding box in Dijkstra algorithm (many to many)

I apologize for the delicate duplication of my TOPIC but I am still standing. I have the table, which has information about pairs between source places and points (without geometry). I have used this ...
2
votes
2answers
78 views

PgRouting coverage area with node restrictions

I have a water network in which there exist valves at nodes between two edges (pipes). When the valve is open water can flow, if not, it can't. How can I calculate the catchment area from a start ...
1
vote
1answer
157 views

pgr_dijkstra ERROR: invalid memory alloc request size 1080000000

I am using pgr_version 2.6.3 I tried googling, most of the posts suggest the data is corrupted. So I tried pg_dump and select row by row to try finding the corrupted row, but did not encounter any ...

1
2 3 4 5
17