New answers tagged

1 vote

Changing layer provider (datasource) from shapefile to PostgreSQL with PyQGIS

Finally, I've found myself the answer. You have to use setDataSource() on the layer: for layer in QgsProject.instance().mapLayers().values(): if layer.name() == "my_layer_name": ...
Etienne's user avatar
  • 517
0 votes

QGIS server service file pg_service.conf not found when doing a request

First, you declare that PGSERVICEFILE: "/etc/qgisserver/pg_service.conf" And then you put the file here: ./data/pg_service.conf
katagena's user avatar
  • 1,624
3 votes

Delete Features of a layer from PostgreSQL on QGIS itself

This issue could be due to the unavailability of a primary key in the table. This can be resolved by creating a primary key in that table where the layer is comprised. A primary key on the table ...
Sulakna Weerasinghe's user avatar
0 votes

OSM Vector tile ST_AsMVTGeom SQL query Coordinates error

you need to dynamically pass the Z(zoom level), X(tile column),Y(tile row) values from the frontend map to the node server to create a tile envelope that will be used to intersect the postgres table ...
ziggy's user avatar
  • 4,480
0 votes

FME discard destructive operations in the table handling drop-down list for PostgreSQL / PostGIS writers

No this is not possible in the software. Workaround I can think of is to create a role which can create a table, but not drop it. Have not tested this but I think it is possible.
nielsgerrits's user avatar
  • 3,894
1 vote

FME restart identity sequence when using Truncate Existing in the writer table handling drop-down menu

This isn't quite the answer you're looking for, however, as I see it there are two options. On the writer Feature Type there is an option in the Advanced setting to Allow Serial Column Writing. If ...
virtualcitymatt's user avatar
0 votes

PostGIS ST_Length returns 0 for geographies with high number of decimals

The first query gives this result for me: spheroid_dist | sphere_dist --------------+------------- 7.92351961 7.93711061 My PostGIS version is POSTGIS=""3.4.1 3.4.1"" [...
user30184's user avatar
  • 64.7k
1 vote
Accepted

Cannot cancel pg_routing query in local database

The problem was not that I had a query running, but that my function, as expected, was recursively creating the table public.sk_shortest_routes_rd becasue it was inside the function call.
MJM's user avatar
  • 975
0 votes

Connect to Supabase PostgreSQL database with ArcGIS Pro

From my personal experience, I have successfully connected to Supabase from QGIS. In my Supabase project, I have a PostgreSQL version 15.x with the latest PostGIS. I was able to create and edit data ...
Ry Blaisdell's user avatar
0 votes

Cleaning topology errors in PostgreSQL (vector data) using QGIS?

This method uses PostGIS and can be carried out in three steps. The code below is based on a polygon table is called polygon_table with a geometry column geom and a unique integer columns called ìd. ...
Mr_Robinini's user avatar
1 vote
Accepted

Using a PostGIS Layer in QField

As the previous answer states, QfieldCloud does offer this feature, not realtime, but each time you Push Changes, it will write them to PostGIS layers. I assume a self hosted QfieldCloud would also ...
Jeremy Jackson's user avatar
0 votes

Upgrading PostGIS 3.0 to PostGIS 3.3 on RHEL 8 fails

I ended up removing PostGIS 3.0 and allowed the dependencies to be removed. Then I installed PostGIS 3.3 and the new dependencies were installed with it. There are some other dependency issues but ...
NC 2024's user avatar
  • 11
5 votes

PostgreSQL PostGIS: get geography lines interceptions

Affine transformations in PostGIS are planar operations only. You are trying to solve geodetic problems, of which e.g. Vincenty's algorithms are baked into ST_Distance and ST_Project - the latter of ...
geozelot's user avatar
  • 29.9k
0 votes

Find points x meters from a center in a specific direction (or line)

A simple, robust and fast solution using spheroidal distances (in meter) and ST_LineInterpolatePoint - assuming all edges in the given network topology are correctly noded at intersections: SELECT ...
geozelot's user avatar
  • 29.9k
2 votes
Accepted

Find points x meters from a center in a specific direction (or line)

Assuming: An existing point layer with IDs An existing line layer with IDs We can create a buffer at a set distance around the points and select where this intersects the lines. --POINTS ON LINE x ...
Cushen's user avatar
  • 2,918

Top 50 recent answers are included