Postgis filter encoder - disjoint
---------------------------------
Key: GEOS-320
URL: http://jira.codehaus.org/browse/GEOS-320
Project: GeoServer
Type: Bug
Components: PostGIS
Versions: 1.3.0-beta
Reporter: dblasby
Assigned to: Chris Holmes
Fix For: 1.3.0
From the cite tests:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:cgf="http://www.opengis.net/cite/geometry" outputFormat="GML2" version="1.0.0" service="WFS">
<wfs:Query typeName="cgf:Points">
<ogc:Filter>
<ogc:Disjoint>
<ogc:PropertyName>gml:pointProperty</ogc:PropertyName>
<gml:Point xmlns="http://www.opengis.net/cite/spatialTestSuite" srsName="EPSG:32615">
<gml:coordinates>500150,500180</gml:coordinates>
</gml:Point>
</ogc:Disjoint>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
gets converted into this SQL:
SELECT oid, "id", AsText(force_2d("pointProperty"))
FROM "Points"
WHERE
"pointProperty" && GeometryFromText('POINT (500150 500180)', 32615)
AND NOT (intersects("pointProperty", GeometryFromText('POINT (500150 500180)', 32615)));
This is incorrect - the && clause is contradictory.
A better way of doing this is to either not include the && clause or put a NOT around it:
SELECT oid, "id", AsText(force_2d("pointProperty"))
FROM "Points"
WHERE
not( "pointProperty" && GeometryFromText('POINT (500150 500180)', 32615) )
AND NOT (intersects("pointProperty", GeometryFromText('POINT (500150 500180)', 32615)));
This is probably a geotools bug - i will put this bug there too.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira