mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Tests for bugfix GH31177
This commit is contained in:
parent
eb42b3753a
commit
b76a04323c
@ -719,6 +719,22 @@ class TestQgsServerWMSGetFeatureInfo(TestQgsServerWMSTestBase):
|
||||
'test_project_wms_grouped_nested_layers.qgs',
|
||||
normalizeJson=True)
|
||||
|
||||
@unittest.skipIf(os.environ.get('TRAVIS', '') == 'true', "This test cannot run in TRAVIS because it relies on cascading external services")
|
||||
def testGetFeatureInfoCascadingLayers(self):
|
||||
"""Test that we can get feature info on cascading WMS layers"""
|
||||
|
||||
project_name = 'bug_gh31177_gfi_cascading_wms.qgs'
|
||||
self.wms_request_compare('GetFeatureInfo',
|
||||
'&BBOX=852729.31,5631138.51,853012.18,5631346.17' +
|
||||
'&CRS=EPSG:3857' +
|
||||
'&WIDTH=850&HEIGHT=624' +
|
||||
'&QUERY_LAYERS=Alberate' +
|
||||
'&INFO_FORMAT=application/vnd.ogc.gml' +
|
||||
'&I=509&J=289' +
|
||||
'&FEATURE_COUNT=10',
|
||||
'wms_getfeatureinfo_cascading_issue31177',
|
||||
project_name)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
288
tests/testdata/qgis_server/bug_gh31177_gfi_cascading_wms.qgs
vendored
Normal file
288
tests/testdata/qgis_server/bug_gh31177_gfi_cascading_wms.qgs
vendored
Normal file
@ -0,0 +1,288 @@
|
||||
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
|
||||
<qgis version="3.9.0-Master" projectname="">
|
||||
<homePath path=""/>
|
||||
<title></title>
|
||||
<autotransaction active="0"/>
|
||||
<evaluateDefaultValues active="0"/>
|
||||
<trust active="0"/>
|
||||
<projectCrs>
|
||||
<spatialrefsys>
|
||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
||||
<srsid>3857</srsid>
|
||||
<srid>3857</srid>
|
||||
<authid>EPSG:3857</authid>
|
||||
<description>WGS 84 / Pseudo-Mercator</description>
|
||||
<projectionacronym>merc</projectionacronym>
|
||||
<ellipsoidacronym>WGS84</ellipsoidacronym>
|
||||
<geographicflag>false</geographicflag>
|
||||
</spatialrefsys>
|
||||
</projectCrs>
|
||||
<layer-tree-group>
|
||||
<customproperties/>
|
||||
<layer-tree-layer source="crs=EPSG:3857&dpiMode=7&format=image/png&layers=AlberatePt&styles&url=http://geomap.reteunitaria.piemonte.it/ws/siccms/coto-01/wmsg01/wms_sicc11_alberate" providerKey="wms" name="Alberate" checked="Qt::Checked" expanded="1" id="Alberate_66c1c9df_6c49_4094_b01d_4f9418bdce7c">
|
||||
<customproperties/>
|
||||
</layer-tree-layer>
|
||||
<custom-order enabled="0">
|
||||
<item>Alberate_66c1c9df_6c49_4094_b01d_4f9418bdce7c</item>
|
||||
</custom-order>
|
||||
</layer-tree-group>
|
||||
<snapping-settings type="1" tolerance="12" unit="1" mode="2" intersection-snapping="0" enabled="0">
|
||||
<individual-layer-settings/>
|
||||
</snapping-settings>
|
||||
<relations/>
|
||||
<mapcanvas name="theMapCanvas" annotationsVisible="1">
|
||||
<units>meters</units>
|
||||
<extent>
|
||||
<xmin>852747.29199123778380454</xmin>
|
||||
<ymin>5631138.51772649865597486</ymin>
|
||||
<xmax>852994.20340507663786411</xmax>
|
||||
<ymax>5631346.17689236905425787</ymax>
|
||||
</extent>
|
||||
<rotation>0</rotation>
|
||||
<destinationsrs>
|
||||
<spatialrefsys>
|
||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
||||
<srsid>3857</srsid>
|
||||
<srid>3857</srid>
|
||||
<authid>EPSG:3857</authid>
|
||||
<description>WGS 84 / Pseudo-Mercator</description>
|
||||
<projectionacronym>merc</projectionacronym>
|
||||
<ellipsoidacronym>WGS84</ellipsoidacronym>
|
||||
<geographicflag>false</geographicflag>
|
||||
</spatialrefsys>
|
||||
</destinationsrs>
|
||||
<rendermaptile>0</rendermaptile>
|
||||
<expressionContextScope/>
|
||||
</mapcanvas>
|
||||
<projectModels/>
|
||||
<legend updateDrawingOrder="true">
|
||||
<legendlayer showFeatureCount="0" drawingOrder="-1" checked="Qt::Checked" name="Alberate" open="true">
|
||||
<filegroup hidden="false" open="true">
|
||||
<legendlayerfile layerid="Alberate_66c1c9df_6c49_4094_b01d_4f9418bdce7c" isInOverview="0" visible="1"/>
|
||||
</filegroup>
|
||||
</legendlayer>
|
||||
</legend>
|
||||
<mapViewDocks/>
|
||||
<mapcanvas name="mAreaCanvas" annotationsVisible="1">
|
||||
<units>meters</units>
|
||||
<extent>
|
||||
<xmin>852747.29199123778380454</xmin>
|
||||
<ymin>5631138.51772649865597486</ymin>
|
||||
<xmax>852994.20340507663786411</xmax>
|
||||
<ymax>5631346.17689236905425787</ymax>
|
||||
</extent>
|
||||
<rotation>0</rotation>
|
||||
<destinationsrs>
|
||||
<spatialrefsys>
|
||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
||||
<srsid>3857</srsid>
|
||||
<srid>3857</srid>
|
||||
<authid>EPSG:3857</authid>
|
||||
<description>WGS 84 / Pseudo-Mercator</description>
|
||||
<projectionacronym>merc</projectionacronym>
|
||||
<ellipsoidacronym>WGS84</ellipsoidacronym>
|
||||
<geographicflag>false</geographicflag>
|
||||
</spatialrefsys>
|
||||
</destinationsrs>
|
||||
<rendermaptile>0</rendermaptile>
|
||||
<expressionContextScope/>
|
||||
</mapcanvas>
|
||||
<mapcanvas name="mAreaCanvas" annotationsVisible="1">
|
||||
<units>meters</units>
|
||||
<extent>
|
||||
<xmin>852747.29199123778380454</xmin>
|
||||
<ymin>5631138.51772649865597486</ymin>
|
||||
<xmax>852994.20340507663786411</xmax>
|
||||
<ymax>5631346.17689236905425787</ymax>
|
||||
</extent>
|
||||
<rotation>0</rotation>
|
||||
<destinationsrs>
|
||||
<spatialrefsys>
|
||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
||||
<srsid>3857</srsid>
|
||||
<srid>3857</srid>
|
||||
<authid>EPSG:3857</authid>
|
||||
<description>WGS 84 / Pseudo-Mercator</description>
|
||||
<projectionacronym>merc</projectionacronym>
|
||||
<ellipsoidacronym>WGS84</ellipsoidacronym>
|
||||
<geographicflag>false</geographicflag>
|
||||
</spatialrefsys>
|
||||
</destinationsrs>
|
||||
<rendermaptile>0</rendermaptile>
|
||||
<expressionContextScope/>
|
||||
</mapcanvas>
|
||||
<mapcanvas name="mAreaCanvas" annotationsVisible="1">
|
||||
<units>meters</units>
|
||||
<extent>
|
||||
<xmin>852747.29199123778380454</xmin>
|
||||
<ymin>5631138.51772649865597486</ymin>
|
||||
<xmax>852994.20340507663786411</xmax>
|
||||
<ymax>5631346.17689236905425787</ymax>
|
||||
</extent>
|
||||
<rotation>0</rotation>
|
||||
<destinationsrs>
|
||||
<spatialrefsys>
|
||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
||||
<srsid>3857</srsid>
|
||||
<srid>3857</srid>
|
||||
<authid>EPSG:3857</authid>
|
||||
<description>WGS 84 / Pseudo-Mercator</description>
|
||||
<projectionacronym>merc</projectionacronym>
|
||||
<ellipsoidacronym>WGS84</ellipsoidacronym>
|
||||
<geographicflag>false</geographicflag>
|
||||
</spatialrefsys>
|
||||
</destinationsrs>
|
||||
<rendermaptile>0</rendermaptile>
|
||||
<expressionContextScope/>
|
||||
</mapcanvas>
|
||||
<projectlayers>
|
||||
<maplayer type="raster" styleCategories="AllStyleCategories" autoRefreshEnabled="0" hasScaleBasedVisibilityFlag="0" refreshOnNotifyEnabled="0" autoRefreshTime="0" refreshOnNotifyMessage="" minScale="1e+08" maxScale="0">
|
||||
<extent>
|
||||
<xmin>837573.41470312990713865</xmin>
|
||||
<ymin>5620073.25074507296085358</ymin>
|
||||
<xmax>867673.0918187202187255</xmax>
|
||||
<ymax>5645387.89191795606166124</ymax>
|
||||
</extent>
|
||||
<id>Alberate_66c1c9df_6c49_4094_b01d_4f9418bdce7c</id>
|
||||
<datasource>crs=EPSG:3857&dpiMode=7&format=image/png&layers=AlberatePt&styles&url=http://geomap.reteunitaria.piemonte.it/ws/siccms/coto-01/wmsg01/wms_sicc11_alberate</datasource>
|
||||
<keywordList>
|
||||
<value></value>
|
||||
</keywordList>
|
||||
<layername>Alberate</layername>
|
||||
<srs>
|
||||
<spatialrefsys>
|
||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
||||
<srsid>3857</srsid>
|
||||
<srid>3857</srid>
|
||||
<authid>EPSG:3857</authid>
|
||||
<description>WGS 84 / Pseudo-Mercator</description>
|
||||
<projectionacronym>merc</projectionacronym>
|
||||
<ellipsoidacronym>WGS84</ellipsoidacronym>
|
||||
<geographicflag>false</geographicflag>
|
||||
</spatialrefsys>
|
||||
</srs>
|
||||
<resourceMetadata>
|
||||
<identifier></identifier>
|
||||
<parentidentifier></parentidentifier>
|
||||
<language></language>
|
||||
<type></type>
|
||||
<title></title>
|
||||
<abstract></abstract>
|
||||
<links/>
|
||||
<fees></fees>
|
||||
<encoding></encoding>
|
||||
<crs>
|
||||
<spatialrefsys>
|
||||
<proj4></proj4>
|
||||
<srsid>0</srsid>
|
||||
<srid>0</srid>
|
||||
<authid></authid>
|
||||
<description></description>
|
||||
<projectionacronym></projectionacronym>
|
||||
<ellipsoidacronym></ellipsoidacronym>
|
||||
<geographicflag>false</geographicflag>
|
||||
</spatialrefsys>
|
||||
</crs>
|
||||
<extent/>
|
||||
</resourceMetadata>
|
||||
<provider>wms</provider>
|
||||
<noData>
|
||||
<noDataList useSrcNoData="0" bandNo="1"/>
|
||||
</noData>
|
||||
<map-layer-style-manager current="default">
|
||||
<map-layer-style name="default"/>
|
||||
</map-layer-style-manager>
|
||||
<flags>
|
||||
<Identifiable>1</Identifiable>
|
||||
<Removable>1</Removable>
|
||||
<Searchable>1</Searchable>
|
||||
</flags>
|
||||
<customproperties>
|
||||
<property key="identify/format" value="Feature"/>
|
||||
</customproperties>
|
||||
<pipe>
|
||||
<rasterrenderer type="singlebandcolordata" opacity="1" alphaBand="-1" band="1">
|
||||
<rasterTransparency/>
|
||||
<minMaxOrigin>
|
||||
<limits>None</limits>
|
||||
<extent>WholeRaster</extent>
|
||||
<statAccuracy>Estimated</statAccuracy>
|
||||
<cumulativeCutLower>0.02</cumulativeCutLower>
|
||||
<cumulativeCutUpper>0.98</cumulativeCutUpper>
|
||||
<stdDevFactor>2</stdDevFactor>
|
||||
</minMaxOrigin>
|
||||
</rasterrenderer>
|
||||
<brightnesscontrast contrast="0" brightness="0"/>
|
||||
<huesaturation colorizeRed="255" colorizeOn="0" colorizeBlue="128" colorizeStrength="100" colorizeGreen="128" saturation="0" grayscaleMode="0"/>
|
||||
<rasterresampler maxOversampling="2"/>
|
||||
</pipe>
|
||||
<blendMode>0</blendMode>
|
||||
</maplayer>
|
||||
</projectlayers>
|
||||
<layerorder>
|
||||
<layer id="Alberate_66c1c9df_6c49_4094_b01d_4f9418bdce7c"/>
|
||||
</layerorder>
|
||||
<properties>
|
||||
<Gui>
|
||||
<CanvasColorBluePart type="int">255</CanvasColorBluePart>
|
||||
<CanvasColorGreenPart type="int">255</CanvasColorGreenPart>
|
||||
<CanvasColorRedPart type="int">255</CanvasColorRedPart>
|
||||
<SelectionColorAlphaPart type="int">255</SelectionColorAlphaPart>
|
||||
<SelectionColorBluePart type="int">0</SelectionColorBluePart>
|
||||
<SelectionColorGreenPart type="int">255</SelectionColorGreenPart>
|
||||
<SelectionColorRedPart type="int">255</SelectionColorRedPart>
|
||||
</Gui>
|
||||
<Legend>
|
||||
<filterByMap type="bool">false</filterByMap>
|
||||
</Legend>
|
||||
<Measure>
|
||||
<Ellipsoid type="QString">WGS84</Ellipsoid>
|
||||
</Measure>
|
||||
<Measurement>
|
||||
<AreaUnits type="QString">m2</AreaUnits>
|
||||
<DistanceUnits type="QString">meters</DistanceUnits>
|
||||
</Measurement>
|
||||
<PAL>
|
||||
<CandidatesLine type="int">50</CandidatesLine>
|
||||
<CandidatesPoint type="int">16</CandidatesPoint>
|
||||
<CandidatesPolygon type="int">30</CandidatesPolygon>
|
||||
<DrawRectOnly type="bool">false</DrawRectOnly>
|
||||
<DrawUnplaced type="bool">false</DrawUnplaced>
|
||||
<SearchMethod type="int">0</SearchMethod>
|
||||
<ShowingAllLabels type="bool">false</ShowingAllLabels>
|
||||
<ShowingCandidates type="bool">false</ShowingCandidates>
|
||||
<ShowingPartialsLabels type="bool">true</ShowingPartialsLabels>
|
||||
<TextFormat type="int">0</TextFormat>
|
||||
<UnplacedColor type="QString">255,0,0,255</UnplacedColor>
|
||||
</PAL>
|
||||
<Paths>
|
||||
<Absolute type="bool">false</Absolute>
|
||||
</Paths>
|
||||
<PositionPrecision>
|
||||
<Automatic type="bool">true</Automatic>
|
||||
<DecimalPlaces type="int">2</DecimalPlaces>
|
||||
</PositionPrecision>
|
||||
<SpatialRefSys>
|
||||
<ProjectionsEnabled type="int">1</ProjectionsEnabled>
|
||||
</SpatialRefSys>
|
||||
</properties>
|
||||
<visibility-presets/>
|
||||
<transformContext>
|
||||
<srcDest source="EPSG:28992" destTransform="+towgs84=0,0,0" dest="EPSG:3948" sourceTransform="+towgs84=565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812"/>
|
||||
<srcDest source="EPSG:3035" destTransform="" dest="EPSG:4326" sourceTransform="+towgs84=0,0,0"/>
|
||||
<srcDest source="EPSG:4326" destTransform="+towgs84=0,0,0" dest="EPSG:25832" sourceTransform=""/>
|
||||
</transformContext>
|
||||
<projectMetadata>
|
||||
<identifier></identifier>
|
||||
<parentidentifier></parentidentifier>
|
||||
<language></language>
|
||||
<type></type>
|
||||
<title></title>
|
||||
<abstract></abstract>
|
||||
<links/>
|
||||
<author>Alessandro Pasotti</author>
|
||||
<creation>2019-08-09T09:31:02</creation>
|
||||
</projectMetadata>
|
||||
<Annotations/>
|
||||
<Layouts/>
|
||||
</qgis>
|
22
tests/testdata/qgis_server/wms_getfeatureinfo_cascading_issue31177.txt
vendored
Normal file
22
tests/testdata/qgis_server/wms_getfeatureinfo_cascading_issue31177.txt
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
Content-Length: 1268
|
||||
Content-Type: application/vnd.ogc.gml; charset=utf-8
|
||||
|
||||
<wfs:FeatureCollection xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows" xmlns:qgs="http://qgis.org/gml" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd http://qgis.org/gml" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<gml:featureMember>
|
||||
<qgs:Alberate fid="Alberate.0">
|
||||
<qgs:id_posto_pianta>13498</qgs:id_posto_pianta>
|
||||
<qgs:num_posto_pianta>2</qgs:num_posto_pianta>
|
||||
<qgs:descr_ambito>D'OVIDIO Enrico VIA</qgs:descr_ambito>
|
||||
<qgs:descr_specie>ACER PSEUDOPLATANUS LEOPOLDII</qgs:descr_specie>
|
||||
<qgs:descr_eta>(non specificata)</qgs:descr_eta>
|
||||
<qgs:diametro_fusto></qgs:diametro_fusto>
|
||||
<qgs:altezza>10</qgs:altezza>
|
||||
<qgs:descr_pavimentazione>ALTRO</qgs:descr_pavimentazione>
|
||||
<qgs:descr_posiz_posto_pianta>(non specificata)</qgs:descr_posiz_posto_pianta>
|
||||
<qgs:descr_stato_posto_pianta>PIANTA</qgs:descr_stato_posto_pianta>
|
||||
<qgs:id_pianta>4175</qgs:id_pianta>
|
||||
<qgs:altezza_impalcato></qgs:altezza_impalcato>
|
||||
<qgs:diametro_medio_chioma></qgs:diametro_medio_chioma>
|
||||
</qgs:Alberate>
|
||||
</gml:featureMember>
|
||||
</wfs:FeatureCollection>
|
Loading…
x
Reference in New Issue
Block a user