[Zoo-discuss] valid GML string
Steve.Toutant at inspq.qc.ca
Steve.Toutant at inspq.qc.ca
Tue Jul 22 07:13:39 PDT 2014
I'm still unable to use the services provided in zoo trunk.
Someone on this list succesfully send a GML to the centroidPy?
I'm trying to use CentroidPy with a GML as input. Sorry for the long
post...below is the config and request
I always get the error
[error] ERROR 1: GML Geometry is empty in OGR_G_CreateFromGML()., referer:
http://10.2.198.132/geo/igo/wps/client/ol/
[error] True, referer: http://10.2.198.132/geo/igo/wps/client/ol/
[error] /vsimem//temp10, referer:
http://10.2.198.132/geo/igo/wps/client/ol/
[error] 'NoneType' object has no attribute 'GetLayer', referer:
http://10.2.198.132/geo/igo/wps/client/ol/
[error] <osgeo.ogr.Driver; proxy of <Swig Object of type 'OGRDriverShadow
*' at 0x7f22685b6b70> >, referer:
http://10.2.198.132/geo/igo/wps/client/ol/
[error] <osgeo.ogr.DataSource; proxy of <Swig Object of type
'OGRDataSourceShadow *' at 0x7f22685b6c30> >, referer:
http://10.2.198.132/geo/igo/wps/client/ol/
[error] <osgeo.ogr.Layer; proxy of <Swig Object of type 'OGRLayerShadow *'
at 0x7f22685b6c60> >, referer: http://10.2.198.132/geo/igo/wps/client/ol/
[error] GML, referer: http://10.2.198.132/geo/igo/wps/client/ol/
[error] ['.xml', '.xsd'], referer:
http://10.2.198.132/geo/igo/wps/client/ol/
Here is the GML v3. It is valid since I use it in other applications
<gml:featureMember xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/gml
http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd"><feature:feature
xmlns:feature="http://example.com/feature"><feature:geometry><gml:Polygon><gml:exterior><gml:LinearRing><gml:posList>-78.8818359375
40.374755859375 -76.0693359375 60.062255859375 -57.0849609375
48.109130859375 -78.8818359375
40.374755859375</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></feature:geometry></feature:feature></gml:featureMember>
I have tried with a GMML fragment for the geometry also, I get the same
error
<gml:Polygon><gml:exterior><gml:LinearRing><gml:posList>-78.8818359375
40.374755859375 -76.0693359375 60.062255859375 -57.0849609375
48.109130859375 -78.8818359375
40.374755859375</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon>
Here is the config CentroidPY
[CentroidPy]
Title = Extract the feature that have a valid geometry field.
Abstract = Extract the feature that have a valid geometry field.
processVersion = 1
storeSupported = true
statusSupported = true
serviceProvider = ogr_sp
serviceType = Python
<DataInputs>
[InputPolygon]
Title = Polygon to get the centroid
Abstract = The centroid which is not necessarily within the geometry.
minOccurs = 1
maxOccurs = 1
<ComplexData>
<Default>
mimeType = text/xml
encoding = UTF-8
schema = http://schemas.opengis.net/gml/3.1.1/base/gml.xsd
</Default>
<Supported>
mimeType = text/xml
encoding = UTF-8
schema = http://schemas.opengis.net/gml/3.1.1/base/gml.xsd
</Supported>
</ComplexData>
</DataInputs>
<DataOutputs>
[Result]
Title = The Centroid
Abstract = JSON String / GML Entity of the centroid
<ComplexData>
<Default>
mimeType = text/xml
encoding = UTF-8
</Default>
<Supported>
mimeType = application/json
encoding = UTF-8
</Supported>
</ComplexData>
</DataOutputs>
Here is the Execute request
<wps:Execute xmlns:wps="http://www.opengis.net/wps/1.0.0" version="1.0.0"
service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"><ows:Identifier
xmlns:ows="http://www.opengis.net/ows/1.1">CentroidPy</ows:Identifier><wps:DataInputs><wps:Input><ows:Identifier
xmlns:ows="http://www.opengis.net/ows/1.1">InputPolygon</ows:Identifier><ows:Title
xmlns:ows="http://www.opengis.net/ows/1.1">Polygon to get the
centroid</ows:Title><wps:Data><wps:ComplexData
mimeType="text/xml"><![CDATA[<gml:featureMember
xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/gml
http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd"><feature:feature
xmlns:feature="http://example.com/feature"><feature:geometry><gml:Polygon><gml:exterior><gml:LinearRing><gml:posList>-78.8818359375
40.374755859375 -76.0693359375 60.062255859375 -57.0849609375
48.109130859375 -78.8818359375
40.374755859375</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></feature:geometry></feature:feature></gml:featureMember>]]></wps:ComplexData></wps:Data></wps:Input></wps:DataInputs><wps:ResponseForm><wps:RawDataOutput><ows:Identifier
xmlns:ows="http://www.opengis.net/ows/1.1">Result</ows:Identifier></wps:RawDataOutput></wps:ResponseForm></wps:Execute>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20140722/a3598add/attachment.html>
More information about the Zoo-discuss
mailing list