-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
What is the bug or the crash?
If the geometry type of the layer is CIRCULARSTRING, COMPOUNDCURVE or CURVEPOLYGON:
- it's not possible to save the geometry changes of existing features
- the curves of the new features are generated as linestrings and not as arcs
Steps to reproduce the issue
-
Create a PostgreSQL/PostGIS database
-
Create three tables, one for each geometry type:
CREATE TABLE circularstrings(id serial, name varchar, geom geometry(CircularString, 3857), CONSTRAINT circularstrings_pkey PRIMARY KEY (id)); CREATE TABLE compoundcurves(id serial, name varchar, geom geometry(CompoundCurve, 3857), CONSTRAINT compoundcurves_pkey PRIMARY KEY (id)); CREATE TABLE curvepolygons(id serial, name varchar, geom geometry(CurvePolygon, 3857), CONSTRAINT curvepolygons_pkey PRIMARY KEY (id)); -
Insert one feature in each table:
INSERT INTO public.circularstrings (name, geom) VALUES ('CIRCULARSTRING', ST_GeomFromText('CIRCULARSTRING (0 0, 0.5 0.5, 1 0)')); INSERT INTO public.compoundcurves (name, geom) VALUES ('COMPOUNDCURVE', ST_GeomFromText('COMPOUNDCURVE ((1 0, 0 0),CIRCULARSTRING (0 0, 0.5 0.5, 1 0))')); INSERT INTO public.curvepolygons (name, geom) VALUES ('CURVEPOLYGON', ST_GeomFromText('CURVEPOLYGON (COMPOUNDCURVE ((1 0, 0 0),CIRCULARSTRING (0 0, 0.5 0.5, 1 0)))')); -
Open an empty QGIS project, connect to the database and import the three tables
-
Enable all the WFS capabilities for the three layers (Project -> Properties -> QGIS Server -> WFS/OAPIF tab: check Published, Update, Insert and Delete)
-
Publish the project with QGIS-Server
-
Connect to the WFS service with QGIS Desktop and import the three layers.
The protocol WFS 1.1.0 with GML 3.1.1 is able to manage these geometry types and the features are correctly interpreted and drawn by the client (arcs are defined with three points and not with segments)layer "circularstrings" -> Information -> Information provider - Geometry: Line (CircularString) layer "compoundcurves" -> Information -> Information provider - Geometry: Line (CompoundCurve) layer "curvepolygons" -> Information -> Information provider - Geometry: Polygon (CurvePolygon) -
Edit the geometries of the existing features (e.g. move the vertices with the Vertex Tool) and try to save them.
Empty geometries are sent to the server:
<Transaction ... service="WFS" version="1.1.0"> <Update xmlns="http://www.opengis.net/wfs" typeName="compoundcurves"> <Property xmlns="http://www.opengis.net/wfs"> <Name xmlns="http://www.opengis.net/wfs">geometry</Name> <Value xmlns="http://www.opengis.net/wfs"/> </Property> <Filter xmlns="http://www.opengis.net/ogc"> <FeatureId xmlns="http://www.opengis.net/ogc" fid="compoundcurves.1"/> </Filter> </Update> </Transaction>and the following error appears:
Could not commit changes to layer Errors: ERROR: 1 geometry not changed. Provider errors: Unsuccessful service response: no features were added, deleted or changed. -
Draw new features in the three layers using the tool "Digitize with curve".
The curves of the new geometries are created as a sequence of segments and not as a sequence of arcs. The issue is already visible in the editing phase (before to save) showing the vertices of the new geometries with the Vertex Tool.
According to the geometry type, each curve should be represented with only 3 points. -
Try to save the new features:
- the features of the layers "compoundcurves" and "curvepolygons" are (consequentially) saved in the database with the wrong arc representation (sequence of segments)
- the features of the layer "circularstrings" are not saved due the following PostgreSQL error:
ERROR: Geometry type (CompoundCurve) does not match column type (CircularString) STATEMENT: INSERT INTO "public"."circularstrings"("geom","name") VALUES (st_geomfromwkb($1::bytea,3857),NULL) RETURNING "id"
Versions
| QGIS version | 3.44.4-Solothurn |
| QGIS code revision | 108203c541e |
| Libraries | |
| Qt version | 5.15.13 |
| Python version | 3.12.3 |
| GDAL version | 3.8.4 |
| PROJ version | 9.4.0 |
| EPSG Registry database version | v11.004 (2024-02-24) |
| GEOS version | 3.12.1-CAPI-1.18.1 |
| SQLite version | 3.45.1 |
| PostgreSQL client version | 16.10 |
| SpatiaLite version | 5.1.0 |
| QWT version | 6.1.4 |
| QScintilla2 version | 2.14.1 |
| OS version | Ubuntu 24.04.3 LTS |
Supported QGIS version
- I'm running a supported QGIS version according to the roadmap.
New profile
- I tried with a new QGIS profile
Additional context
No response