Closed rsignell-usgs closed 10 years ago
@tomkralidis, this has to be something simple, right?
Doesn't look like this is possible right now. It should be based on WFS 1.1.0:
The optional outputFormat attribute specifies the format of the response to a
GetFeature request. The default value is text/xml; subtype=gml/3.1.1 indicating that a
valid GML3 [2] document, that validates against a valid GML3 application schema
(generated using the DescribeFeatureType request), must be generated. For backward
compatability, the values GML2 or text/xml; subtype=gml/2.1.2 may be specified
indicating that a valid GML2 document, that validates against a valid GML2 application
schema, must be generated.
Other output formats (including older versions of GML, non-XML, binary and vendor
specific formats) are also possible as long at the appropriate values for the outputFormat
attribute are advertised in the capabilities document [clause 13]. This specification
recommends that a descriptive narative be included in the capabilities document for each
output format listed there. This, however, is not a mandatory requirement
@kwilcox can't we only apply outputformat
if specified?
so fixed in #140. Nice.
I would like to use OWSLib to request a JSON response from a WFS service.
This works, but doesn't use OWSLib:
returns:
How would I accomplish this using OWSLib?
I didn't see how to specify
outputFormat
here: https://github.com/geopython/OWSLib/blob/master/owslib/feature/wfs100.py#L137-L139I got this far:
but this returns:
TypeError: getfeature() got an unexpected keyword argument 'outputFormat'