http://docs.opengeospatial.org/DRAFTS/17-069r1.html#_parameter_bbox specify that bbox queries should use intersect rather than contains

This commit is contained in:
Andrew Yan
2019-11-01 09:06:23 -05:00
parent fe4c02a388
commit 5df936d65e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -199,7 +199,7 @@ class PostgreSQLProvider(BaseProvider):
with DatabaseConnection(self.conn_dic, self.table) as db:
cursor = db.conn.cursor(cursor_factory=RealDictCursor)
sql_query = SQL("DECLARE \"geo_cursor\" CURSOR FOR \
SELECT {},ST_AsGeoJSON({}) FROM {} WHERE {} @ \
SELECT {},ST_AsGeoJSON({}) FROM {} WHERE {} && \
ST_MakeEnvelope({}, {}, {}, {})").\
format(db.columns,
Identifier(self.geom),
+1 -1
View File
@@ -71,7 +71,7 @@ def test_query_bbox(config):
boxed_feature_collection = psp.query(
bbox=[29.3373, -3.4099, 29.3761, -3.3924]
)
assert len(boxed_feature_collection['features']) == 3
assert len(boxed_feature_collection['features']) == 5
def test_get(config):