Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFS: correct data types for describefeaturetype #65

Closed
havatv opened this issue Oct 24, 2013 · 6 comments
Closed

WFS: correct data types for describefeaturetype #65

havatv opened this issue Oct 24, 2013 · 6 comments

Comments

@havatv
Copy link
Contributor

havatv commented Oct 24, 2013

In the WFS (and WMS) server documentation, gml_[item name]_type is used to specify the type of the non-spatial properties of a feature. Currently the documentation is:

gml_[item name]_type (Optional) Specifies the type of the attribute.
Valid values are Integer|Real|Character|Date|Boolean.

The value specified in gml_[item name]_type is used as it is in the describefeaturetype response, so I guess that the values need to be valid GML types.

An overview of the XML schema type library can be found in: http://books.xmlschemata.org/relaxng/relax-CHP-8-SECT-1.html

"Real" and "Character" are not mentioned there, and "Integer", "Date" and "Boolean" are all specified with a lower case first letter.
I assume that "double" could be used instead of "Real", and "string" instead of "Character".

What should we write in the gml_[item name]_type documentation?
I think we need to say that the values need to be valid GML or XML data types. But should we give directions when it comes to which of the valid GML or XML data types that should be used? Should only primitive types be allowed?
Should a prefix (for example "xsd:") be mandatory?

Relevant open issue: MapServer/MapServer#462

@rouault
Copy link
Contributor

rouault commented Oct 26, 2013

I think that it is not a documentation issue but an implementation one. See MapServer/MapServer#4800 I've just created related to that

@havatv
Copy link
Contributor Author

havatv commented Oct 28, 2013

Thank you, @rouault for the clarification. However, the documentation could perhaps be made clearer / more informative.
Should OGR be mentioned?
I am not sure if I read your code right, but should it be mentioned that it is possible to use other data types - the OGR data types mentioned in the docs are "translated", but other data types are just sent as they are specified (e.g. "xsd:double")?

@rouault
Copy link
Contributor

rouault commented Oct 28, 2013

@havatv if you have ideas how to make the doc clearer, don't hesitate. Actually OGR is mentionned in the doc of the "gml_types" option. But the precision "Currently this is only used for OGR based output formats, not the WFS GML2/GML3 output" is no longer true since my fix. Actually DescribeFeatureType will now take into account item type, either if it is specified manually with gml_[item_name]_type or gml_types = "auto"

As far as mentionning that other data types are sent as they are specified, this is no longer true. It should not be advertized. It is just a way of keeping backward compatibility if people used xsd types into gml_[item_name]_type even if it was not legal. Users should only use the advertized types "Integer|Real|Character|Date|Boolean" since it is the only "universal" way of specifying them in MapServer internals.

@havatv
Copy link
Contributor Author

havatv commented Oct 29, 2013

Thank you for the clarification, @rouault .
Your fix has not yet made it into the current release, so it could perhaps be useful to mention this problem in the 6.4 documentation for the time being?

@rouault
Copy link
Contributor

rouault commented Oct 29, 2013

Yes, probably. But the next point release of 6.4 will have the fix. I'm now wondering if it was appropriate to push it in the 6.4 branch if ever people relied on the undocumented behaviour...

havatv pushed a commit that referenced this issue Oct 31, 2013
@havatv
Copy link
Contributor Author

havatv commented Oct 31, 2013

I suggest we leave this open until @rouault 's fixes has made it to the current release. Then the note should be removed.

havatv pushed a commit that referenced this issue Jan 2, 2014
…d note on gml_item_name_type in wfs and wms server document (#65)
@havatv havatv closed this as completed Jan 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants