Skip to content

Commit 3d937e1

Browse files
committedDec 15, 2015
Simple python tests of WFS responses
1 parent a1a19d2 commit 3d937e1

File tree

5 files changed

+730
-0
lines changed

5 files changed

+730
-0
lines changed
 

‎tests/src/python/test_qgsserver.py

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
import re
1717
import unittest
1818
import urllib
19+
from mimetools import Message
20+
from StringIO import StringIO
1921
from qgis.server import QgsServer
2022
from qgis.core import QgsMessageLog
2123
from utilities import unitTestDataPath
@@ -166,6 +168,79 @@ def test_project_wms(self):
166168
for request in ('GetCapabilities', 'GetProjectSettings'):
167169
self.wms_request_compare(request)
168170

171+
# WFS tests
172+
def wfs_request_compare(self, request):
173+
project = self.testdata_path + "test+project_wfs.qgs"
174+
assert os.path.exists(project), "Project file not found: " + project
175+
176+
query_string = 'MAP=%s&SERVICE=WFS&VERSION=1.1.0&REQUEST=%s' % (urllib.quote(project), request)
177+
header, body = [str(_v) for _v in self.server.handleRequest(query_string)]
178+
self.assert_headers(header, body)
179+
response = header + body
180+
f = open(self.testdata_path + 'wfs_'+ request.lower() + '.txt')
181+
expected = f.read()
182+
f.close()
183+
# Store the output for debug or to regenerate the reference documents:
184+
"""
185+
f = open(os.path.dirname(__file__) + '/wfs_' + request.lower() + '_expected.txt', 'w+')
186+
f.write(expected)
187+
f.close()
188+
f = open(os.path.dirname(__file__) + '/wfs_' + request.lower() + '_response.txt', 'w+')
189+
f.write(response)
190+
f.close()
191+
"""
192+
response = re.sub(RE_STRIP_PATH, '', response)
193+
expected = re.sub(RE_STRIP_PATH, '', expected)
194+
self.assertEqual(response, expected, msg="request %s failed.\n Query: %s\n Expected:\n%s\n\n Response:\n%s" % (query_string, request, expected, response))
195+
196+
def test_project_wfs(self):
197+
"""Test some WMS request"""
198+
for request in ('GetCapabilities', 'DescribeFeatureType'):
199+
self.wfs_request_compare(request)
200+
201+
def wfs_getfeature_compare(self, requestid, request):
202+
project = self.testdata_path + "test+project_wfs.qgs"
203+
assert os.path.exists(project), "Project file not found: " + project
204+
205+
query_string = 'MAP=%s&SERVICE=WFS&VERSION=1.0.0&REQUEST=%s' % (urllib.quote(project), request)
206+
header, body = [str(_v) for _v in self.server.handleRequest(query_string)]
207+
self.assert_headers(header, body)
208+
response = header + body
209+
f = open(self.testdata_path + 'wfs_getfeature_'+ requestid + '.txt')
210+
expected = f.read()
211+
f.close()
212+
# Store the output for debug or to regenerate the reference documents:
213+
"""
214+
f = open(os.path.dirname(__file__) + '/wfs_getfeature_' + requestid + '_expected.txt', 'w+')
215+
f.write(expected)
216+
f.close()
217+
f = open(os.path.dirname(__file__) + '/wfs_getfeature_' + requestid + '_response.txt', 'w+')
218+
f.write(response)
219+
f.close()
220+
"""
221+
response = re.sub(RE_STRIP_PATH, '', response)
222+
expected = re.sub(RE_STRIP_PATH, '', expected)
223+
self.assertEqual(response, expected, msg=u"request %s failed.\n Query: %s\n Expected:\n%s\n\n Response:\n%s"
224+
% (query_string,
225+
request,
226+
unicode(expected, errors='replace'),
227+
unicode(response, errors='replace')))
228+
229+
def test_getfeature(self):
230+
tests = []
231+
tests.append(('nobbox', u'GetFeature&TYPENAME=testlayer&SRSNAME=EPSG:4326'))
232+
233+
for id, req in tests:
234+
self.wfs_getfeature_compare(id, req)
235+
236+
def assert_headers(self, header, body):
237+
headers = Message(StringIO(header))
238+
if headers.has_key('content-length'):
239+
content_length = int(headers['content-length'])
240+
body_length = len(body)
241+
self.assertEqual(content_length, body_length, msg= "Header reported content-length: %d Actual body length was: %d" %(content_length, body_length) )
242+
243+
169244
# The following code was used to test type conversion in python bindings
170245
# def test_qpair(self):
171246
# """Test QPair bindings"""
Lines changed: 467 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,467 @@
1+
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
2+
<qgis projectname="QGIS Test Project" version="2.12.0-Lyon">
3+
<title>QGIS Test Project</title>
4+
<layer-tree-group expanded="1" checked="Qt::Checked" name="">
5+
<customproperties/>
6+
<layer-tree-layer expanded="1" checked="Qt::Checked" id="testlayer20150528120452665" name="testlayer">
7+
<customproperties/>
8+
</layer-tree-layer>
9+
</layer-tree-group>
10+
<relations/>
11+
<mapcanvas>
12+
<units>degrees</units>
13+
<extent>
14+
<xmin>8.20315414376310059</xmin>
15+
<ymin>44.9012858326611024</ymin>
16+
<xmax>8.204164917965862</xmax>
17+
<ymax>44.90154911342418131</ymax>
18+
</extent>
19+
<rotation>0</rotation>
20+
<projections>1</projections>
21+
<destinationsrs>
22+
<spatialrefsys>
23+
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
24+
<srsid>3452</srsid>
25+
<srid>4326</srid>
26+
<authid>EPSG:4326</authid>
27+
<description>WGS 84</description>
28+
<projectionacronym>longlat</projectionacronym>
29+
<ellipsoidacronym>WGS84</ellipsoidacronym>
30+
<geographicflag>true</geographicflag>
31+
</spatialrefsys>
32+
</destinationsrs>
33+
<layer_coordinate_transform_info>
34+
<layer_coordinate_transform destAuthId="EPSG:4326" srcAuthId="EPSG:4326" srcDatumTransform="-1" destDatumTransform="-1" layerid="testlayer20150528120452665"/>
35+
</layer_coordinate_transform_info>
36+
</mapcanvas>
37+
<layer-tree-canvas>
38+
<custom-order enabled="0">
39+
<item>testlayer20150528120452665</item>
40+
</custom-order>
41+
</layer-tree-canvas>
42+
<legend updateDrawingOrder="true">
43+
<legendlayer drawingOrder="-1" open="true" checked="Qt::Checked" name="testlayer" showFeatureCount="0">
44+
<filegroup open="true" hidden="false">
45+
<legendlayerfile isInOverview="0" layerid="testlayer20150528120452665" visible="1"/>
46+
</filegroup>
47+
</legendlayer>
48+
</legend>
49+
<mapcanvas>
50+
<units>degrees</units>
51+
<extent>
52+
<xmin>8.20315414376310059</xmin>
53+
<ymin>44.9012858326611024</ymin>
54+
<xmax>8.204164917965862</xmax>
55+
<ymax>44.90154911342418131</ymax>
56+
</extent>
57+
<rotation>0</rotation>
58+
<projections>1</projections>
59+
<destinationsrs>
60+
<spatialrefsys>
61+
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
62+
<srsid>3452</srsid>
63+
<srid>4326</srid>
64+
<authid>EPSG:4326</authid>
65+
<description>WGS 84</description>
66+
<projectionacronym>longlat</projectionacronym>
67+
<ellipsoidacronym>WGS84</ellipsoidacronym>
68+
<geographicflag>true</geographicflag>
69+
</spatialrefsys>
70+
</destinationsrs>
71+
<layer_coordinate_transform_info>
72+
<layer_coordinate_transform destAuthId="EPSG:4326" srcAuthId="EPSG:4326" srcDatumTransform="-1" destDatumTransform="-1" layerid="testlayer20150528120452665"/>
73+
</layer_coordinate_transform_info>
74+
</mapcanvas>
75+
<projectlayers layercount="1">
76+
<maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="0" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Point" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
77+
<id>testlayer20150528120452665</id>
78+
<datasource>./testlayer.shp</datasource>
79+
<title>A test vector layer</title>
80+
<abstract>A test vector layer with unicode òà</abstract>
81+
<keywordList>
82+
<value></value>
83+
</keywordList>
84+
<layername>testlayer</layername>
85+
<srs>
86+
<spatialrefsys>
87+
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
88+
<srsid>3452</srsid>
89+
<srid>4326</srid>
90+
<authid>EPSG:4326</authid>
91+
<description>WGS 84</description>
92+
<projectionacronym>longlat</projectionacronym>
93+
<ellipsoidacronym>WGS84</ellipsoidacronym>
94+
<geographicflag>true</geographicflag>
95+
</spatialrefsys>
96+
</srs>
97+
<provider encoding="UTF-8">ogr</provider>
98+
<previewExpression></previewExpression>
99+
<vectorjoins/>
100+
<expressionfields/>
101+
<map-layer-style-manager current="">
102+
<map-layer-style name=""/>
103+
</map-layer-style-manager>
104+
<edittypes>
105+
<edittype widgetv2type="TextEdit" name="id">
106+
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
107+
</edittype>
108+
<edittype widgetv2type="TextEdit" name="name">
109+
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
110+
</edittype>
111+
<edittype widgetv2type="TextEdit" name="utf8nameè">
112+
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
113+
</edittype>
114+
</edittypes>
115+
<renderer-v2 forceraster="0" symbollevels="0" type="singleSymbol">
116+
<symbols>
117+
<symbol alpha="1" clip_to_extent="1" type="marker" name="0">
118+
<layer pass="0" class="SimpleMarker" locked="0">
119+
<prop k="angle" v="0"/>
120+
<prop k="color" v="102,164,67,255"/>
121+
<prop k="horizontal_anchor_point" v="1"/>
122+
<prop k="name" v="circle"/>
123+
<prop k="offset" v="0,0"/>
124+
<prop k="offset_map_unit_scale" v="0,0,0,0,0,0"/>
125+
<prop k="offset_unit" v="MM"/>
126+
<prop k="outline_color" v="0,0,0,255"/>
127+
<prop k="outline_style" v="solid"/>
128+
<prop k="outline_width" v="0"/>
129+
<prop k="outline_width_map_unit_scale" v="0,0,0,0,0,0"/>
130+
<prop k="outline_width_unit" v="MM"/>
131+
<prop k="scale_method" v="area"/>
132+
<prop k="size" v="2"/>
133+
<prop k="size_map_unit_scale" v="0,0,0,0,0,0"/>
134+
<prop k="size_unit" v="MM"/>
135+
<prop k="vertical_anchor_point" v="1"/>
136+
<effect enabled="0" type="effectStack">
137+
<effect type="drawSource">
138+
<prop k="blend_mode" v="0"/>
139+
<prop k="draw_mode" v="2"/>
140+
<prop k="enabled" v="1"/>
141+
<prop k="transparency" v="0"/>
142+
</effect>
143+
</effect>
144+
</layer>
145+
</symbol>
146+
</symbols>
147+
<rotation/>
148+
<sizescale scalemethod="diameter"/>
149+
<effect enabled="0" type="effectStack">
150+
<effect type="drawSource">
151+
<prop k="blend_mode" v="0"/>
152+
<prop k="draw_mode" v="2"/>
153+
<prop k="enabled" v="1"/>
154+
<prop k="transparency" v="0"/>
155+
</effect>
156+
</effect>
157+
</renderer-v2>
158+
<labeling type="simple"/>
159+
<customproperties>
160+
<property key="labeling" value="pal"/>
161+
<property key="labeling/addDirectionSymbol" value="false"/>
162+
<property key="labeling/angleOffset" value="0"/>
163+
<property key="labeling/blendMode" value="0"/>
164+
<property key="labeling/bufferBlendMode" value="0"/>
165+
<property key="labeling/bufferColorA" value="255"/>
166+
<property key="labeling/bufferColorB" value="255"/>
167+
<property key="labeling/bufferColorG" value="255"/>
168+
<property key="labeling/bufferColorR" value="255"/>
169+
<property key="labeling/bufferDraw" value="false"/>
170+
<property key="labeling/bufferJoinStyle" value="64"/>
171+
<property key="labeling/bufferNoFill" value="false"/>
172+
<property key="labeling/bufferSize" value="1"/>
173+
<property key="labeling/bufferSizeInMapUnits" value="false"/>
174+
<property key="labeling/bufferSizeMapUnitMaxScale" value="0"/>
175+
<property key="labeling/bufferSizeMapUnitMinScale" value="0"/>
176+
<property key="labeling/bufferTransp" value="0"/>
177+
<property key="labeling/centroidInside" value="false"/>
178+
<property key="labeling/centroidWhole" value="false"/>
179+
<property key="labeling/decimals" value="3"/>
180+
<property key="labeling/displayAll" value="false"/>
181+
<property key="labeling/dist" value="0"/>
182+
<property key="labeling/distInMapUnits" value="false"/>
183+
<property key="labeling/distMapUnitMaxScale" value="0"/>
184+
<property key="labeling/distMapUnitMinScale" value="0"/>
185+
<property key="labeling/enabled" value="false"/>
186+
<property key="labeling/fieldName" value=""/>
187+
<property key="labeling/fontBold" value="false"/>
188+
<property key="labeling/fontCapitals" value="0"/>
189+
<property key="labeling/fontFamily" value="Ubuntu"/>
190+
<property key="labeling/fontItalic" value="false"/>
191+
<property key="labeling/fontLetterSpacing" value="0"/>
192+
<property key="labeling/fontLimitPixelSize" value="false"/>
193+
<property key="labeling/fontMaxPixelSize" value="10000"/>
194+
<property key="labeling/fontMinPixelSize" value="3"/>
195+
<property key="labeling/fontSize" value="9"/>
196+
<property key="labeling/fontSizeInMapUnits" value="false"/>
197+
<property key="labeling/fontSizeMapUnitMaxScale" value="0"/>
198+
<property key="labeling/fontSizeMapUnitMinScale" value="0"/>
199+
<property key="labeling/fontStrikeout" value="false"/>
200+
<property key="labeling/fontUnderline" value="false"/>
201+
<property key="labeling/fontWeight" value="50"/>
202+
<property key="labeling/fontWordSpacing" value="0"/>
203+
<property key="labeling/formatNumbers" value="false"/>
204+
<property key="labeling/isExpression" value="true"/>
205+
<property key="labeling/labelOffsetInMapUnits" value="true"/>
206+
<property key="labeling/labelOffsetMapUnitMaxScale" value="0"/>
207+
<property key="labeling/labelOffsetMapUnitMinScale" value="0"/>
208+
<property key="labeling/labelPerPart" value="false"/>
209+
<property key="labeling/leftDirectionSymbol" value="&lt;"/>
210+
<property key="labeling/limitNumLabels" value="false"/>
211+
<property key="labeling/maxCurvedCharAngleIn" value="20"/>
212+
<property key="labeling/maxCurvedCharAngleOut" value="-20"/>
213+
<property key="labeling/maxNumLabels" value="2000"/>
214+
<property key="labeling/mergeLines" value="false"/>
215+
<property key="labeling/minFeatureSize" value="0"/>
216+
<property key="labeling/multilineAlign" value="0"/>
217+
<property key="labeling/multilineHeight" value="1"/>
218+
<property key="labeling/namedStyle" value="Medium"/>
219+
<property key="labeling/obstacle" value="true"/>
220+
<property key="labeling/placeDirectionSymbol" value="0"/>
221+
<property key="labeling/placement" value="0"/>
222+
<property key="labeling/placementFlags" value="0"/>
223+
<property key="labeling/plussign" value="false"/>
224+
<property key="labeling/preserveRotation" value="true"/>
225+
<property key="labeling/previewBkgrdColor" value="#ffffff"/>
226+
<property key="labeling/priority" value="5"/>
227+
<property key="labeling/quadOffset" value="4"/>
228+
<property key="labeling/repeatDistance" value="0"/>
229+
<property key="labeling/repeatDistanceMapUnitMaxScale" value="0"/>
230+
<property key="labeling/repeatDistanceMapUnitMinScale" value="0"/>
231+
<property key="labeling/repeatDistanceUnit" value="1"/>
232+
<property key="labeling/reverseDirectionSymbol" value="false"/>
233+
<property key="labeling/rightDirectionSymbol" value=">"/>
234+
<property key="labeling/scaleMax" value="10000000"/>
235+
<property key="labeling/scaleMin" value="1"/>
236+
<property key="labeling/scaleVisibility" value="false"/>
237+
<property key="labeling/shadowBlendMode" value="6"/>
238+
<property key="labeling/shadowColorB" value="0"/>
239+
<property key="labeling/shadowColorG" value="0"/>
240+
<property key="labeling/shadowColorR" value="0"/>
241+
<property key="labeling/shadowDraw" value="false"/>
242+
<property key="labeling/shadowOffsetAngle" value="135"/>
243+
<property key="labeling/shadowOffsetDist" value="1"/>
244+
<property key="labeling/shadowOffsetGlobal" value="true"/>
245+
<property key="labeling/shadowOffsetMapUnitMaxScale" value="0"/>
246+
<property key="labeling/shadowOffsetMapUnitMinScale" value="0"/>
247+
<property key="labeling/shadowOffsetUnits" value="1"/>
248+
<property key="labeling/shadowRadius" value="1.5"/>
249+
<property key="labeling/shadowRadiusAlphaOnly" value="false"/>
250+
<property key="labeling/shadowRadiusMapUnitMaxScale" value="0"/>
251+
<property key="labeling/shadowRadiusMapUnitMinScale" value="0"/>
252+
<property key="labeling/shadowRadiusUnits" value="1"/>
253+
<property key="labeling/shadowScale" value="100"/>
254+
<property key="labeling/shadowTransparency" value="30"/>
255+
<property key="labeling/shadowUnder" value="0"/>
256+
<property key="labeling/shapeBlendMode" value="0"/>
257+
<property key="labeling/shapeBorderColorA" value="255"/>
258+
<property key="labeling/shapeBorderColorB" value="128"/>
259+
<property key="labeling/shapeBorderColorG" value="128"/>
260+
<property key="labeling/shapeBorderColorR" value="128"/>
261+
<property key="labeling/shapeBorderWidth" value="0"/>
262+
<property key="labeling/shapeBorderWidthMapUnitMaxScale" value="0"/>
263+
<property key="labeling/shapeBorderWidthMapUnitMinScale" value="0"/>
264+
<property key="labeling/shapeBorderWidthUnits" value="1"/>
265+
<property key="labeling/shapeDraw" value="false"/>
266+
<property key="labeling/shapeFillColorA" value="255"/>
267+
<property key="labeling/shapeFillColorB" value="255"/>
268+
<property key="labeling/shapeFillColorG" value="255"/>
269+
<property key="labeling/shapeFillColorR" value="255"/>
270+
<property key="labeling/shapeJoinStyle" value="64"/>
271+
<property key="labeling/shapeOffsetMapUnitMaxScale" value="0"/>
272+
<property key="labeling/shapeOffsetMapUnitMinScale" value="0"/>
273+
<property key="labeling/shapeOffsetUnits" value="1"/>
274+
<property key="labeling/shapeOffsetX" value="0"/>
275+
<property key="labeling/shapeOffsetY" value="0"/>
276+
<property key="labeling/shapeRadiiMapUnitMaxScale" value="0"/>
277+
<property key="labeling/shapeRadiiMapUnitMinScale" value="0"/>
278+
<property key="labeling/shapeRadiiUnits" value="1"/>
279+
<property key="labeling/shapeRadiiX" value="0"/>
280+
<property key="labeling/shapeRadiiY" value="0"/>
281+
<property key="labeling/shapeRotation" value="0"/>
282+
<property key="labeling/shapeRotationType" value="0"/>
283+
<property key="labeling/shapeSVGFile" value=""/>
284+
<property key="labeling/shapeSizeMapUnitMaxScale" value="0"/>
285+
<property key="labeling/shapeSizeMapUnitMinScale" value="0"/>
286+
<property key="labeling/shapeSizeType" value="0"/>
287+
<property key="labeling/shapeSizeUnits" value="1"/>
288+
<property key="labeling/shapeSizeX" value="0"/>
289+
<property key="labeling/shapeSizeY" value="0"/>
290+
<property key="labeling/shapeTransparency" value="0"/>
291+
<property key="labeling/shapeType" value="0"/>
292+
<property key="labeling/textColorA" value="255"/>
293+
<property key="labeling/textColorB" value="0"/>
294+
<property key="labeling/textColorG" value="0"/>
295+
<property key="labeling/textColorR" value="0"/>
296+
<property key="labeling/textTransp" value="0"/>
297+
<property key="labeling/upsidedownLabels" value="0"/>
298+
<property key="labeling/wrapChar" value=""/>
299+
<property key="labeling/xOffset" value="0"/>
300+
<property key="labeling/yOffset" value="0"/>
301+
</customproperties>
302+
<blendMode>0</blendMode>
303+
<featureBlendMode>0</featureBlendMode>
304+
<layerTransparency>0</layerTransparency>
305+
<displayfield>name</displayfield>
306+
<label>0</label>
307+
<labelattributes>
308+
<label fieldname="" text="Label"/>
309+
<family fieldname="" name="Ubuntu"/>
310+
<size fieldname="" units="pt" value="12"/>
311+
<bold fieldname="" on="0"/>
312+
<italic fieldname="" on="0"/>
313+
<underline fieldname="" on="0"/>
314+
<strikeout fieldname="" on="0"/>
315+
<color fieldname="" red="0" blue="0" green="0"/>
316+
<x fieldname=""/>
317+
<y fieldname=""/>
318+
<offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
319+
<angle fieldname="" value="0" auto="0"/>
320+
<alignment fieldname="" value="center"/>
321+
<buffercolor fieldname="" red="255" blue="255" green="255"/>
322+
<buffersize fieldname="" units="pt" value="1"/>
323+
<bufferenabled fieldname="" on=""/>
324+
<multilineenabled fieldname="" on=""/>
325+
<selectedonly on=""/>
326+
</labelattributes>
327+
<SingleCategoryDiagramRenderer diagramType="Pie">
328+
<DiagramCategory penColor="#000000" labelPlacementMethod="XHeight" penWidth="0" diagramOrientation="Up" minimumSize="0" barWidth="5" penAlpha="255" maxScaleDenominator="1e+08" backgroundColor="#ffffff" transparency="0" width="15" scaleDependency="Area" backgroundAlpha="255" angleOffset="1440" scaleBasedVisibility="0" enabled="0" height="15" sizeType="MM" minScaleDenominator="-4.65661e-10">
329+
<fontProperties description="Ubuntu,9,-1,5,50,0,0,0,0,0" style=""/>
330+
<attribute field="" color="#000000" label=""/>
331+
</DiagramCategory>
332+
</SingleCategoryDiagramRenderer>
333+
<DiagramLayerSettings yPosColumn="-1" linePlacementFlags="10" placement="0" dist="0" xPosColumn="-1" priority="0" obstacle="0" showAll="1"/>
334+
<editform>.</editform>
335+
<editforminit/>
336+
<featformsuppress>0</featformsuppress>
337+
<annotationform>.</annotationform>
338+
<editorlayout>generatedlayout</editorlayout>
339+
<excludeAttributesWMS/>
340+
<excludeAttributesWFS/>
341+
<attributeactions/>
342+
<conditionalstyles>
343+
<rowstyles/>
344+
<fieldstyles/>
345+
</conditionalstyles>
346+
<edittypes>
347+
<edittype widgetv2type="TextEdit" name="id">
348+
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
349+
</edittype>
350+
<edittype widgetv2type="TextEdit" name="name">
351+
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
352+
</edittype>
353+
<edittype widgetv2type="TextEdit" name="utf8nameè">
354+
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
355+
</edittype>
356+
</edittypes>
357+
</maplayer>
358+
</projectlayers>
359+
<properties>
360+
<WMSContactPerson type="QString">Alessandro Pasotti</WMSContactPerson>
361+
<Variables>
362+
<variableNames type="QStringList"/>
363+
<variableValues type="QStringList"/>
364+
</Variables>
365+
<WMSOnlineResource type="QString"></WMSOnlineResource>
366+
<WMSUseLayerIDs type="bool">false</WMSUseLayerIDs>
367+
<WMSContactOrganization type="QString">QGIS dev team</WMSContactOrganization>
368+
<WMSExtent type="QStringList">
369+
<value>8.20315414376310059</value>
370+
<value>44.901236559338642</value>
371+
<value>8.204164917965862</value>
372+
<value>44.90159838674664172</value>
373+
</WMSExtent>
374+
<WMSKeywordList type="QStringList">
375+
<value></value>
376+
</WMSKeywordList>
377+
<WFSUrl type="QString"></WFSUrl>
378+
<Paths>
379+
<Absolute type="bool">false</Absolute>
380+
</Paths>
381+
<WMSServiceTitle type="QString">QGIS TestProject</WMSServiceTitle>
382+
<WFSLayers type="QStringList">
383+
<value>testlayer20150528120452665</value>
384+
</WFSLayers>
385+
<WMSContactMail type="QString">elpaso@itopen.it</WMSContactMail>
386+
<WMSRestrictedComposers type="QStringList"/>
387+
<WMSRestrictedLayers type="QStringList"/>
388+
<PositionPrecision>
389+
<DecimalPlaces type="int">2</DecimalPlaces>
390+
<Automatic type="bool">true</Automatic>
391+
<DegreeFormat type="QString">D</DegreeFormat>
392+
</PositionPrecision>
393+
<WCSUrl type="QString"></WCSUrl>
394+
<WMSServiceCapabilities type="bool">true</WMSServiceCapabilities>
395+
<WMSContactPhone type="QString"></WMSContactPhone>
396+
<WMSServiceAbstract type="QString">Some UTF8 text èòù</WMSServiceAbstract>
397+
<WMSAddWktGeometry type="bool">true</WMSAddWktGeometry>
398+
<Measure>
399+
<Ellipsoid type="QString">WGS84</Ellipsoid>
400+
</Measure>
401+
<WMSPrecision type="QString">4</WMSPrecision>
402+
<WFSTLayers>
403+
<Insert type="QStringList">
404+
<value>testlayer20150528120452665</value>
405+
</Insert>
406+
<Update type="QStringList">
407+
<value>testlayer20150528120452665</value>
408+
</Update>
409+
<Delete type="QStringList">
410+
<value>testlayer20150528120452665</value>
411+
</Delete>
412+
</WFSTLayers>
413+
<Gui>
414+
<SelectionColorBluePart type="int">0</SelectionColorBluePart>
415+
<CanvasColorGreenPart type="int">255</CanvasColorGreenPart>
416+
<CanvasColorRedPart type="int">255</CanvasColorRedPart>
417+
<SelectionColorRedPart type="int">255</SelectionColorRedPart>
418+
<SelectionColorAlphaPart type="int">255</SelectionColorAlphaPart>
419+
<SelectionColorGreenPart type="int">255</SelectionColorGreenPart>
420+
<CanvasColorBluePart type="int">255</CanvasColorBluePart>
421+
</Gui>
422+
<Digitizing>
423+
<DefaultSnapToleranceUnit type="int">2</DefaultSnapToleranceUnit>
424+
<LayerSnappingList type="QStringList"/>
425+
<LayerSnappingEnabledList type="QStringList"/>
426+
<SnappingMode type="QString">current_layer</SnappingMode>
427+
<AvoidIntersectionsList type="QStringList"/>
428+
<LayerSnappingToleranceUnitList type="QStringList"/>
429+
<LayerSnapToList type="QStringList"/>
430+
<DefaultSnapType type="QString">off</DefaultSnapType>
431+
<DefaultSnapTolerance type="double">0</DefaultSnapTolerance>
432+
<LayerSnappingToleranceList type="QStringList"/>
433+
</Digitizing>
434+
<WFSLayersPrecision>
435+
<testlayer20150528120452665 type="int">8</testlayer20150528120452665>
436+
</WFSLayersPrecision>
437+
<Identify>
438+
<disabledLayers type="QStringList"/>
439+
</Identify>
440+
<Macros>
441+
<pythonCode type="QString"></pythonCode>
442+
</Macros>
443+
<WMSAccessConstraints type="QString"></WMSAccessConstraints>
444+
<WCSLayers type="QStringList"/>
445+
<Legend>
446+
<filterByMap type="bool">false</filterByMap>
447+
</Legend>
448+
<SpatialRefSys>
449+
<ProjectCRSProj4String type="QString">+proj=longlat +datum=WGS84 +no_defs</ProjectCRSProj4String>
450+
<ProjectCrs type="QString">EPSG:4326</ProjectCrs>
451+
<ProjectCRSID type="int">3452</ProjectCRSID>
452+
<ProjectionsEnabled type="int">1</ProjectionsEnabled>
453+
</SpatialRefSys>
454+
<DefaultStyles>
455+
<Fill type="QString"></Fill>
456+
<Line type="QString"></Line>
457+
<Marker type="QString"></Marker>
458+
<RandomColors type="bool">true</RandomColors>
459+
<AlphaInt type="int">255</AlphaInt>
460+
<ColorRamp type="QString"></ColorRamp>
461+
</DefaultStyles>
462+
<WMSFees type="QString"></WMSFees>
463+
<WMSImageQuality type="int">90</WMSImageQuality>
464+
<WMSUrl type="QString"></WMSUrl>
465+
</properties>
466+
<visibility-presets/>
467+
</qgis>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Content-Length: 913
2+
Content-Type: text/xml; charset=utf-8
3+
4+
<schema xmlns:ogc="http://www.opengis.net/ogc" elementFormDefault="qualified" targetNamespace="http://www.qgis.org/gml" version="1.0" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:qgs="http://www.qgis.org/gml">
5+
<import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd"/>
6+
<element type="qgs:testlayerType" name="testlayer" substitutionGroup="gml:_Feature"/>
7+
<complexType name="testlayerType">
8+
<complexContent>
9+
<extension base="gml:AbstractFeatureType">
10+
<sequence>
11+
<element minOccurs="0" maxOccurs="1" type="gml:PointPropertyType" name="geometry"/>
12+
<element type="integer" name="id"/>
13+
<element type="string" name="name"/>
14+
<element type="string" name="utf8nameè"/>
15+
</sequence>
16+
</extension>
17+
</complexContent>
18+
</complexType>
19+
</schema>
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
Content-Length: 2781
2+
Content-Type: text/xml; charset=utf-8
3+
4+
<WFS_Capabilities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogc="http://www.opengis.net/ogc" version="1.0.0" xmlns="http://www.opengis.net/wfs" updateSequence="0" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-capabilities.xsd" xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows">
5+
<Service>
6+
<Name>WFS</Name>
7+
<Title>QGIS TestProject</Title>
8+
<Abstract>Some UTF8 text èòù</Abstract>
9+
<KeywordList>
10+
<Keyword vocabulary="ISO">infoFeatureAccessService</Keyword>
11+
</KeywordList>
12+
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href=""/>
13+
<Fees>conditions unknown</Fees>
14+
<AccessConstraints>None</AccessConstraints>
15+
</Service>
16+
<Capability>
17+
<Request>
18+
<GetCapabilities>
19+
<DCPType>
20+
<HTTP>
21+
<Get onlineResource="http:"/>
22+
</HTTP>
23+
</DCPType>
24+
<DCPType>
25+
<HTTP>
26+
<Post onlineResource="http:"/>
27+
</HTTP>
28+
</DCPType>
29+
</GetCapabilities>
30+
<DescribeFeatureType>
31+
<SchemaDescriptionLanguage>
32+
<XMLSCHEMA/>
33+
</SchemaDescriptionLanguage>
34+
<DCPType>
35+
<HTTP>
36+
<Get onlineResource="http:"/>
37+
</HTTP>
38+
</DCPType>
39+
<DCPType>
40+
<HTTP>
41+
<Post onlineResource="http:"/>
42+
</HTTP>
43+
</DCPType>
44+
</DescribeFeatureType>
45+
<GetFeature>
46+
<ResultFormat>
47+
<GML2/>
48+
<GML3/>
49+
<GeoJSON/>
50+
</ResultFormat>
51+
<DCPType>
52+
<HTTP>
53+
<Get onlineResource="http:"/>
54+
</HTTP>
55+
</DCPType>
56+
<DCPType>
57+
<HTTP>
58+
<Post onlineResource="http:"/>
59+
</HTTP>
60+
</DCPType>
61+
</GetFeature>
62+
<Transaction>
63+
<DCPType>
64+
<HTTP>
65+
<Post onlineResource="http:"/>
66+
</HTTP>
67+
</DCPType>
68+
</Transaction>
69+
</Request>
70+
</Capability>
71+
<FeatureTypeList>
72+
<Operations>
73+
<Query/>
74+
</Operations>
75+
<FeatureType>
76+
<Name>testlayer</Name>
77+
<Title>A test vector layer</Title>
78+
<Abstract>A test vector layer with unicode òà</Abstract>
79+
<SRS>EPSG:4326</SRS>
80+
<Operations>
81+
<Query/>
82+
<Insert/>
83+
<Update/>
84+
<Delete/>
85+
</Operations>
86+
<LatLongBoundingBox maxx="8.20355" minx="8.20346" maxy="44.9015" miny="44.9014"/>
87+
</FeatureType>
88+
</FeatureTypeList>
89+
<ogc:Filter_Capabilities>
90+
<ogc:Spatial_Capabilities>
91+
<ogc:Spatial_Operators>
92+
<ogc:BBOX/>
93+
<ogc:Disjoint/>
94+
<ogc:Intersect/>
95+
<ogc:Touches/>
96+
<ogc:Crosses/>
97+
<ogc:Contains/>
98+
<ogc:Overlaps/>
99+
<ogc:Within/>
100+
</ogc:Spatial_Operators>
101+
</ogc:Spatial_Capabilities>
102+
<ogc:Scalar_Capabilities>
103+
<ogc:Comparison_Operators>
104+
<ogc:Simple_Comparisons/>
105+
<ogc:Between/>
106+
<ogc:Like/>
107+
</ogc:Comparison_Operators>
108+
</ogc:Scalar_Capabilities>
109+
</ogc:Filter_Capabilities>
110+
</WFS_Capabilities>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Content-Type: text/xml; charset=utf-8
2+
3+
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qgs="http://www.qgis.org/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd http://www.qgis.org/gml http:?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=testlayer&amp;OUTPUTFORMAT=XMLSCHEMA"><gml:boundedBy>
4+
<gml:Box srsName="EPSG:4326">
5+
<gml:coordinates cs="," ts=" ">8.2034593,44.90139483 8.203547,44.90148254</gml:coordinates>
6+
</gml:Box>
7+
</gml:boundedBy>
8+
<gml:featureMember>
9+
<qgs:testlayer fid="testlayer.0">
10+
<gml:boundedBy>
11+
<gml:Box srsName="EPSG:4326">
12+
<gml:coordinates cs="," ts=" ">8.20349634,44.90148253 8.20349634,44.90148253</gml:coordinates>
13+
</gml:Box>
14+
</gml:boundedBy>
15+
<qgs:geometry>
16+
<gml:Point srsName="EPSG:4326">
17+
<gml:coordinates cs="," ts=" ">8.20349634,44.90148253</gml:coordinates>
18+
</gml:Point>
19+
</qgs:geometry>
20+
<qgs:id>1</qgs:id>
21+
<qgs:name>one</qgs:name>
22+
<qgs:utf8nameè>one èé</qgs:utf8nameè>
23+
</qgs:testlayer>
24+
</gml:featureMember>
25+
<gml:featureMember>
26+
<qgs:testlayer fid="testlayer.1">
27+
<gml:boundedBy>
28+
<gml:Box srsName="EPSG:4326">
29+
<gml:coordinates cs="," ts=" ">8.20354699,44.90143568 8.20354699,44.90143568</gml:coordinates>
30+
</gml:Box>
31+
</gml:boundedBy>
32+
<qgs:geometry>
33+
<gml:Point srsName="EPSG:4326">
34+
<gml:coordinates cs="," ts=" ">8.20354699,44.90143568</gml:coordinates>
35+
</gml:Point>
36+
</qgs:geometry>
37+
<qgs:id>2</qgs:id>
38+
<qgs:name>two</qgs:name>
39+
<qgs:utf8nameè>two àò</qgs:utf8nameè>
40+
</qgs:testlayer>
41+
</gml:featureMember>
42+
<gml:featureMember>
43+
<qgs:testlayer fid="testlayer.2">
44+
<gml:boundedBy>
45+
<gml:Box srsName="EPSG:4326">
46+
<gml:coordinates cs="," ts=" ">8.20345931,44.90139484 8.20345931,44.90139484</gml:coordinates>
47+
</gml:Box>
48+
</gml:boundedBy>
49+
<qgs:geometry>
50+
<gml:Point srsName="EPSG:4326">
51+
<gml:coordinates cs="," ts=" ">8.20345931,44.90139484</gml:coordinates>
52+
</gml:Point>
53+
</qgs:geometry>
54+
<qgs:id>3</qgs:id>
55+
<qgs:name>three</qgs:name>
56+
<qgs:utf8nameè>three èé↓</qgs:utf8nameè>
57+
</qgs:testlayer>
58+
</gml:featureMember>
59+
</wfs:FeatureCollection>

0 commit comments

Comments
 (0)
Please sign in to comment.