TransWikia.com

Create new properties when updating a layer

Geographic Information Systems Asked on March 10, 2021

I’m trying to update a property that doesn’t exists in my current database, and I want that if he doesn’t exist – then create it with my value and only for this specific layer.
For example – I have a database of the states with their names and population, and I want to add whether this state voted republican, democratic or independent, so my request would look like that:

<?xml version="1.0" ?>
<wfs:Transaction
   version="2.0.0"
   service="WFS"
   xmlns:fes="http://www.opengis.net/fes/2.0"
   xmlns:wfs="http://www.opengis.net/wfs/2.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/wfs/2.0
                       http://schemas.opengis.net/wfs/2.0.0/wfs.xsd">
   <wfs:Update typeName="topp:states">
      <wfs:Property>
         <wfs:ValueReference>VotedFor</wfs:ValueReference>
         <wfs:Value>democratic</wfs:Value>
      </wfs:Property>
      <ogc:Filter>
         <ogc:PropertyName>STATE_NAME</ogc:PropertyName>
         <ogc:Literal>Colorado</ogc:Literal>
      </ogc:Filter>
   </wfs:Update>
</wfs:Transaction>

And since I don’t have in my database the “VotedFor” parameter, I wonder if there is any way to create it “on the fly”

One Answer

No, there is no way with in the WFS standards to do this. WFS assumes that you have a fixed (and unchangeable) schema (the result of describeFeature requests) underlying your features.

Answered by Ian Turton on March 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP