Hi all, I am using GeoTools WFS-Plugin to write an WFS-T client. On the serverside GeoServer is used.
I have a problem with the current handling of null values: When I create features on the client side, all null attributes are transmitted as empty elements by GT. On the serverside all those empty elements are turned into empty strings. Next, a feature is created containing all the empty strings in its attributes, regardless of the attribute type. Even on numeric, boolean, ... attributes. All contain those empty strings. I am using sort of GeoServer transaction plugin to postprocess the features. Now there is apparently a mismatch between the AttributeDescriptors type information and the runtime type of those attributes. I would like to have this problem fixed and could provide a pull request. Question: 1) As a fix might break existing applications, currently expecting empty strings, is the GeoTools team willing to accept such a "dangerous" change? 2) What do you think is the best approach to fix this? Suggestions: a) Currently the org.geotools.gml2.bindings.GML2ParsingUtils discard null values returned by converters when creating the feature. A special case for empty strings will probably have the desired effect in a save way (in terms of side effects). b) org.geotools.xml.impl.ParseExecutor discards null values being the result of parsing by the bindings. This might be changed, because the binding might be actually in charge of converting XML to Objects properly. However, the parsing seems quite complicated, I can not foresee which side effects might occur. I propose option a). Any comments are welcome. But most important: Are you willing to accept such a change? Best regards, Andreas -- Andreas
------------------------------------------------------------------------------
_______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel