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"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gb="http://www.geobase.ca/interop-pilot-2007">
<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&versio
n=1.1.0&request=DescribeFeatureType&typeName=gb:PlaceName
http://www.opengis.net/wfs
http://office.refractions.net:21880/geoserver/schemas/wfs/1.1.0/wfs.xsd"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
xmlns:gb="http://www.geobase.ca/interop-pilot-2007"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:ows="http://www.opengis.net/ows"
xmlns:wfs="http://www.opengis.net/wfs"><gml:featureMembers/></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 
-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"
>> xmlns:gml="http://www.opengis.net/gml"
>> xmlns:ogc="http://www.opengis.net/ogc"
>> xmlns:xlink="http://www.w3.org/1999/xlink"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:gb="http://www.geobase.ca/interop-pilot-2007">
>> <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