[Geoserver-users] Filter problems

I'm running a version of geoserver 1.6 about 2 weeks old from the nightly builds. It appears to not be parsing my filter request properly.

Here is the URL of my server:

http://office.refractions.net:21880/geoserver/wfs

Here is the filter query I'm sending it:

<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs&quot; xmlns:gml="http://www.opengis.net/gml&quot; xmlns:ogc="http://www.opengis.net/ogc&quot; xmlns:xlink="http://www.w3.org/1999/xlink&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:gb="http://www.geobase.ca/interop-pilot-2007&quot;&gt;
   <wfs:Query typeName="gb:PlaceName">
     <ogc:Filter>
       <ogc:Within>
         <ogc:PropertyName>gb:pointLocation</ogc:PropertyName>
         <gml:Polygon>
             <gml:LinearRing>
               <gml:coordinates>-123.4045,48.4493 -123.3972,48.4493 -123.3972,48.4417 -123.4045,48.4417 -123.4045,48.4493</gml:coordinates>
             </gml:LinearRing>
         </gml:Polygon>
     </ogc:Within>
     </ogc:Filter>
   </wfs:Query>
</wfs:GetFeature>

It returns an empty featureCollection, though I know there should be 4 things returned. I turned on statement logging on my postgresql back-end and this is the query it is running (apparently 3 times for each request...)

SELECT "cgdiId", "geographicalName", "cgndbKey", "genericTerm", "conciseTerm", "latitude", "longitude", "datum", "ntsMap", "regionName", "featureId", encode(AsBinary(force_2d("pointLocation"), 'XDR'),'base64') FROM "public"."PlaceName" WHERE "pointLocation" && GeometryFromText('POLYGON EMPTY', 4326) AND within("pointLocation", GeometryFromText('POLYGON EMPTY', 4326))

So for some reason it is turning my perfectly valid square polygon into an empty polygon.

Any ideas?

Thanks,
Chris

FYI This bug is the same as the one reported by Peter Rushforth, yesterday, I just didn't see that he had already reported it. Andrea reported it as GEOS-1462 in JIRA.

I'd be very willing to work with a developer to resolve this, ie. let you play with my box if that would help, and of course test any fixes.

Chris

Chris Hodgson wrote:

I'm running a version of geoserver 1.6 about 2 weeks old from the nightly builds. It appears to not be parsing my filter request properly.

Here is the URL of my server:

http://office.refractions.net:21880/geoserver/wfs

Here is the filter query I'm sending it:

<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs&quot; xmlns:gml="http://www.opengis.net/gml&quot; xmlns:ogc="http://www.opengis.net/ogc&quot; xmlns:xlink="http://www.w3.org/1999/xlink&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:gb="http://www.geobase.ca/interop-pilot-2007&quot;&gt;
   <wfs:Query typeName="gb:PlaceName">
     <ogc:Filter>
       <ogc:Within>
         <ogc:PropertyName>gb:pointLocation</ogc:PropertyName>
         <gml:Polygon>
             <gml:LinearRing>
               <gml:coordinates>-123.4045,48.4493 -123.3972,48.4493 -123.3972,48.4417 -123.4045,48.4417 -123.4045,48.4493</gml:coordinates>
             </gml:LinearRing>
         </gml:Polygon>
     </ogc:Within>
     </ogc:Filter>
   </wfs:Query>
</wfs:GetFeature>

It returns an empty featureCollection, though I know there should be 4 things returned. I turned on statement logging on my postgresql back-end and this is the query it is running (apparently 3 times for each request...)

SELECT "cgdiId", "geographicalName", "cgndbKey", "genericTerm", "conciseTerm", "latitude", "longitude", "datum", "ntsMap", "regionName", "featureId", encode(AsBinary(force_2d("pointLocation"), 'XDR'),'base64') FROM "public"."PlaceName" WHERE "pointLocation" && GeometryFromText('POLYGON EMPTY', 4326) AND within("pointLocation", GeometryFromText('POLYGON EMPTY', 4326))

So for some reason it is turning my perfectly valid square polygon into an empty polygon.

Any ideas?

Thanks,
Chris

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Chris,

Well I think in this case the geometry isn't quite specified exactly
right. You need to wrap the gml:LineString in a gml:exterior element
(gml:outerBoundaryIs if using gml2, although you also need to specify
version="1.0.0" on the root element). Then it should work as expected.

