[Zoo-discuss] valid GML string

Fenoy Gerald gerald.fenoy at geolabs.fr
Tue Jul 22 07:57:50 PDT 2014


Hi Steve,
nice to hear from you.

I’m sorry that I cannot run the CentroidPy by now, nevertheless when I saw your request I noticed something strange: ComplexeData contains a XML content, which sounds good but there is also a <![CDATA[XML]]> which looks odd.

So I tried to remove it, just to make sure this request will then work correctly. Hopefully it was working, note that I used the latest ZOO-Kernel version available on ZOO-Project.org web site.

So that was the way I tried your request with success:

curl -H "Content-Type: text/xml" -d@/Users/djay/MapMint/zoo-project-1.4.0/zoo-project/testing/demo1.xml "http://zoo-project.org/cgi-2014/zoo_loader.fcgi"

You can find attached to this email the XML POST request I used to run my request. I guess you may have better result by adapting this file to your need.

I hope to hear back from you,
Best regards,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: demo1.xml
Type: application/xml
Size: 1420 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20140722/8e17f957/attachment.xml>
-------------- next part --------------


Le 22 juil. 2014 à 16:13, Steve.Toutant at inspq.qc.ca a écrit :

> 
> 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>
> _______________________________________________
> Zoo-discuss mailing list
> Zoo-discuss at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/zoo-discuss
> 



Gérald Fenoy
http://wiki.osgeo.org/wiki/User:Djay

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20140722/8e17f957/attachment.pgp>


More information about the Zoo-discuss mailing list