Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
PostGIS: use ST_Intersects instead of && for bounding box (fixes #6181,
fixes #6230)
- Loading branch information
Showing
5 changed files
with
160 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Content-Type: text/xml; subtype="gml/3.2.1"; charset=UTF-8 | ||
|
||
<?xml version='1.0' encoding="UTF-8" ?> | ||
<wfs:FeatureCollection | ||
xmlns:ms="http://mapserver.gis.umn.edu/mapserver" | ||
xmlns:gml="http://www.opengis.net/gml/3.2" | ||
xmlns:wfs="http://www.opengis.net/wfs/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver http://localhost/path/to/wfs_simple?SERVICE=WFS&VERSION=2.0.0&REQUEST=DescribeFeatureType&TYPENAME=test_6181&OUTPUTFORMAT=application%2Fgml%2Bxml%3B%20version%3D3.2 http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd" | ||
timeStamp="" numberMatched="unknown" numberReturned="1" | ||
next="http://localhost/path/to/wfs_simple?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=test_6181&BBOX=0.75%2C0.75%2C9%2C9&COUNT=1&STARTINDEX=1"> | ||
<wfs:boundedBy> | ||
<gml:Envelope srsName="urn:ogc:def:crs:EPSG::27700"> | ||
<gml:lowerCorner>0.00000 0.00000</gml:lowerCorner> | ||
<gml:upperCorner>10.00000 10.00000</gml:upperCorner> | ||
</gml:Envelope> | ||
</wfs:boundedBy> | ||
<wfs:member> | ||
<ms:test_6181 gml:id="test_6181.2"> | ||
<gml:boundedBy> | ||
<gml:Envelope srsName="urn:ogc:def:crs:EPSG::27700"> | ||
<gml:lowerCorner>0.00000 0.00000</gml:lowerCorner> | ||
<gml:upperCorner>10.00000 10.00000</gml:upperCorner> | ||
</gml:Envelope> | ||
</gml:boundedBy> | ||
<ms:msGeometry> | ||
<gml:LineString gml:id="test_6181.2.1" srsName="urn:ogc:def:crs:EPSG::27700"> | ||
<gml:posList srsDimension="2">0.00000 0.00000 10.00000 10.00000 </gml:posList> | ||
</gml:LineString> | ||
</ms:msGeometry> | ||
<ms:id>2</ms:id> | ||
</ms:test_6181> | ||
</wfs:member> | ||
</wfs:FeatureCollection> | ||
|
35 changes: 35 additions & 0 deletions
35
msautotest/wxs/expected/wfs_postgis_issue_6181_startindex_1.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Content-Type: text/xml; subtype="gml/3.2.1"; charset=UTF-8 | ||
|
||
<?xml version='1.0' encoding="UTF-8" ?> | ||
<wfs:FeatureCollection | ||
xmlns:ms="http://mapserver.gis.umn.edu/mapserver" | ||
xmlns:gml="http://www.opengis.net/gml/3.2" | ||
xmlns:wfs="http://www.opengis.net/wfs/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver http://localhost/path/to/wfs_simple?SERVICE=WFS&VERSION=2.0.0&REQUEST=DescribeFeatureType&TYPENAME=test_6181&OUTPUTFORMAT=application%2Fgml%2Bxml%3B%20version%3D3.2 http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd" | ||
timeStamp="" numberMatched="unknown" numberReturned="1" | ||
previous="http://localhost/path/to/wfs_simple?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=test_6181&BBOX=0.75%2C0.75%2C9%2C9&COUNT=1"> | ||
<wfs:boundedBy> | ||
<gml:Envelope srsName="urn:ogc:def:crs:EPSG::27700"> | ||
<gml:lowerCorner>5.00000 2.00000</gml:lowerCorner> | ||
<gml:upperCorner>5.00000 8.00000</gml:upperCorner> | ||
</gml:Envelope> | ||
</wfs:boundedBy> | ||
<wfs:member> | ||
<ms:test_6181 gml:id="test_6181.3"> | ||
<gml:boundedBy> | ||
<gml:Envelope srsName="urn:ogc:def:crs:EPSG::27700"> | ||
<gml:lowerCorner>5.00000 2.00000</gml:lowerCorner> | ||
<gml:upperCorner>5.00000 8.00000</gml:upperCorner> | ||
</gml:Envelope> | ||
</gml:boundedBy> | ||
<ms:msGeometry> | ||
<gml:LineString gml:id="test_6181.3.1" srsName="urn:ogc:def:crs:EPSG::27700"> | ||
<gml:posList srsDimension="2">5.00000 2.00000 5.00000 8.00000 </gml:posList> | ||
</gml:LineString> | ||
</ms:msGeometry> | ||
<ms:id>3</ms:id> | ||
</ms:test_6181> | ||
</wfs:member> | ||
</wfs:FeatureCollection> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# | ||
# Test WFS paging with PostGIS | ||
# | ||
# REQUIRES: SUPPORTS=WFS INPUT=POSTGIS | ||
# | ||
# RUN_PARMS: wfs_postgis_issue_6181.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=test_6181&BBOX=0.75,0.75,9,9&COUNT=1" > [RESULT_DEVERSION] | ||
# RUN_PARMS: wfs_postgis_issue_6181_startindex_1.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=test_6181&BBOX=0.75,0.75,9,9&COUNT=1&STARTINDEX=1" > [RESULT_DEVERSION] | ||
|
||
MAP | ||
|
||
NAME WFS_POSTGIS_PAGING | ||
STATUS ON | ||
SIZE 400 300 | ||
EXTENT 6 30 21 50 | ||
UNITS METERS | ||
IMAGECOLOR 255 255 255 | ||
|
||
# | ||
# Start of web interface definition | ||
# | ||
|
||
WEB | ||
|
||
IMAGEPATH "tmp/" | ||
IMAGEURL "/ms_tmp/" | ||
|
||
METADATA | ||
"wfs_title" "Test simple wfs" | ||
"wfs_onlineresource" "http://localhost/path/to/wfs_simple?" | ||
"wfs_srs" "EPSG:27700" | ||
"wfs_enable_request" "*" | ||
END | ||
END | ||
|
||
PROJECTION | ||
"init=epsg:27700" | ||
END | ||
|
||
# | ||
# Start of layer definitions | ||
# | ||
|
||
LAYER | ||
NAME test_6181 | ||
INCLUDE "postgis.include" | ||
DATA "the_geom from (select * from test_wfs_paging order by id) as foo using srid=27700 using unique id" | ||
METADATA | ||
"wfs_title" "test_6181" | ||
"wfs_description" "test_6181" | ||
"gml_include_items" "all" | ||
"wfs_featureid" "id" | ||
END | ||
TYPE LINE | ||
STATUS ON | ||
PROJECTION | ||
"init=epsg:27700" | ||
END | ||
|
||
END # Layer | ||
|
||
|
||
END # Map File |