Although I do agree that the parser should probably handle this case as
its a pretty common mistake. I am going to update the jira issue from
bug to improvement :slight_smile:

-Justin

Chris Hodgson wrote:

FYI This bug is the same as the one reported by Peter Rushforth,
yesterday, I just didn't see that he had already reported it. Andrea
reported it as GEOS-1462 in JIRA.

I'd be very willing to work with a developer to resolve this, ie. let
you play with my box if that would help, and of course test any fixes.

Chris

Chris Hodgson wrote:

I'm running a version of geoserver 1.6 about 2 weeks old from the
nightly builds. It appears to not be parsing my filter request properly.

Here is the URL of my server:

http://office.refractions.net:21880/geoserver/wfs

Here is the filter query I'm sending it:

<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:gb="http://www.geobase.ca/interop-pilot-2007&quot;&gt;
   <wfs:Query typeName="gb:PlaceName">
     <ogc:Filter>
       <ogc:Within>
         <ogc:PropertyName>gb:pointLocation</ogc:PropertyName>
         <gml:Polygon>
             <gml:LinearRing>
               <gml:coordinates>-123.4045,48.4493 -123.3972,48.4493
-123.3972,48.4417 -123.4045,48.4417 -123.4045,48.4493</gml:coordinates>
             </gml:LinearRing>
         </gml:Polygon>
     </ogc:Within>
     </ogc:Filter>
   </wfs:Query>
</wfs:GetFeature>

It returns an empty featureCollection, though I know there should be 4
things returned. I turned on statement logging on my postgresql back-end
and this is the query it is running (apparently 3 times for each request...)

SELECT "cgdiId", "geographicalName", "cgndbKey", "genericTerm",
"conciseTerm", "latitude", "longitude", "datum", "ntsMap", "regionName",
"featureId", encode(AsBinary(force_2d("pointLocation"), 'XDR'),'base64')
FROM "public"."PlaceName" WHERE "pointLocation" &&
GeometryFromText('POLYGON EMPTY', 4326) AND within("pointLocation",
GeometryFromText('POLYGON EMPTY', 4326))

So for some reason it is turning my perfectly valid square polygon into
an empty polygon.

Any ideas?

Thanks,
Chris

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,472a459a229821849620573!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Hi Justin,

I can see how the parser might make a mistake on the query
Chris sent but it is still missing something even when the
gml:Polygon is correctly encoded, like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:gb="http://www.geobase.ca/interop-pilot-2007&quot;&gt;
  <wfs:Query typeName="gb:PlaceName">
    <ogc:Filter>
      <ogc:Within>
        <ogc:PropertyName>gb:pointLocation</ogc:PropertyName>
        <gml:Polygon>
          <gml:outerBoundaryIs>
            <gml:LinearRing>
              <gml:coordinates>-122.52761667061144,59.192760330449438
-122.4575877169498,59.252028218626123
-122.38739127851342,59.259769033048563
-122.34165270787207,59.250858470514459
-122.30406217988482,59.231752461155438
-122.28036104576334,59.205389483385254
-122.27348450636205,59.175118353599771
-122.28625611979614,59.142982020266686
-122.31812701855206,59.116571374048711
-122.36341204823977,59.100535230548942
-122.4152093947729,59.097308848708643
-122.46474385594662,59.107565861858625
-122.50364892090293,59.129444947938218
-122.52595227387475,59.159618032484481
-122.52761667061144,59.192760330449438</gml:coordinates>
            </gml:LinearRing>
          </gml:outerBoundaryIs>
        </gml:Polygon>
    </ogc:Within>
    </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

returns
<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection numberOfFeatures="0"
timeStamp="2007-11-02T02:44:52.141-07:00"
xsi:schemaLocation="http://www.geobase.ca/interop-pilot-2007
http://office.refractions.net:21880/geoserver/wfs?service=WFS&amp;versio
n=1.1.0&amp;request=DescribeFeatureType&amp;typeName=gb:PlaceName
http://www.opengis.net/wfs
http://office.refractions.net:21880/geoserver/schemas/wfs/1.1.0/wfs.xsd&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:gb="http://www.geobase.ca/interop-pilot-2007&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:ows="http://www.opengis.net/ows&quot;
xmlns:wfs="http://www.opengis.net/wfs&quot;&gt;&lt;gml:featureMembers/&gt;&lt;/wfs:Featur
eCollection>

