0

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"

0

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.

  • And is there any other standard that is a bit more flexible and that allows that? – Ido H Levi Apr 4 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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