[Geoserver-devel] [JIRA] (GEOS-7044) wfs GetFeature returns not current features based on bounding box

alexandr bobrov created an issue

GeoServer / ImprovementGEOS-7044

wfs GetFeature returns not current features based on bounding box

Issue Type:

ImprovementImprovement

Affects Versions:

2.7.1

Assignee:

Unassigned

Components:

PostGIS, WFS

Created:

22/May/15 9:25 AM

Environment:

postgresql 9.4
postgis 2.1.7
windows 8

Priority:

MediumMedium

Reporter:

alexandr bobrov

When my layer include big curved object like long-way road, river or lake, it is often returned even if its geometry do not cross bounding box area.
I tried to trace postgres query and saw that query returned objects that its bounding box crosses with requesting bounding box.

SELECT "id",encode(ST_AsEWKB("geometry"),'base64') as "geometry" FROM "public"."spatial" WHERE  "geometry" && ST_GeomFromText('POLYGON ((30.31 59.93, 30.31 59.93, 30.31 59.93, 30.31 59.93, 30.31 59.93))', 4326) LIMIT 1000000

I think that more correctly use PostGis function ST_Intersects()

SELECT "id",encode(ST_AsEWKB("geometry"),'base64') as "geometry" FROM "public"."spatial" WHERE  ST_Intersects( "geometry", ST_GeomFromText('POLYGON ((30.31 59.93, 30.31 59.93, 30.31 59.93, 30.31 59.93, 30.31 59.93))', 4326) ) LIMIT 1000000

When I use ms sql spatial, it call Filter() function, that do not returned big curved objects
SELECT top 1000000 “id”,“geometry” as “geometry” FROM “dbo”.“spatial” WHERE “geometry”.Filter(geometry::STGeomFromText(‘POLYGON ((30.31 59.93, 30.31 59.93, 30.31 59.93, 30.31 59.93, 30.31 59.93))’, 4326) ) = 1


Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.5-OD-03-002#65000-sha1:b8f65f8)

Atlassian logo