when you can see from the attach screen cap there are a few points in
the polygon anyway.

Cheers,
Peter

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On
Behalf Of Justin Deoliveira
Sent: November 1, 2007 22:50
To: Chris Hodgson
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Filter problems

Hi Chris,

Well I think in this case the geometry isn't quite specified
exactly right. You need to wrap the gml:LineString in a
gml:exterior element (gml:outerBoundaryIs if using gml2,
although you also need to specify version="1.0.0" on the root
element). Then it should work as expected.

Although I do agree that the parser should probably handle
this case as its a pretty common mistake. I am going to
update the jira issue from bug to improvement :slight_smile:

-Justin

Chris Hodgson wrote:
> FYI This bug is the same as the one reported by Peter Rushforth,
> yesterday, I just didn't see that he had already reported
it. Andrea
> reported it as GEOS-1462 in JIRA.
>
> I'd be very willing to work with a developer to resolve
this, ie. let
> you play with my box if that would help, and of course test
any fixes.
>
> Chris
>
> Chris Hodgson wrote:
>> I'm running a version of geoserver 1.6 about 2 weeks old from the
>> nightly builds. It appears to not be parsing my filter
request properly.
>>
>> Here is the URL of my server:
>>
>> http://office.refractions.net:21880/geoserver/wfs
>>
>> Here is the filter query I'm sending it:
>>
>> <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs&quot;
>> xmlns:gml="http://www.opengis.net/gml&quot;
>> xmlns:ogc="http://www.opengis.net/ogc&quot;
>> xmlns:xlink="http://www.w3.org/1999/xlink&quot;
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
>> xmlns:gb="http://www.geobase.ca/interop-pilot-2007&quot;&gt;
>> <wfs:Query typeName="gb:PlaceName">
>> <ogc:Filter>
>> <ogc:Within>
>> <ogc:PropertyName>gb:pointLocation</ogc:PropertyName>
>> <gml:Polygon>
>> <gml:LinearRing>
>> <gml:coordinates>-123.4045,48.4493 -123.3972,48.4493
>> -123.3972,48.4417 -123.4045,48.4417
-123.4045,48.4493</gml:coordinates>
>> </gml:LinearRing>
>> </gml:Polygon>
>> </ogc:Within>
>> </ogc:Filter>
>> </wfs:Query>
>> </wfs:GetFeature>
>>
>> It returns an empty featureCollection, though I know there
should be
>> 4 things returned. I turned on statement logging on my postgresql
>> back-end and this is the query it is running (apparently 3
times for
>> each request...)
>>
>> SELECT "cgdiId", "geographicalName", "cgndbKey", "genericTerm",
>> "conciseTerm", "latitude", "longitude", "datum", "ntsMap",
>> "regionName", "featureId",
encode(AsBinary(force_2d("pointLocation"),
>> 'XDR'),'base64') FROM "public"."PlaceName" WHERE
"pointLocation" &&
>> GeometryFromText('POLYGON EMPTY', 4326) AND
within("pointLocation",
>> GeometryFromText('POLYGON EMPTY', 4326))
>>
>> So for some reason it is turning my perfectly valid square polygon
>> into an empty polygon.
>>
>> Any ideas?
>>
>> Thanks,
>> Chris
>>
>>
---------------------------------------------------------------------
>> ---- This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems? Stop.
>> Now Search log events and configuration files using AJAX
and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
>
----------------------------------------------------------------------
> --- This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX
and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
> !DSPAM:4007,472a459a229821849620573!
>

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

--------------------------------------------------------------
-----------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >>
http://get.splunk.com/ _______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Peter,

I believe the problem here is that you are making a wfs 1.1 insert
request (no version means the highest according to the wfs
specification). And wfs 1.1 -> GML3, but the polygon you are specifying
is a gml2 Polygon. You can either add version="1.0.0" to the root
element or change gml:outerBoundaryIs to gml:exterior and it should work.

Note to Andrea + others: I see this biting a lot of people. Like anyone
who did not specify a version in their old requests will now actually be
making 1.1 requests. We can make the gml3 geometry parsing more lax in
that it supports the gml2 syntax... but i dont think that solves the
problem.

