Hi,
I'm calling a geoserver 2.2 with a the following filter over wfs:
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:And>
<ogc:DWithin>
<ogc:PropertyName>Geometri</ogc:PropertyName>
<gml:Point xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:900913">
<gml:pos>2006635.412538 8263825.7559183</gml:pos>
</gml:Point>
<ogc:Distance units="m">50</ogc:Distance>
</ogc:DWithin>
<ogc:PropertyIsLike wildCard="*" singleChar="." escapeChar="!">
<ogc:PropertyName>Innehavare</ogc:PropertyName>
<ogc:Literal>ic*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:And>
</ogc:Filter>
Within 50m are 3 features, two of them with Innehavare = ica and one with
another name.
* When I execute the query I get 0 features in the result.
* If I set the Like filters literal to * all three features are returned.
I checked the log and saw that this is the sql that is executed:
SELECT * FROM (SELECT
"Id","Innehavare","NuvarandeTillstaand","Publicerad","Adress","Postnummer","Ort","Vaaningsplan","Placering","Kommun","Laen","OevrigInfo","Geometri".STAsBinary()
as "Geometri", ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) AS
_GT_ROW_NUMBER FROM "HjaertstartarPositionsVy" WHERE
("Geometri".Filter(geometry::STGeomFromText('POINT (2006637.8011951
8263826.9502469)', 900913)) = 1 AND
"Geometri".STDistance(geometry::STGeomFromText('POINT (2006637.8011951
8263826.9502469)', 900913))<50.0 AND "Innehavare" LIKE 'ica%' )) AS
_GT_PAGING_SUBQUERY WHERE _GT_ROW_NUMBER <= 1000000
and after a while I figured out that I could get it to work correctly if I
removed
"Geometri".Filter(geometry::STGeomFromText('POINT (2006637.8011951
8263826.9502469)', 900913)) = 1
so that the query is:
SELECT * FROM (SELECT
"Id","Innehavare","NuvarandeTillstaand","Publicerad","Adress","Postnummer","Ort","Vaaningsplan","Placering","Kommun","Laen","OevrigInfo","Geometri".STAsBinary()
as "Geometri", ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) AS
_GT_ROW_NUMBER FROM "HjaertstartarPositionsVy" WHERE
("Geometri".STDistance(geometry::STGeomFromText('POINT (2006637.8011951
8263826.9502469)', 900913))<50.0 AND "Innehavare" LIKE 'ica%' )) AS
_GT_PAGING_SUBQUERY WHERE _GT_ROW_NUMBER <= 1000000
So, basicly why does the DWitin create a Geometry.Filter()? And how can I stop
it from doing so?
Thank you for your time.
Best Regards
Lukas
[http://www.decerno.se/images/decerno_logo_300.png]<http://www.decerno.se/>
Lukas Bergliden
Civilingenjör
Mobil 070 644 96 61 Electrum 234, 164 40 Kista
Direkt 08 630 75 09 Kistagången 16, 7 tr
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users