pgrouting | Development branch | Dataset library
kandi X-RAY | pgrouting Summary
kandi X-RAY | pgrouting Summary
pgRouting extends the PostGIS/PostgreSQL geospatial database to provide geospatial routing and other network analysis functionality.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pgrouting
pgrouting Key Features
pgrouting Examples and Code Snippets
Community Discussions
Trending Discussions on pgrouting
QUESTION
I have set up tables containing vertices and edges (representing airports and the route between them). Using the following query I'm able to get the shortest path between two points.
...ANSWER
Answered 2020-Oct-12 at 07:59After lots of research I noticed that Dijkstra can not take any limitation in number of edges by nature; So I had to create an algorithm inspired by Bellman Ford.
For detailed information have a look on the following repository:
QUESTION
There is a qgis project which has a layer that is connected to database and gets data from http://localhost:5432. When the project is opened in Qgis desktop - everything works perfect - you update data in postgres (localhost:5432) - the layer is updated on the map.
There is a QGIS server which is started inside a docker container. I place the project inside the qgis-server docker container (/etc/qgisserver), but the project can not set connection (localhost:5432) with database in another docker container.
I can not understand how to make qgis server inside container refer to its localhost:5432 but get to the host`s localhost:5432 (where postgres from another container is accessible).
I have tried to do smth like this but have not succeeded:
...ANSWER
Answered 2020-Jun-19 at 16:22I have succeeded this way:
I have connected QGIS and Postgis containers in bridge network;
Explicit IP addresses were assigned to Postgis and Qgis containers;
I have changed /etc/hosts file in my QGIS container so that calling 'localhost' from QGIS container will lead to Postgis container.
So now the project that is deployed on QGIS sever is connected to Postgis from the nearby container. The docker-compose YAML now looks like:
QUESTION
Hi i add a library pyodbc into my pipfile, when i run the command docker-compose up app-name and run the dockerfile config i get an error when try to install dependency from pipfile.lock my python version is 3.7.4
...ANSWER
Answered 2020-Jun-04 at 04:07You need to install unixodbc-dev
package. You can install it by;
QUESTION
I work on a network dataset (with PostGIS extension, but since my current method using pgrouting is the only one I found to do what I want and it is extremely painful to run, I want to try and deal with it by attributes) such as the picture below :
Each section (letters) is a single object, and the color is the relevant attribute of the objects.
The table representing this is defined as such :
...ANSWER
Answered 2020-May-18 at 16:41Assuming that your data has no cirles, as shown in your sample data, an option is to use a recursive query.
The idea is to first identify all starting points for each color. For this, you can use not exsits
:
QUESTION
I am using this query for finding the path using postgresql , postgis, pgrouting, postgis_topology using nodejs
...ANSWER
Answered 2020-Jan-06 at 16:05If I understood you correctly, you just need to convert the already existing coordinates to a format that your application can read. There are many formats you can get directly from PostGIS. Here a few that might interest you:
Data sample
QUESTION
I downloaded Homebrew on macOS 10.12. It seemed to have downloaded successfully, but node is not downloaded through Homebrew. As I try to redownload node, I get this warning that homebrew doesn't support macOS 10.12, despite the first time success message I got that Homebrew downloaded successfully. My question is why Node isn't downloaded, and how I can get past this stage to download? The first time downloading, the Terminal got stuck at this one stage without much update for a long time so i exited and retried. The second and consequent times I tried "brew install node" have all been the same result (output below):
...ANSWER
Answered 2019-Oct-16 at 11:17When you install node
, Homebrew try to download a pre-built package and install it for you. The problem is, Homebrew only provide pre-built packages for the latest 3 version of macOS. For the time being, prebuilt pkg node
is only provided on macOS 10.13, 10.14, 10.15.
Cause Homebrew doesn't provide a pre-built pkg for macOS 10.12, the package will be built from source. That explains why your shell got stuck. The output word ./configure
and make install
are enough to let users realize it's compiling a package in the background as well.
Just wait patiently for the make install
to be done.
QUESTION
I'm trying to write a function that is able to find the shortest way between two points using pgr_dijkstra
function. I'm following this guide. With data provided in the guide everything works fine. But when I try to apply the same steps (build a topology using pgr_createTopology
and then test it with pgr_dijkstra
) to another data set, pgr_dijkstra
returns an empty result. I've also noticed that the guide's data set has a LineString
geometry column, while I have a MultiLineString
geometry column. What could be the reason?
My table's structure:
...ANSWER
Answered 2019-Oct-09 at 09:03The problem was actually related to geometry data types. The function doesn't work properly with MultiLineString
, though it doesn't produce any errors. So, I've converted MultiLineString
to LineString
and now everything seems to be OK.
QUESTION
I am currently having some problems with docker and connecting a node project with Postgres when running inside it.
I have already asked a related question see link, however, I can’t wrap my head around connection issue between nodeJs and postgres.
My docker-compose file looks like:
...ANSWER
Answered 2019-Jul-04 at 21:27After trying a lot, I could fix it. My docker-compose file was correct, my ajax request
was not properly defined. After changing
QUESTION
I'm working on a routing application using OSM data in pgrouting. I'm using overpass-api to access the data from a specific bounding box. However, after downloading the data, there seem to be tag_keys missing from the data.
When inspecting the data using postgis or QGIS, certain tag_keys are there, like "highway", "oneway" or "maxpeed". However, others seem to be missing. In particular the tag keys "bicycle" (with possible values like "yes" or "no") or "access" are not included in the data. These tag keys are available on OSM online, however.
The following code is used to retrieve the data from OSM through Overpass-API and put it into PGrouting
...ANSWER
Answered 2019-Jun-11 at 08:20I'm not familiar with osm2pgrouting. However it looks like mapconfig.xml doesn't include "bicycle" and "access" tags. You either need to add them or create your own config file. If you want osm2pgrouting to consider these tags during routing this might not be enough, though.
QUESTION
We built a debian docker image with postgresql to run one of our service. The database is for internal container use and does not need port mapping. I believe it is installed via apt-get
in the Dockerbuild file.
We stop and start this service often, and it is a performance issue that the database is slow to startup. Although empty, takes sightly over 20s to accept connection on the first time we start the docker image. The log is as follow :
...ANSWER
Answered 2019-Apr-22 at 09:12Considering the line database system was not properly shut down; automatic recovery in progress
that would definitely explain slow startup, please don't kill the service, send the stop command and wait for it to close properly.
Please note that the system might kill the process if it takes to long to stop, this will happen in the case of postgresql if there are connections still held to it (probably from your application). If you disconnect all the connections and than stop, postgresql should be able to stop relatively quickly.
Also make sure you stop the postgresql service inside the container before turning it off.
TCP will linger connections for a while, if you are starting and stopping in quick succession without properly stopping the service inside that would explain your error of why the port is unavailable, normally the service can start/stop in very quick succession on my machine if nothing is connected to it.
3 start-stop cycles of postgresql on my machine (I have 2 decently sized databases)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pgrouting
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page