Any thoughts?

-Justin

Rushforth, Peter wrote:

Hi Justin,

I can see how the parser might make a mistake on the query
Chris sent but it is still missing something even when the
gml:Polygon is correctly encoded, like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:gb="http://www.geobase.ca/interop-pilot-2007&quot;&gt;
  <wfs:Query typeName="gb:PlaceName">
    <ogc:Filter>
      <ogc:Within>
        <ogc:PropertyName>gb:pointLocation</ogc:PropertyName>
        <gml:Polygon>
          <gml:outerBoundaryIs>
            <gml:LinearRing>
              <gml:coordinates>-122.52761667061144,59.192760330449438
-122.4575877169498,59.252028218626123
-122.38739127851342,59.259769033048563
-122.34165270787207,59.250858470514459
-122.30406217988482,59.231752461155438
-122.28036104576334,59.205389483385254
-122.27348450636205,59.175118353599771
-122.28625611979614,59.142982020266686
-122.31812701855206,59.116571374048711
-122.36341204823977,59.100535230548942
-122.4152093947729,59.097308848708643
-122.46474385594662,59.107565861858625
-122.50364892090293,59.129444947938218
-122.52595227387475,59.159618032484481
-122.52761667061144,59.192760330449438</gml:coordinates>
            </gml:LinearRing>
          </gml:outerBoundaryIs>
        </gml:Polygon>
    </ogc:Within>
    </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

returns
<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection numberOfFeatures="0"
timeStamp="2007-11-02T02:44:52.141-07:00"
xsi:schemaLocation="http://www.geobase.ca/interop-pilot-2007
http://office.refractions.net:21880/geoserver/wfs?service=WFS&amp;versio
n=1.1.0&amp;request=DescribeFeatureType&amp;typeName=gb:PlaceName
http://www.opengis.net/wfs
http://office.refractions.net:21880/geoserver/schemas/wfs/1.1.0/wfs.xsd&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:gb="http://www.geobase.ca/interop-pilot-2007&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:ows="http://www.opengis.net/ows&quot;
xmlns:wfs="http://www.opengis.net/wfs&quot;&gt;&lt;gml:featureMembers/&gt;&lt;/wfs:Featur
eCollection>

when you can see from the attach screen cap there are a few points in
the polygon anyway.

Cheers,
Peter

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On
Behalf Of Justin Deoliveira
Sent: November 1, 2007 22:50
To: Chris Hodgson
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Filter problems

Hi Chris,

Well I think in this case the geometry isn't quite specified
exactly right. You need to wrap the gml:LineString in a
gml:exterior element (gml:outerBoundaryIs if using gml2,
although you also need to specify version="1.0.0" on the root
element). Then it should work as expected.

Although I do agree that the parser should probably handle
this case as its a pretty common mistake. I am going to
update the jira issue from bug to improvement :slight_smile:

-Justin

Chris Hodgson wrote:

FYI This bug is the same as the one reported by Peter Rushforth,
yesterday, I just didn't see that he had already reported

it. Andrea

reported it as GEOS-1462 in JIRA.

I'd be very willing to work with a developer to resolve

this, ie. let

you play with my box if that would help, and of course test

any fixes.

Chris

Chris Hodgson wrote:

I'm running a version of geoserver 1.6 about 2 weeks old from the
nightly builds. It appears to not be parsing my filter

request properly.

Here is the URL of my server:

http://office.refractions.net:21880/geoserver/wfs

Here is the filter query I'm sending it:

<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:gb="http://www.geobase.ca/interop-pilot-2007&quot;&gt;
   <wfs:Query typeName="gb:PlaceName">
     <ogc:Filter>
       <ogc:Within>
         <ogc:PropertyName>gb:pointLocation</ogc:PropertyName>
         <gml:Polygon>
             <gml:LinearRing>
               <gml:coordinates>-123.4045,48.4493 -123.3972,48.4493
-123.3972,48.4417 -123.4045,48.4417

-123.4045,48.4493</gml:coordinates>

             </gml:LinearRing>
         </gml:Polygon>
     </ogc:Within>
     </ogc:Filter>
   </wfs:Query>
</wfs:GetFeature>

It returns an empty featureCollection, though I know there

should be

