0

I got following insert XML WFS transactions.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Transaction xmlns="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
  <Insert>
    <equipaments_copy xmlns="xxx">
      <geom>
        <MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#25831">
          <polygonMember>
            <Polygon>
              <exterior>
                <LinearRing>
                  <posList>419834.94350044 4581816.95425736 419849.64534847 4581820.41660114 419854.55439083 4581809.0465984 419854.78626612 4581808.50954382 419852.970256 4581807.54655611 419842.41420174 4581802.54862851 419841.54615645 4581802.1597275 419837.95017966 4581800.5486593 419831.47560517 4581815.64886866 419831.28528725 4581816.09273379 419834.94350044 4581816.95425736</posList>
                </LinearRing>
              </exterior>
            </Polygon>
          </polygonMember>
        </MultiPolygon>
      </geom>
      <nom>3337</nom>
    </equipaments_copy>
  </Insert>
</Transaction>

Also tried this one

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Transaction xmlns="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
  <Insert>
    <equipaments_copy xmlns="xxx">
      <geom>
        <MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#25831">
          <polygonMember>
            <Polygon>
              <outerBoundaryIs>
                <LinearRing>
                  <coordinates xmlns="http://www.opengis.net/gml" decimal="." cs="," ts=" ">419834.94350044,4581816.95425736 419849.64534847,4581820.41660114 419854.55439083,4581809.0465984 419854.78626612,4581808.50954382 419852.970256,4581807.54655611 419842.41420174,4581802.54862851 419841.54615645,4581802.1597275 419837.95017966,4581800.5486593 419831.47560517,4581815.64886866 419831.28528725,4581816.09273379 419834.94350044,4581816.95425736</coordinates>
                </LinearRing>
              </outerBoundaryIs>
            </Polygon>
          </polygonMember>
        </MultiPolygon>
      </geom>
      <nom>3337</nom>
    </equipaments_copy>
  </Insert>
</Transaction>

When sending to GeoServer it creates object with no geom object with no error. enter image description here

Property of geometry is set to MultiPolygon with name geom. geom

Any idea of what is wrong with this Insert? Why geom object is not getting set?

6
  • One is GML 2 and the other is GML 3, unless you change the version of WFS you are using it won't work.
    – Ian Turton
    Commented Jul 4, 2021 at 18:42
  • the problem that no one is working Commented Jul 4, 2021 at 18:55
  • Are you using PostGIS datastore or what?
    – user30184
    Commented Jul 4, 2021 at 19:34
  • Welcome to Geographic Information Systems! You need to turn up the logging level to developer in the global settings page, and then make the request again. Then edit your question with the relevant part of the log file.
    – Ian Turton
    Commented Jul 5, 2021 at 7:24
  • also, do you really use xxx as the namespace URI or are you trying to redact something? That uri has to match the workspace URI of the features you are adding
    – Ian Turton
    Commented Jul 5, 2021 at 7:29

1 Answer 1

1

The problem was i was hitting WFS 1.1.0 instead of 1.0.0 which works with MultiPolygon. WFS 1.1.0 works with MultiSurface Changing this version="1.1.0" to version="1.0.0" now sets geom object.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.