I am trying to create curved lines between two point in QGIS. There are a few posts that show how to create these lines (hyperlinks below). However, I am having trouble executing the code in QGIS.
This article says one could use the following code:
SELECT st_makeline(st_segmentize((SELECT geog FROM paths WHERE gid = 1), 50000)::GEOMETRY);
This article says one could use this code:
UPDATE experimental.airroutes SET the_geom = (SELECT ST_Transform(ST_Segmentize(ST_MakeLine( ST_Transform(a.the_geom, 953027), ST_Transform(b.the_geom, 953027) ), 100000 ), 4326 ) FROM experimental.airports a, experimental.airports b WHERE a.id = airroutes.source_id AND b.id = airroutes.dest_id );
It's unclear to where where to execute this code. I have tried several options that I outlined below which so far have not been successful. Here is what I did so far:
I think I may need to utilize the "Add PostGIS Table(s)" (the elephant icon) function. If so it's unclear to me what the Name, Service, Host, Database, Username and Passwords should be. This post asked about this and the respondent suggested accessing pgAdmin, which I do not have and can't figure out how to get.
This post suggests executing the PostGis SQL code from the PostGIS Manager Plugin. However, this is not an available plugin from the Plugins library.
I have also tried to use DB Manager but when I click on the SQL Window icon I receive a message noting "No database selected or you are not connected to it."
Finally, I installed the Post GIS SQL Editor plugin but when I open the plugin I receive the following error "An error has occured while executing Python code:
TypeError: QComboBox.findText(QString, Qt.MatchFlags flags=Qt.MatchExactly|Qt.MatchCaseSensitive): argument 1 has unexpected type 'QPyNullVariant'