4 things returned. I turned on statement logging on my postgresql
back-end and this is the query it is running (apparently 3

times for

each request...)

SELECT "cgdiId", "geographicalName", "cgndbKey", "genericTerm",
"conciseTerm", "latitude", "longitude", "datum", "ntsMap",
"regionName", "featureId",

encode(AsBinary(force_2d("pointLocation"),

'XDR'),'base64') FROM "public"."PlaceName" WHERE

"pointLocation" &&

GeometryFromText('POLYGON EMPTY', 4326) AND

within("pointLocation",

GeometryFromText('POLYGON EMPTY', 4326))

So for some reason it is turning my perfectly valid square polygon
into an empty polygon.

Any ideas?

Thanks,
Chris

---------------------------------------------------------------------

---- This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX

and a browser.

Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

----------------------------------------------------------------------

--- This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX

and a browser.

Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

--------------------------------------------------------------
-----------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >>
http://get.splunk.com/ _______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,472b6a6f17355219720167!

------------------------------------------------------------------------

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

!DSPAM:4007,472b6a6f17355219720167!

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,472b6a6f17355219720167!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Justin Deoliveira ha scritto:

Hi Peter,

I believe the problem here is that you are making a wfs 1.1 insert
request (no version means the highest according to the wfs
specification). And wfs 1.1 -> GML3, but the polygon you are specifying
is a gml2 Polygon. You can either add version="1.0.0" to the root
element or change gml:outerBoundaryIs to gml:exterior and it should work.

Note to Andrea + others: I see this biting a lot of people. Like anyone
who did not specify a version in their old requests will now actually be
making 1.1 requests. We can make the gml3 geometry parsing more lax in
that it supports the gml2 syntax... but i dont think that solves the
problem.

Any thoughts?

I'd say, barf like a crazy dog when the request does not comply to
the schema? This one is the unfortunate side effect of having been
lax on the wfs 1.0 requests. Afaik the schema say the version is
always required.
My 2 cents... I mean, I know this will break some existing applications,
but in fact only those that relied on non standard behaviour.
If we try to understand old queries, do you have an idea how
convoluted the code will become when wfs reaches version 3? :slight_smile:

Cheers
Andrea

Hi,

OK I put that @version="1.0.0" attribute on and I get
this in response:

<?xml version="1.0" ?>
<ServiceExceptionReport
   version="1.2.0"
   xmlns="http://www.opengis.net/ogc&quot;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
   xsi:schemaLocation="http://www.opengis.net/ogc
http://office.refractions.net:21880/geoserver/schemas/wfs/1.0.0/OGC-exce
ption.xsd">
   <ServiceException>
      java.lang.RuntimeException: Parsing failed for coordinates:
java.lang.IllegalArgumentException: dimension must be &lt;= 3
java.lang.RuntimeException: Parsing failed for coordinates:
java.lang.IllegalArgumentException: dimension must be &lt;= 3
java.lang.RuntimeException: Parsing failed for coordinates:
java.lang.IllegalArgumentException: dimension must be &lt;= 3
</ServiceException></ServiceExceptionReport>

Thanks
Peter

-----Original Message-----
From: Andrea Aime [mailto:aaime@anonymised.com]
Sent: November 2, 2007 16:10
To: Justin Deoliveira
Cc: Rushforth, Peter; geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Filter problems

Justin Deoliveira ha scritto:
> Hi Peter,
>
> I believe the problem here is that you are making a wfs 1.1 insert
> request (no version means the highest according to the wfs
> specification). And wfs 1.1 -> GML3, but the polygon you are
> specifying is a gml2 Polygon. You can either add version="1.0.0" to
> the root element or change gml:outerBoundaryIs to
gml:exterior and it should work.
>
> Note to Andrea + others: I see this biting a lot of people. Like
> anyone who did not specify a version in their old requests will now
> actually be making 1.1 requests. We can make the gml3
geometry parsing
> more lax in that it supports the gml2 syntax... but i dont
think that
> solves the problem.
>
> Any thoughts?

I'd say, barf like a crazy dog when the request does not
comply to the schema? This one is the unfortunate side effect
of having been lax on the wfs 1.0 requests. Afaik the schema
say the version is always required.
My 2 cents... I mean, I know this will break some existing
applications, but in fact only those that relied on non
standard behaviour.
If we try to understand old queries, do you have an idea how
convoluted the code will become when wfs reaches version 3? :slight_smile:

