Select to view content in your preferred language

Editing WFS-T via QGIS

95
2
Friday
yockee
by
Frequent Contributor

I have been trying to edit WFS service published from arcgis server.

My setup:

- Arcgis Enterprise 11.0

- Arcgis Pro 3.0

- Postgresql

- QGIS 3.28

I have succesfully published the service. I can read it from QGIS but was unable to save the edit. 

Here are some screenshots :

yockee_1-1763713659832.png

yockee_5-1763714292140.png

 

yockee_4-1763713853129.png

I have tried some combinations like without success : WFS Option using Version 1.0, 1.1, 2.0, Maximum ; 

There errors are : about geometry and about unable to insert. The general error looks like the picture below.

yockee_6-1763714857784.png

Another error about geometry with a particular setting :

yockee_7-1763715380683.png

 

 

 

2 Replies
berniejconnors
Frequent Contributor

@yockee ,

        I have never done any work with WFS but I do have one observation.  The URL for the service you are publishing is ...testing_WFS7/MapServer/WFSServer.  To make changes to features I think you would have to begin with a feature service - not a map service.  It's just a guess.

Good luck,

Bernie.

P.S.  I really hope to see you succeed in editing an ArcGIS Server service with QGIS.  Have you tried asking this question in a QGIS forum?  

0 Kudos
yockee
by
Frequent Contributor

@berniejconnors    I made progress, although useless too. LoL

I upgrade QGIS to 3.40. Slightly better, but still can not be saved 100%. The geometry (shape) just wont get saved but the record entered the database !

The setup is pretty much the same. I use the WFS Properties 1.1 to be able to apply editing (when saved, there is no error). The other WFS Properties (1.0, 2.0) throw out errors upon saving. See pic below (ignore the "Ignore Axis orientation.." It does not matter if it is checked or not):  

yockee_0-1763951844640.png

The attribute settings are as follows :

1. Objectid field

yockee_1-1763951950376.png

2. the length(shape) attribute settings. I put $length as the default value:

yockee_2-1763952010949.png

3. Other attribute coloumn such as "Kol1. I put 'I' as the default"

yockee_3-1763952207448.png

The setting of attributes from Arcgis Pro before Map Service is published:

1. The field st_length is set to editable

yockee_5-1763953727042.png

2. the Share As Web layer properties setting: Dedicated and Enable Transaction. See pic below : 

yockee_7-1763954789517.png

 

 

Here is the evidence :

After a successful connection and adding the layer, I start some editing. Then save the edits.

I check the attribute in QGIS. Objectid, shape and Kol1 have values (sorry the Kol1 here is NULL as I forgot to fill in a value). See pic below:

yockee_4-1763952540446.png

As we can see from the above pic, the st_length(shape) gets its length number. That means QGIS can somehow detect the coordinate / projection that is being used in the Map Service.

Then I hit SAVE. No errors. This is where the problem starts: the new data get saved but I can not find their geometry, all length are NULL.

The Objectid coloumn is changed too, for example, during editing in QGIS it is #405, but then when saved it becomes #808. Does not really matter because arcgis has internal mechanism of inserting OBJECTID.

The Kol1 is saved accordingly, as expected.

The geometry coloumn just does not get saved. 

See pic below for the end result:  

yockee_6-1763953814914.png

It seems the problem lies in the geometry coloumn. The Arcgis somehow does not get its values from the WFS service.

 

0 Kudos