Skip to content

Commit 534e1e8

Browse files
committedNov 10, 2017
Add test
1 parent 39bce94 commit 534e1e8

File tree

3 files changed

+655
-2
lines changed

3 files changed

+655
-2
lines changed
 

‎tests/src/python/test_qgsserver_wms.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ class TestQgsServerWMS(QgsServerTestBase):
4646
# Set to True to re-generate reference files for this class
4747
regenerate_reference = False
4848

49-
def wms_request_compare(self, request, extra=None, reference_file=None):
50-
project = self.testdata_path + "test_project.qgs"
49+
def wms_request_compare(self, request, extra=None, reference_file=None, project='test_project.qgs'):
50+
project = self.testdata_path + project
5151
assert os.path.exists(project), "Project file not found: " + project
5252

5353
query_string = 'https://www.qgis.org/?MAP=%s&SERVICE=WMS&VERSION=1.3&REQUEST=%s' % (urllib.parse.quote(project), request)
@@ -217,6 +217,21 @@ def test_getfeatureinfo(self):
217217
'query_layers=testlayer+%C3%A8%C3%A9&X=190&Y=320',
218218
'wms_getfeatureinfo-text-xml')
219219

220+
# layer1 is a clone of layer0 but with a scale visibility. Thus,
221+
# GetFeatureInfo response contains only a feature for layer0 and layer1
222+
# is ignored for the required bbox. Without the scale visibility option,
223+
# the feature for layer1 would have been in the response too.
224+
mypath = self.testdata_path + "test_project_scalevisibility.qgs"
225+
self.wms_request_compare('GetFeatureInfo',
226+
'&layers=layer0,layer1&styles=&' +
227+
'VERSION=1.1.0&' +
228+
'info_format=text%2Fxml&' +
229+
'width=500&height=500&srs=EPSG%3A4326' +
230+
'&bbox=8.1976,44.8998,8.2100,44.9027&' +
231+
'query_layers=layer0,layer1&X=235&Y=243',
232+
'wms_getfeatureinfo_notvisible',
233+
'test_project_scalevisibility.qgs')
234+
220235
def test_describelayer(self):
221236
# Test DescribeLayer
222237
self.wms_request_compare('DescribeLayer',
Lines changed: 626 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,626 @@
1+
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
2+
<qgis version="2.99.0-Master" projectname="QGIS Test Project">
3+
<title>QGIS Test Project</title>
4+
<autotransaction active="0"/>
5+
<evaluateDefaultValues active="0"/>
6+
<layer-tree-group>
7+
<customproperties/>
8+
<layer-tree-layer name="layer1" expanded="1" providerKey="ogr" id="layer0_119a7843_4041_45ec_87f9_09e9c2ec99b1" checked="Qt::Checked" source="/home/blottiere/devel/packages/oslandia/QGIS/QGIS_pbl_server_bugfix_layernotfoud/tests/testdata/qgis_server/testlayer.shp">
9+
<customproperties/>
10+
</layer-tree-layer>
11+
<layer-tree-layer name="layer0" expanded="1" providerKey="ogr" id="testlayer20150528120452665" checked="Qt::Checked" source="/home/blottiere/devel/packages/oslandia/QGIS/QGIS_pbl_server_bugfix_layernotfoud/tests/testdata/qgis_server/testlayer.shp">
12+
<customproperties/>
13+
</layer-tree-layer>
14+
<custom-order enabled="0">
15+
<item>testlayer20150528120452665</item>
16+
<item>layer0_119a7843_4041_45ec_87f9_09e9c2ec99b1</item>
17+
</custom-order>
18+
</layer-tree-group>
19+
<snapping-settings intersection-snapping="0" enabled="0" type="2" unit="2" mode="1" tolerance="0">
20+
<individual-layer-settings>
21+
<layer-setting enabled="0" type="2" id="testlayer20150528120452665" units="1" tolerance="10"/>
22+
<layer-setting enabled="0" type="2" id="layer0_119a7843_4041_45ec_87f9_09e9c2ec99b1" units="1" tolerance="10"/>
23+
</individual-layer-settings>
24+
</snapping-settings>
25+
<relations/>
26+
<mapcanvas name="theMapCanvas" annotationsVisible="1">
27+
<units>degrees</units>
28+
<extent>
29+
<xmin>8.2031776049190217</xmin>
30+
<ymin>44.90114119073537324</ymin>
31+
<xmax>8.20391417535903322</xmax>
32+
<ymax>44.90187776117541318</ymax>
33+
</extent>
34+
<rotation>0</rotation>
35+
<destinationsrs>
36+
<spatialrefsys>
37+
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
38+
<srsid>3452</srsid>
39+
<srid>4326</srid>
40+
<authid>EPSG:4326</authid>
41+
<description>WGS 84</description>
42+
<projectionacronym>longlat</projectionacronym>
43+
<ellipsoidacronym>WGS84</ellipsoidacronym>
44+
<geographicflag>true</geographicflag>
45+
</spatialrefsys>
46+
</destinationsrs>
47+
<rendermaptile>0</rendermaptile>
48+
<layer_coordinate_transform_info>
49+
<layer_coordinate_transform layerid="layer0_119a7843_4041_45ec_87f9_09e9c2ec99b1" srcDatumTransform="-1" destDatumTransform="-1" srcAuthId="EPSG:4326" destAuthId="EPSG:4326"/>
50+
<layer_coordinate_transform layerid="testlayer20150528120452665" srcDatumTransform="-1" destDatumTransform="-1" srcAuthId="EPSG:4326" destAuthId="EPSG:4326"/>
51+
<layer_coordinate_transform layerid="testlayer_èé_f5fb1f33_2dfa_4ed4_8a31_8d5c730e5d7e" srcDatumTransform="-1" destDatumTransform="-1" srcAuthId="EPSG:4326" destAuthId="EPSG:4326"/>
52+
</layer_coordinate_transform_info>
53+
</mapcanvas>
54+
<legend updateDrawingOrder="true">
55+
<legendlayer name="layer1" drawingOrder="-1" showFeatureCount="0" open="true" checked="Qt::Checked">
56+
<filegroup open="true" hidden="false">
57+
<legendlayerfile layerid="layer0_119a7843_4041_45ec_87f9_09e9c2ec99b1" visible="1" isInOverview="0"/>
58+
</filegroup>
59+
</legendlayer>
60+
<legendlayer name="layer0" drawingOrder="-1" showFeatureCount="0" open="true" checked="Qt::Checked">
61+
<filegroup open="true" hidden="false">
62+
<legendlayerfile layerid="testlayer20150528120452665" visible="1" isInOverview="0"/>
63+
</filegroup>
64+
</legendlayer>
65+
</legend>
66+
<mapViewDocks/>
67+
<projectlayers>
68+
<maplayer simplifyAlgorithm="0" simplifyMaxScale="1" autoRefreshEnabled="0" type="vector" maxScale="4.65662e-10" geometry="Point" simplifyLocal="1" hasScaleBasedVisibilityFlag="1" simplifyDrawingHints="0" minScale="3101" autoRefreshTime="0" simplifyDrawingTol="1" readOnly="0">
69+
<extent>
70+
<xmin>8.20345930703634352</xmin>
71+
<ymin>44.90139483904469131</ymin>
72+
<xmax>8.20354699399348775</xmax>
73+
<ymax>44.90148252600183554</ymax>
74+
</extent>
75+
<id>layer0_119a7843_4041_45ec_87f9_09e9c2ec99b1</id>
76+
<datasource>./testlayer.shp</datasource>
77+
<title>A test vector layer</title>
78+
<abstract>A test vector layer with unicode òà</abstract>
79+
<keywordList>
80+
<value></value>
81+
</keywordList>
82+
<layername>layer1</layername>
83+
<srs>
84+
<spatialrefsys>
85+
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
86+
<srsid>3452</srsid>
87+
<srid>4326</srid>
88+
<authid>EPSG:4326</authid>
89+
<description>WGS 84</description>
90+
<projectionacronym>longlat</projectionacronym>
91+
<ellipsoidacronym>WGS84</ellipsoidacronym>
92+
<geographicflag>true</geographicflag>
93+
</spatialrefsys>
94+
</srs>
95+
<provider encoding="UTF-8">ogr</provider>
96+
<vectorjoins/>
97+
<layerDependencies/>
98+
<dataDependencies/>
99+
<expressionfields/>
100+
<map-layer-style-manager current="">
101+
<map-layer-style name=""/>
102+
</map-layer-style-manager>
103+
<renderer-v2 type="singleSymbol" forceraster="0" symbollevels="0" enableorderby="0">
104+
<symbols>
105+
<symbol type="marker" name="0" clip_to_extent="1" alpha="1">
106+
<layer enabled="1" class="SimpleMarker" locked="0" pass="0">
107+
<prop k="angle" v="0"/>
108+
<prop k="color" v="0,164,52,255"/>
109+
<prop k="horizontal_anchor_point" v="1"/>
110+
<prop k="joinstyle" v="bevel"/>
111+
<prop k="name" v="circle"/>
112+
<prop k="offset" v="0,0"/>
113+
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
114+
<prop k="offset_unit" v="MM"/>
115+
<prop k="outline_color" v="0,0,0,255"/>
116+
<prop k="outline_style" v="solid"/>
117+
<prop k="outline_width" v="0"/>
118+
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
119+
<prop k="outline_width_unit" v="MM"/>
120+
<prop k="scale_method" v="area"/>
121+
<prop k="size" v="2"/>
122+
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
123+
<prop k="size_unit" v="MM"/>
124+
<prop k="vertical_anchor_point" v="1"/>
125+
<effect type="effectStack" enabled="0">
126+
<effect type="drawSource">
127+
<prop k="blend_mode" v="0"/>
128+
<prop k="draw_mode" v="2"/>
129+
<prop k="enabled" v="1"/>
130+
<prop k="opacity" v="1"/>
131+
</effect>
132+
</effect>
133+
<data_defined_properties>
134+
<Option type="Map">
135+
<Option type="QString" name="name" value=""/>
136+
<Option name="properties"/>
137+
<Option type="QString" name="type" value="collection"/>
138+
</Option>
139+
</data_defined_properties>
140+
</layer>
141+
</symbol>
142+
</symbols>
143+
<rotation/>
144+
<sizescale/>
145+
<effect type="effectStack" enabled="0">
146+
<effect type="drawSource">
147+
<prop k="blend_mode" v="0"/>
148+
<prop k="draw_mode" v="2"/>
149+
<prop k="enabled" v="1"/>
150+
<prop k="opacity" v="1"/>
151+
</effect>
152+
</effect>
153+
</renderer-v2>
154+
<customproperties>
155+
<property key="embeddedWidgets/count" value="0"/>
156+
<property key="variableNames"/>
157+
<property key="variableValues"/>
158+
</customproperties>
159+
<blendMode>0</blendMode>
160+
<featureBlendMode>0</featureBlendMode>
161+
<layerOpacity>1</layerOpacity>
162+
<SingleCategoryDiagramRenderer attributeLegend="1" diagramType="Pie">
163+
<DiagramCategory scaleBasedVisibility="0" penAlpha="255" maxScaleDenominator="1e+8" scaleDependency="Area" sizeType="MM" sizeScale="3x:0,0,0,0,0,0" penWidth="0" penColor="#000000" lineSizeScale="3x:0,0,0,0,0,0" width="15" backgroundColor="#ffffff" minScaleDenominator="4.65662e-10" lineSizeType="MM" enabled="0" opacity="1" barWidth="5" height="15" minimumSize="0" rotationOffset="270" diagramOrientation="Up" backgroundAlpha="255" labelPlacementMethod="XHeight">
164+
<fontProperties style="" description="Ubuntu,9,-1,5,50,0,0,0,0,0"/>
165+
<attribute label="" color="#000000" field=""/>
166+
</DiagramCategory>
167+
</SingleCategoryDiagramRenderer>
168+
<DiagramLayerSettings linePlacementFlags="2" obstacle="0" showAll="1" zIndex="0" priority="0" placement="0" dist="0">
169+
<properties>
170+
<Option type="Map">
171+
<Option type="QString" name="name" value=""/>
172+
<Option type="Map" name="properties">
173+
<Option type="Map" name="show">
174+
<Option type="bool" name="active" value="true"/>
175+
<Option type="QString" name="field" value="id"/>
176+
<Option type="int" name="type" value="2"/>
177+
</Option>
178+
</Option>
179+
<Option type="QString" name="type" value="collection"/>
180+
</Option>
181+
</properties>
182+
</DiagramLayerSettings>
183+
<fieldConfiguration>
184+
<field name="id">
185+
<editWidget type="TextEdit">
186+
<config>
187+
<Option type="Map">
188+
<Option type="QString" name="IsMultiline" value="0"/>
189+
<Option type="QString" name="UseHtml" value="0"/>
190+
</Option>
191+
</config>
192+
</editWidget>
193+
</field>
194+
<field name="name">
195+
<editWidget type="TextEdit">
196+
<config>
197+
<Option type="Map">
198+
<Option type="QString" name="IsMultiline" value="0"/>
199+
<Option type="QString" name="UseHtml" value="0"/>
200+
</Option>
201+
</config>
202+
</editWidget>
203+
</field>
204+
<field name="utf8nameè">
205+
<editWidget type="TextEdit">
206+
<config>
207+
<Option type="Map">
208+
<Option type="QString" name="IsMultiline" value="0"/>
209+
<Option type="QString" name="UseHtml" value="0"/>
210+
</Option>
211+
</config>
212+
</editWidget>
213+
</field>
214+
</fieldConfiguration>
215+
<aliases>
216+
<alias name="" field="id" index="0"/>
217+
<alias name="" field="name" index="1"/>
218+
<alias name="" field="utf8nameè" index="2"/>
219+
</aliases>
220+
<excludeAttributesWMS/>
221+
<excludeAttributesWFS/>
222+
<defaults>
223+
<default expression="" field="id"/>
224+
<default expression="" field="name"/>
225+
<default expression="" field="utf8nameè"/>
226+
</defaults>
227+
<constraints>
228+
<constraint constraints="0" exp_strength="0" notnull_strength="0" field="id" unique_strength="0"/>
229+
<constraint constraints="0" exp_strength="0" notnull_strength="0" field="name" unique_strength="0"/>
230+
<constraint constraints="0" exp_strength="0" notnull_strength="0" field="utf8nameè" unique_strength="0"/>
231+
</constraints>
232+
<constraintExpressions>
233+
<constraint exp="" desc="" field="id"/>
234+
<constraint exp="" desc="" field="name"/>
235+
<constraint exp="" desc="" field="utf8nameè"/>
236+
</constraintExpressions>
237+
<attributeactions>
238+
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
239+
</attributeactions>
240+
<attributetableconfig sortOrder="0" sortExpression="" actionWidgetStyle="dropDown">
241+
<columns>
242+
<column type="field" name="id" hidden="0" width="-1"/>
243+
<column type="field" name="name" hidden="0" width="-1"/>
244+
<column type="field" name="utf8nameè" hidden="0" width="-1"/>
245+
<column type="actions" hidden="1" width="-1"/>
246+
</columns>
247+
</attributetableconfig>
248+
<editform>../../../../../../../..</editform>
249+
<editforminit/>
250+
<editforminitcodesource>0</editforminitcodesource>
251+
<editforminitfilepath>../../../../../../../..</editforminitfilepath>
252+
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
253+
"""
254+
QGIS forms can have a Python function that is called when the form is
255+
opened.
256+
257+
Use this function to add extra logic to your forms.
258+
259+
Enter the name of the function in the "Python Init function"
260+
field.
261+
An example follows:
262+
"""
263+
from qgis.PyQt.QtWidgets import QWidget
264+
265+
def my_form_open(dialog, layer, feature):
266+
geom = feature.geometry()
267+
control = dialog.findChild(QWidget, "MyLineEdit")
268+
]]></editforminitcode>
269+
<featformsuppress>0</featformsuppress>
270+
<editorlayout>generatedlayout</editorlayout>
271+
<widgets/>
272+
<conditionalstyles>
273+
<rowstyles/>
274+
<fieldstyles/>
275+
</conditionalstyles>
276+
<expressionfields/>
277+
<previewExpression>name</previewExpression>
278+
<mapTip>[% 'Name: ' || "name" %]</mapTip>
279+
</maplayer>
280+
<maplayer simplifyAlgorithm="0" simplifyMaxScale="1" autoRefreshEnabled="0" type="vector" maxScale="4.65662e-10" geometry="Point" simplifyLocal="1" hasScaleBasedVisibilityFlag="0" simplifyDrawingHints="0" minScale="1e+8" autoRefreshTime="0" simplifyDrawingTol="1" readOnly="0">
281+
<extent>
282+
<xmin>8.20345930703634352</xmin>
283+
<ymin>44.90139483904469131</ymin>
284+
<xmax>8.20354699399348775</xmax>
285+
<ymax>44.90148252600183554</ymax>
286+
</extent>
287+
<id>testlayer20150528120452665</id>
288+
<datasource>./testlayer.shp</datasource>
289+
<title>A test vector layer</title>
290+
<abstract>A test vector layer with unicode òà</abstract>
291+
<keywordList>
292+
<value></value>
293+
</keywordList>
294+
<layername>layer0</layername>
295+
<srs>
296+
<spatialrefsys>
297+
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
298+
<srsid>3452</srsid>
299+
<srid>4326</srid>
300+
<authid>EPSG:4326</authid>
301+
<description>WGS 84</description>
302+
<projectionacronym>longlat</projectionacronym>
303+
<ellipsoidacronym>WGS84</ellipsoidacronym>
304+
<geographicflag>true</geographicflag>
305+
</spatialrefsys>
306+
</srs>
307+
<provider encoding="UTF-8">ogr</provider>
308+
<vectorjoins/>
309+
<layerDependencies/>
310+
<dataDependencies/>
311+
<expressionfields/>
312+
<map-layer-style-manager current="">
313+
<map-layer-style name=""/>
314+
</map-layer-style-manager>
315+
<renderer-v2 type="singleSymbol" forceraster="0" symbollevels="0" enableorderby="0">
316+
<symbols>
317+
<symbol type="marker" name="0" clip_to_extent="1" alpha="1">
318+
<layer enabled="1" class="SimpleMarker" locked="0" pass="0">
319+
<prop k="angle" v="0"/>
320+
<prop k="color" v="164,0,2,255"/>
321+
<prop k="horizontal_anchor_point" v="1"/>
322+
<prop k="joinstyle" v="bevel"/>
323+
<prop k="name" v="circle"/>
324+
<prop k="offset" v="0,0"/>
325+
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
326+
<prop k="offset_unit" v="MM"/>
327+
<prop k="outline_color" v="0,0,0,255"/>
328+
<prop k="outline_style" v="solid"/>
329+
<prop k="outline_width" v="0"/>
330+
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
331+
<prop k="outline_width_unit" v="MM"/>
332+
<prop k="scale_method" v="area"/>
333+
<prop k="size" v="2"/>
334+
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
335+
<prop k="size_unit" v="MM"/>
336+
<prop k="vertical_anchor_point" v="1"/>
337+
<effect type="effectStack" enabled="0">
338+
<effect type="drawSource">
339+
<prop k="blend_mode" v="0"/>
340+
<prop k="draw_mode" v="2"/>
341+
<prop k="enabled" v="1"/>
342+
<prop k="opacity" v="1"/>
343+
</effect>
344+
</effect>
345+
<data_defined_properties>
346+
<Option type="Map">
347+
<Option type="QString" name="name" value=""/>
348+
<Option name="properties"/>
349+
<Option type="QString" name="type" value="collection"/>
350+
</Option>
351+
</data_defined_properties>
352+
</layer>
353+
</symbol>
354+
</symbols>
355+
<rotation/>
356+
<sizescale/>
357+
<effect type="effectStack" enabled="0">
358+
<effect type="drawSource">
359+
<prop k="blend_mode" v="0"/>
360+
<prop k="draw_mode" v="2"/>
361+
<prop k="enabled" v="1"/>
362+
<prop k="opacity" v="1"/>
363+
</effect>
364+
</effect>
365+
</renderer-v2>
366+
<customproperties>
367+
<property key="embeddedWidgets/count" value="0"/>
368+
<property key="variableNames"/>
369+
<property key="variableValues"/>
370+
</customproperties>
371+
<blendMode>0</blendMode>
372+
<featureBlendMode>0</featureBlendMode>
373+
<layerOpacity>1</layerOpacity>
374+
<SingleCategoryDiagramRenderer attributeLegend="1" diagramType="Pie">
375+
<DiagramCategory scaleBasedVisibility="0" penAlpha="255" maxScaleDenominator="1e+8" scaleDependency="Area" sizeType="MM" sizeScale="3x:0,0,0,0,0,0" penWidth="0" penColor="#000000" lineSizeScale="3x:0,0,0,0,0,0" width="15" backgroundColor="#ffffff" minScaleDenominator="4.65662e-10" lineSizeType="MM" enabled="0" opacity="1" barWidth="5" height="15" minimumSize="0" rotationOffset="270" diagramOrientation="Up" backgroundAlpha="255" labelPlacementMethod="XHeight">
376+
<fontProperties style="" description="Ubuntu,9,-1,5,50,0,0,0,0,0"/>
377+
<attribute label="" color="#000000" field=""/>
378+
</DiagramCategory>
379+
</SingleCategoryDiagramRenderer>
380+
<DiagramLayerSettings linePlacementFlags="2" obstacle="0" showAll="1" zIndex="0" priority="0" placement="0" dist="0">
381+
<properties>
382+
<Option type="Map">
383+
<Option type="QString" name="name" value=""/>
384+
<Option type="Map" name="properties">
385+
<Option type="Map" name="show">
386+
<Option type="bool" name="active" value="true"/>
387+
<Option type="QString" name="field" value="id"/>
388+
<Option type="int" name="type" value="2"/>
389+
</Option>
390+
</Option>
391+
<Option type="QString" name="type" value="collection"/>
392+
</Option>
393+
</properties>
394+
</DiagramLayerSettings>
395+
<fieldConfiguration>
396+
<field name="id">
397+
<editWidget type="TextEdit">
398+
<config>
399+
<Option type="Map">
400+
<Option type="QString" name="IsMultiline" value="0"/>
401+
<Option type="QString" name="UseHtml" value="0"/>
402+
</Option>
403+
</config>
404+
</editWidget>
405+
</field>
406+
<field name="name">
407+
<editWidget type="TextEdit">
408+
<config>
409+
<Option type="Map">
410+
<Option type="QString" name="IsMultiline" value="0"/>
411+
<Option type="QString" name="UseHtml" value="0"/>
412+
</Option>
413+
</config>
414+
</editWidget>
415+
</field>
416+
<field name="utf8nameè">
417+
<editWidget type="TextEdit">
418+
<config>
419+
<Option type="Map">
420+
<Option type="QString" name="IsMultiline" value="0"/>
421+
<Option type="QString" name="UseHtml" value="0"/>
422+
</Option>
423+
</config>
424+
</editWidget>
425+
</field>
426+
</fieldConfiguration>
427+
<aliases>
428+
<alias name="" field="id" index="0"/>
429+
<alias name="" field="name" index="1"/>
430+
<alias name="" field="utf8nameè" index="2"/>
431+
</aliases>
432+
<excludeAttributesWMS/>
433+
<excludeAttributesWFS/>
434+
<defaults>
435+
<default expression="" field="id"/>
436+
<default expression="" field="name"/>
437+
<default expression="" field="utf8nameè"/>
438+
</defaults>
439+
<constraints>
440+
<constraint constraints="0" exp_strength="0" notnull_strength="0" field="id" unique_strength="0"/>
441+
<constraint constraints="0" exp_strength="0" notnull_strength="0" field="name" unique_strength="0"/>
442+
<constraint constraints="0" exp_strength="0" notnull_strength="0" field="utf8nameè" unique_strength="0"/>
443+
</constraints>
444+
<constraintExpressions>
445+
<constraint exp="" desc="" field="id"/>
446+
<constraint exp="" desc="" field="name"/>
447+
<constraint exp="" desc="" field="utf8nameè"/>
448+
</constraintExpressions>
449+
<attributeactions>
450+
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
451+
</attributeactions>
452+
<attributetableconfig sortOrder="0" sortExpression="" actionWidgetStyle="dropDown">
453+
<columns>
454+
<column type="field" name="id" hidden="0" width="-1"/>
455+
<column type="field" name="name" hidden="0" width="-1"/>
456+
<column type="field" name="utf8nameè" hidden="0" width="-1"/>
457+
<column type="actions" hidden="1" width="-1"/>
458+
</columns>
459+
</attributetableconfig>
460+
<editform>../../../../../../../..</editform>
461+
<editforminit/>
462+
<editforminitcodesource>0</editforminitcodesource>
463+
<editforminitfilepath>../../../../../../../..</editforminitfilepath>
464+
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
465+
"""
466+
QGIS forms can have a Python function that is called when the form is
467+
opened.
468+
469+
Use this function to add extra logic to your forms.
470+
471+
Enter the name of the function in the "Python Init function"
472+
field.
473+
An example follows:
474+
"""
475+
from qgis.PyQt.QtWidgets import QWidget
476+
477+
def my_form_open(dialog, layer, feature):
478+
geom = feature.geometry()
479+
control = dialog.findChild(QWidget, "MyLineEdit")
480+
]]></editforminitcode>
481+
<featformsuppress>0</featformsuppress>
482+
<editorlayout>generatedlayout</editorlayout>
483+
<widgets/>
484+
<conditionalstyles>
485+
<rowstyles/>
486+
<fieldstyles/>
487+
</conditionalstyles>
488+
<expressionfields/>
489+
<previewExpression>name</previewExpression>
490+
<mapTip>[% 'Name: ' || "name" %]</mapTip>
491+
</maplayer>
492+
</projectlayers>
493+
<layerorder>
494+
<layer id="testlayer20150528120452665"/>
495+
<layer id="layer0_119a7843_4041_45ec_87f9_09e9c2ec99b1"/>
496+
</layerorder>
497+
<properties>
498+
<WFSLayers type="QStringList">
499+
<value>testlayer20150528120452665</value>
500+
</WFSLayers>
501+
<WMSContactPhone type="QString"></WMSContactPhone>
502+
<Macros>
503+
<pythonCode type="QString"></pythonCode>
504+
</Macros>
505+
<WFSLayersPrecision>
506+
<testlayer20150528120452665 type="int">8</testlayer20150528120452665>
507+
</WFSLayersPrecision>
508+
<Measure>
509+
<Ellipsoid type="QString">WGS84</Ellipsoid>
510+
</Measure>
511+
<WMSOnlineResource type="QString"></WMSOnlineResource>
512+
<WMSContactMail type="QString">elpaso@itopen.it</WMSContactMail>
513+
<WMSUrl type="QString"></WMSUrl>
514+
<WMSRestrictedComposers type="QStringList"/>
515+
<WMSAccessConstraints type="QString">None</WMSAccessConstraints>
516+
<WMSFees type="QString">conditions unknown</WMSFees>
517+
<WMSRequestDefinedDataSources type="bool">false</WMSRequestDefinedDataSources>
518+
<Variables>
519+
<variableValues type="QStringList"/>
520+
<variableNames type="QStringList"/>
521+
</Variables>
522+
<WCSLayers type="QStringList"/>
523+
<SpatialRefSys>
524+
<ProjectCrs type="QString">EPSG:4326</ProjectCrs>
525+
<ProjectionsEnabled type="int">1</ProjectionsEnabled>
526+
<ProjectCRSID type="int">3452</ProjectCRSID>
527+
<ProjectCRSProj4String type="QString">+proj=longlat +datum=WGS84 +no_defs</ProjectCRSProj4String>
528+
</SpatialRefSys>
529+
<DefaultStyles>
530+
<Opacity type="double">1</Opacity>
531+
<RandomColors type="bool">true</RandomColors>
532+
<AlphaInt type="int">255</AlphaInt>
533+
<Marker type="QString"></Marker>
534+
<Fill type="QString"></Fill>
535+
<Line type="QString"></Line>
536+
<ColorRamp type="QString"></ColorRamp>
537+
</DefaultStyles>
538+
<Gui>
539+
<SelectionColorAlphaPart type="int">255</SelectionColorAlphaPart>
540+
<CanvasColorGreenPart type="int">255</CanvasColorGreenPart>
541+
<SelectionColorBluePart type="int">0</SelectionColorBluePart>
542+
<CanvasColorRedPart type="int">255</CanvasColorRedPart>
543+
<SelectionColorGreenPart type="int">255</SelectionColorGreenPart>
544+
<SelectionColorRedPart type="int">255</SelectionColorRedPart>
545+
<CanvasColorBluePart type="int">255</CanvasColorBluePart>
546+
</Gui>
547+
<PositionPrecision>
548+
<Automatic type="bool">true</Automatic>
549+
<DecimalPlaces type="int">2</DecimalPlaces>
550+
<DegreeFormat type="QString">D</DegreeFormat>
551+
</PositionPrecision>
552+
<WMSAddWktGeometry type="bool">true</WMSAddWktGeometry>
553+
<Identify>
554+
<disabledLayers type="QStringList"/>
555+
</Identify>
556+
<WMSContactPosition type="QString"></WMSContactPosition>
557+
<WMSPrecision type="QString">4</WMSPrecision>
558+
<WMSExtent type="QStringList">
559+
<value>8.20315414376310059</value>
560+
<value>44.901236559338642</value>
561+
<value>8.204164917965862</value>
562+
<value>44.90159838674664172</value>
563+
</WMSExtent>
564+
<WMSServiceTitle type="QString">QGIS TestProject</WMSServiceTitle>
565+
<WMSContactPerson type="QString">Alessandro Pasotti</WMSContactPerson>
566+
<Digitizing>
567+
<LayerSnappingList type="QStringList"/>
568+
<SnappingMode type="QString">current_layer</SnappingMode>
569+
<AvoidIntersectionsList type="QStringList"/>
570+
<LayerSnappingEnabledList type="QStringList"/>
571+
<DefaultSnapType type="QString">off</DefaultSnapType>
572+
<LayerSnappingToleranceUnitList type="QStringList"/>
573+
<LayerSnappingToleranceList type="QStringList"/>
574+
<DefaultSnapToleranceUnit type="int">2</DefaultSnapToleranceUnit>
575+
<LayerSnapToList type="QStringList"/>
576+
<DefaultSnapTolerance type="double">0</DefaultSnapTolerance>
577+
</Digitizing>
578+
<WMSServiceAbstract type="QString">Some UTF8 text èòù</WMSServiceAbstract>
579+
<WMSContactOrganization type="QString">QGIS dev team</WMSContactOrganization>
580+
<PAL>
581+
<DrawRectOnly type="bool">false</DrawRectOnly>
582+
<ShowingAllLabels type="bool">false</ShowingAllLabels>
583+
<DrawOutlineLabels type="bool">true</DrawOutlineLabels>
584+
<CandidatesLine type="int">50</CandidatesLine>
585+
<CandidatesPolygon type="int">30</CandidatesPolygon>
586+
<ShowingPartialsLabels type="bool">true</ShowingPartialsLabels>
587+
<SearchMethod type="int">0</SearchMethod>
588+
<CandidatesPoint type="int">16</CandidatesPoint>
589+
<ShowingCandidates type="bool">false</ShowingCandidates>
590+
</PAL>
591+
<WMSRestrictedLayers type="QStringList"/>
592+
<WFSUrl type="QString"></WFSUrl>
593+
<WFSTLayers>
594+
<Update type="QStringList">
595+
<value>testlayer20150528120452665</value>
596+
</Update>
597+
<Delete type="QStringList">
598+
<value>testlayer20150528120452665</value>
599+
</Delete>
600+
<Insert type="QStringList">
601+
<value>testlayer20150528120452665</value>
602+
</Insert>
603+
</WFSTLayers>
604+
<WCSUrl type="QString"></WCSUrl>
605+
<Legend>
606+
<filterByMap type="bool">false</filterByMap>
607+
</Legend>
608+
<WMSImageQuality type="int">90</WMSImageQuality>
609+
<Paths>
610+
<Absolute type="bool">false</Absolute>
611+
</Paths>
612+
<WMSSegmentizeFeatureInfoGeometry type="bool">false</WMSSegmentizeFeatureInfoGeometry>
613+
<WMSUseLayerIDs type="bool">false</WMSUseLayerIDs>
614+
<Measurement>
615+
<AreaUnits type="QString">m2</AreaUnits>
616+
<DistanceUnits type="QString">meters</DistanceUnits>
617+
</Measurement>
618+
<WMSKeywordList type="QStringList">
619+
<value></value>
620+
</WMSKeywordList>
621+
<WMSServiceCapabilities type="bool">true</WMSServiceCapabilities>
622+
</properties>
623+
<visibility-presets/>
624+
<Annotations/>
625+
<Layouts/>
626+
</qgis>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*****
2+
Content-Type: text/xml; charset=utf-8
3+
4+
<GetFeatureInfoResponse>
5+
<Layer name="layer0">
6+
<Feature id="2">
7+
<Attribute value="3" name="id"/>
8+
<Attribute value="three" name="name"/>
9+
<Attribute value="three èé↓" name="utf8nameè"/>
10+
</Feature>
11+
</Layer>
12+
</GetFeatureInfoResponse>

0 commit comments

Comments
 (0)
Please sign in to comment.