[TinyOWS-dev] Problems with showing a WFS feature with OpenLayers

Serge Dikiy serge at gisfiber.com
Thu Apr 19 14:46:11 EST 2012


Hi,

featureType: "GLP_Zone"

I think it will help you:
http://github.com/mapserver/mapserver/issues/4205
or
https://github.com/sdikiy/tinyows/commit/2c93f1f865bd29a15ebc0b3b200d079497a00fa8

BR

On 4/19/12, Rahkonen Jukka <Jukka.Rahkonen at mmmtike.fi> wrote:
> Hi,
>
> I tried to send your query with edited featuretype for my server at
> http://188.64.1.61/cgi-bin/tinyows with Poster (Firefox add-on)
>
> <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS"
> version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
>   <wfs:Query typeName="tows:france" srsName="EPSG:32634"
> xmlns:tows="http://www.tinyows.org/">
>     <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
>       <ogc:BBOX>
>         <ogc:PropertyName>the_geom</ogc:PropertyName>
>         <gml:Envelope xmlns:gml="http://www.opengis.net/gml"
> srsName="EPSG:32634">
>           <gml:lowerCorner>-376204.8192771 4050000</gml:lowerCorner>
>           <gml:upperCorner>1226204.8192771 5050000</gml:upperCorner>
>         </gml:Envelope>
>       </ogc:BBOX>
>     </ogc:Filter>
>   </wfs:Query>
> </wfs:GetFeature>
>
> Result is a correct result set (empty, because BBOX is not in France).
> Unfortunately I do not know why you have troubles.
>
> -Jukka Rahkonen-
>
>
>
> ________________________________
> Lähettäjä: tinyows-dev-bounces at lists.maptools.org
> [tinyows-dev-bounces at lists.maptools.org] käyttäjän Ermond Parllaku
> [erndal02 at hotmail.com] puolesta
> Lähetetty: 19. huhtikuuta 2012 21:55
> Vastaanottaja: tinyows-dev at lists.maptools.org
> Aihe: Re: [TinyOWS-dev] Problems with showing a WFS feature with OpenLayers
>
> The query that is sent is like this:
>
> <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS"
> version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
>   <wfs:Query typeName="tows:GLP_Zone" srsName="EPSG:32634"
> xmlns:tows="http://www.tinyows.org/">
>     <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
>       <ogc:BBOX>
>         <ogc:PropertyName>the_geom</ogc:PropertyName>
>         <gml:Envelope xmlns:gml="http://www.opengis.net/gml"
> srsName="EPSG:32634">
>           <gml:lowerCorner>-376204.8192771 4050000</gml:lowerCorner>
>           <gml:upperCorner>1226204.8192771 5050000</gml:upperCorner>
>         </gml:Envelope>
>       </ogc:BBOX>
>     </ogc:Filter>
>   </wfs:Query>
> </wfs:GetFeature>
>
> And the code that configures the wfs layer is like this:
>
>     wfs = new OpenLayers.Layer.Vector("Editable Features", {
>         //styleMap: styles,
>         strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
>         projection: new OpenLayers.Projection("EPSG:32634"),
>         protocol: new OpenLayers.Protocol.WFS({
>             version: "1.1.0",
>             srsName: "EPSG:32634",
>             url: "http://127.0.0.1:81/cgi-bin/tinyows",
>             featureNS: "http://www.tinyows.org/",
>             featureType: "GLP_Zone",
>             featurePrefix: "tows",
>             geometryName: "the_geom",
>             schema:
> "http://127.0.0.1:81/cgi-bin/tinyows?service=wfs&request=DescribeFeatureType&version=1.1.0&typename=tows:GLP_Zone"
>             //readFormat: new OpenLayers.Format.GML()
>             //readFormat: new OpenLayers.Format.GeoJSON()
>         })
>     });
>
> I have tried it without the featurePrefix, and I still get the same error
> described previously (InvalidParameterValue). The difference is that in that
> case the typeName will have the prefix "feature".
>
> I also tried to upgrade the libXml2.dll file, found in cgi-bin with the
> 2.7.6 version, but with no results. Perhaps I just haven't got the right
> libXml2.dll version for Windows (win32), I'm not sure for that.
>
> Sorry for my stupid questions and thanks a lot for any help.
>
> Ermond
>
> ________________________________
> From: erndal02 at hotmail.com
> To: tinyows-dev at lists.maptools.org
> Date: Thu, 19 Apr 2012 18:46:23 +0200
> Subject: Re: [TinyOWS-dev] Problems with showing a WFS feature with
> OpenLayers
>
> Hello,
>
> I finally managed to display a WFS layer with OpenLayers. It's a bit
> difficult to me, since this area is new to me.
>
> Anyway, I managed to display a WFS layer with OpenLayers, but I cannot make
> it work with TinyOWS. I keep getting an error like this:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <ows:ExceptionReport
>  xmlns='http://www.opengis.net/ows'
>  xmlns:ows='http://www.opengis.net/ows'
>  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
>  xsi:schemaLocation='http://www.opengis.net/ows
> http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd'
>  version='1.1.0' language='en'>
>  <ows:Exception exceptionCode='InvalidParameterValue' locator='request'>
>   <ows:ExceptionText>XML request isn't valid</ows:ExceptionText>
>  </ows:Exception>
> </ows:ExceptionReport>
>
> The request is almost the same as in the example found in the tutorial for
> TinyOWS.
>
> I think the exception has to do with the libXml2.dll and I am trying to
> follow the workarounds that are found in here:
> http://mapserver.org/trunk/tinyows/libxmlschemagmlbug.html
>
> But since I don't know much (or better say almost anything) about the Apache
> and how it is supposed to work, I just cannot follow it. I tried to change
> the file valueObjects.xsd according to what is described in the above
> tutorial but with no success. Is it possible to get a version of this dll
> (as described in the other options in the tutorial) that doesn't show this
> error? Or maybe help me how to choose only the GML 2.1.2 to be used by
> TinyOWS?
>
> Thanks a lot for your help and sorry for not using the right terminology. I
> am trying to learn as much as possible, but it's very difficult since I have
> a background with Microsoft and IIS...
>
> ________________________________
> Date: Fri, 13 Apr 2012 13:11:16 +0200
> From: olivier.courtin at gmail.com
> To: tinyows-dev at lists.maptools.org
> Subject: Re: [TinyOWS-dev] Problems with showing a WFS feature with
> OpenLayers
>
> Edmund,
>
> Your problem is described as a client issue.
>
> I suggest that you took as is, the TinyOWS/OpenLayers
> tutorial. And only later once it works to switch step by step
> to your datas.
>
> OpenLayers list could be (also) helpfull.
>
>
> HTH,
>
> --
> Olivier
>
> _______________________________________________ TinyOWS-dev mailing list
> TinyOWS-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tinyows-dev
>
> _______________________________________________ TinyOWS-dev mailing list
> TinyOWS-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tinyows-dev
> _______________________________________________
> TinyOWS-dev mailing list
> TinyOWS-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tinyows-dev
>


More information about the TinyOWS-dev mailing list