Cheers
Andrea

Peter, I'm not sure anymore if there is actually a bug here. Once I form my query properly, I am able to do the following query successfully:

<wfs:GetFeature version="1.0.0"
xmlns:wfs="http://www.opengis.net/wfs&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:gb="http://www.geobase.ca/interop-pilot-2007&quot;&gt;
    <wfs:Query typeName="gb:PlaceName">
      <ogc:Filter>
        <ogc:Within>
          <ogc:PropertyName>gb:pointLocation</ogc:PropertyName>
          <gml:Polygon>
           <gml:outerBoundaryIs>
              <gml:LinearRing>
                <gml:coordinates>-123.4045,48.4493 -123.3972,48.4493
-123.3972,48.4417 -123.4045,48.4417 -123.4045,48.4493</gml:coordinates>
              </gml:LinearRing>
           </gml:outerBoundaryIs>
          </gml:Polygon>
      </ogc:Within>
      </ogc:Filter>
    </wfs:Query>
</wfs:GetFeature>

The following 1.1 version works as well, with or without the version attribute:

<wfs:GetFeature version="1.1.0"
xmlns:wfs="http://www.opengis.net/wfs&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:gb="http://www.geobase.ca/interop-pilot-2007&quot;&gt;
    <wfs:Query typeName="gb:PlaceName">
      <ogc:Filter>
        <ogc:Within>
          <ogc:PropertyName>gb:pointLocation</ogc:PropertyName>
          <gml:Polygon>
           <gml:exterior>
              <gml:LinearRing>
                <gml:coordinates>-123.4045,48.4493 -123.3972,48.4493
-123.3972,48.4417 -123.4045,48.4417 -123.4045,48.4493</gml:coordinates>
              </gml:LinearRing>
           </gml:exterior>
          </gml:Polygon>
      </ogc:Within>
      </ogc:Filter>
    </wfs:Query>
</wfs:GetFeature>

I'm not sure how you got the error you reported below, perhaps You should share the query you used as I suspect there may be a formatting issue.

Chris

Rushforth, Peter wrote:

Hi,

OK I put that @version="1.0.0" attribute on and I get
this in response:

<?xml version="1.0" ?>
<ServiceExceptionReport
   version="1.2.0"
   xmlns="http://www.opengis.net/ogc&quot;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
   xsi:schemaLocation="http://www.opengis.net/ogc
http://office.refractions.net:21880/geoserver/schemas/wfs/1.0.0/OGC-exce
ption.xsd">
   <ServiceException>
      java.lang.RuntimeException: Parsing failed for coordinates:
java.lang.IllegalArgumentException: dimension must be &lt;= 3
java.lang.RuntimeException: Parsing failed for coordinates:
java.lang.IllegalArgumentException: dimension must be &lt;= 3
java.lang.RuntimeException: Parsing failed for coordinates:
java.lang.IllegalArgumentException: dimension must be &lt;= 3
</ServiceException></ServiceExceptionReport>

Thanks
Peter

-----Original Message-----
From: Andrea Aime [mailto:aaime@anonymised.com] Sent: November 2, 2007 16:10
To: Justin Deoliveira
Cc: Rushforth, Peter; geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Filter problems

Justin Deoliveira ha scritto:

Hi Peter,

I believe the problem here is that you are making a wfs 1.1 insert request (no version means the highest according to the wfs specification). And wfs 1.1 -> GML3, but the polygon you are specifying is a gml2 Polygon. You can either add version="1.0.0" to the root element or change gml:outerBoundaryIs to

gml:exterior and it should work.

Note to Andrea + others: I see this biting a lot of people. Like anyone who did not specify a version in their old requests will now actually be making 1.1 requests. We can make the gml3

geometry parsing

more lax in that it supports the gml2 syntax... but i dont

think that

solves the problem.

Any thoughts?

I'd say, barf like a crazy dog when the request does not comply to the schema? This one is the unfortunate side effect of having been lax on the wfs 1.0 requests. Afaik the schema say the version is always required.
My 2 cents... I mean, I know this will break some existing applications, but in fact only those that relied on non standard behaviour.
If we try to understand old queries, do you have an idea how convoluted the code will become when wfs reaches version 3? :slight_smile:

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users