mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
[Bugfix][Server] WFS GetFeature GML: CDATA was url encoded before insert
in GML The CDATA section was not well formed in the GML build by QGIS Server. We found `<![CDATA[ ]]>`, instead of `<![CDATA[ ]]>`. For exemple we found ```xml <qgs:name><![CDATA[FOO & FOO]]></qgs:name> ``` instead of ```xml <qgs:name><![CDATA[FOO & FOO]]></qgs:name> ``` * Funded by Faunalia
This commit is contained in:
parent
f985d7c493
commit
7ca7e5cc86
@ -69,6 +69,8 @@ namespace QgsWfs
|
||||
|
||||
QString createFeatureGeoJSON( const QgsFeature &feature, const createFeatureParams ¶ms, const QgsAttributeList &pkAttributes );
|
||||
|
||||
QDomElement createFieldElement( const QgsField &field, const QVariant &value, QDomDocument &doc );
|
||||
|
||||
QString encodeValueToText( const QVariant &value, const QgsEditorWidgetSetup &setup );
|
||||
|
||||
QDomElement createFeatureGML2( const QgsFeature &feature, QDomDocument &doc, const createFeatureParams ¶ms, const QgsProject *project, const QgsAttributeList &pkAttributes );
|
||||
@ -1412,8 +1414,8 @@ namespace QgsWfs
|
||||
}
|
||||
|
||||
//read all attribute values from the feature
|
||||
QgsAttributes featureAttributes = feature.attributes();
|
||||
QgsFields fields = feature.fields();
|
||||
const QgsAttributes featureAttributes = feature.attributes();
|
||||
const QgsFields fields = feature.fields();
|
||||
for ( int i = 0; i < params.attributeIndexes.count(); ++i )
|
||||
{
|
||||
int idx = params.attributeIndexes[i];
|
||||
@ -1421,17 +1423,8 @@ namespace QgsWfs
|
||||
{
|
||||
continue;
|
||||
}
|
||||
const QgsField field = fields.at( idx );
|
||||
const QgsEditorWidgetSetup setup = field.editorWidgetSetup();
|
||||
QString attributeName = field.name();
|
||||
|
||||
QDomElement fieldElem = doc.createElement( "qgs:" + attributeName.replace( ' ', '_' ).replace( cleanTagNameRegExp, QString() ) );
|
||||
QDomText fieldText = doc.createTextNode( encodeValueToText( featureAttributes[idx], setup ) );
|
||||
if ( featureAttributes[idx].isNull() )
|
||||
{
|
||||
fieldElem.setAttribute( QStringLiteral( "xsi:nil" ), QStringLiteral( "true" ) );
|
||||
}
|
||||
fieldElem.appendChild( fieldText );
|
||||
const QDomElement fieldElem = createFieldElement( fields.at( idx ), featureAttributes[idx], doc );
|
||||
typeNameElement.appendChild( fieldElem );
|
||||
}
|
||||
|
||||
@ -1444,7 +1437,7 @@ namespace QgsWfs
|
||||
QDomElement featureElement = doc.createElement( QStringLiteral( "gml:featureMember" )/*wfs:FeatureMember*/ );
|
||||
|
||||
//qgs:%TYPENAME%
|
||||
QDomElement typeNameElement = doc.createElement( "qgs:" + params.typeName /*qgs:%TYPENAME%*/ );
|
||||
QDomElement typeNameElement = doc.createElement( QStringLiteral( "qgs:" ) + params.typeName /*qgs:%TYPENAME%*/ );
|
||||
QString id = QStringLiteral( "%1.%2" ).arg( params.typeName, QgsServerFeatureId::getServerFid( feature, pkAttributes ) );
|
||||
typeNameElement.setAttribute( QStringLiteral( "gml:id" ), id );
|
||||
featureElement.appendChild( typeNameElement );
|
||||
@ -1518,8 +1511,8 @@ namespace QgsWfs
|
||||
}
|
||||
|
||||
//read all attribute values from the feature
|
||||
QgsAttributes featureAttributes = feature.attributes();
|
||||
QgsFields fields = feature.fields();
|
||||
const QgsAttributes featureAttributes = feature.attributes();
|
||||
const QgsFields fields = feature.fields();
|
||||
for ( int i = 0; i < params.attributeIndexes.count(); ++i )
|
||||
{
|
||||
int idx = params.attributeIndexes[i];
|
||||
@ -1528,24 +1521,38 @@ namespace QgsWfs
|
||||
continue;
|
||||
}
|
||||
|
||||
const QgsField field = fields.at( idx );
|
||||
const QgsEditorWidgetSetup setup = field.editorWidgetSetup();
|
||||
|
||||
QString attributeName = field.name();
|
||||
|
||||
QDomElement fieldElem = doc.createElement( "qgs:" + attributeName.replace( ' ', '_' ).replace( cleanTagNameRegExp, QString() ) );
|
||||
QDomText fieldText = doc.createTextNode( encodeValueToText( featureAttributes[idx], setup ) );
|
||||
if ( featureAttributes[idx].isNull() )
|
||||
{
|
||||
fieldElem.setAttribute( QStringLiteral( "xsi:nil" ), QStringLiteral( "true" ) );
|
||||
}
|
||||
fieldElem.appendChild( fieldText );
|
||||
const QDomElement fieldElem = createFieldElement( fields.at( idx ), featureAttributes[idx], doc );
|
||||
typeNameElement.appendChild( fieldElem );
|
||||
}
|
||||
|
||||
return featureElement;
|
||||
}
|
||||
|
||||
QDomElement createFieldElement( const QgsField &field, const QVariant &value, QDomDocument &doc )
|
||||
{
|
||||
const QgsEditorWidgetSetup setup = field.editorWidgetSetup();
|
||||
const QString attributeName = field.name().replace( ' ', '_' ).replace( cleanTagNameRegExp, QString() );
|
||||
QDomElement fieldElem = doc.createElement( QStringLiteral( "qgs:" ) + attributeName );
|
||||
if ( value.isNull() )
|
||||
{
|
||||
fieldElem.setAttribute( QStringLiteral( "xsi:nil" ), QStringLiteral( "true" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
const QString fieldText = encodeValueToText( value, setup );
|
||||
//do we need CDATA
|
||||
if ( fieldText.indexOf( '<' ) != -1 || fieldText.indexOf( '&' ) != -1 )
|
||||
{
|
||||
fieldElem.appendChild( doc.createCDATASection( fieldText ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
fieldElem.appendChild( doc.createTextNode( fieldText ) );
|
||||
}
|
||||
}
|
||||
return fieldElem;
|
||||
}
|
||||
|
||||
QString encodeValueToText( const QVariant &value, const QgsEditorWidgetSetup &setup )
|
||||
{
|
||||
if ( value.isNull() )
|
||||
@ -1590,27 +1597,11 @@ namespace QgsWfs
|
||||
case QVariant::StringList:
|
||||
case QVariant::List:
|
||||
case QVariant::Map:
|
||||
{
|
||||
QString v = QgsJsonUtils::encodeValue( value );
|
||||
|
||||
//do we need CDATA
|
||||
if ( v.indexOf( '<' ) != -1 || v.indexOf( '&' ) != -1 )
|
||||
v.prepend( QStringLiteral( "<![CDATA[" ) ).append( QStringLiteral( "]]>" ) );
|
||||
|
||||
return v;
|
||||
}
|
||||
return QgsJsonUtils::encodeValue( value );
|
||||
|
||||
default:
|
||||
case QVariant::String:
|
||||
{
|
||||
QString v = value.toString();
|
||||
|
||||
//do we need CDATA
|
||||
if ( v.indexOf( '<' ) != -1 || v.indexOf( '&' ) != -1 )
|
||||
v.prepend( QStringLiteral( "<![CDATA[" ) ).append( QStringLiteral( "]]>" ) );
|
||||
|
||||
return v;
|
||||
}
|
||||
return value.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,10 @@ class QgsServerTestBase(unittest.TestCase):
|
||||
for diff in difflib.unified_diff([l.decode('utf8') for l in expected_lines], [l.decode('utf8') for l in response_lines]):
|
||||
diffs.append(diff)
|
||||
|
||||
self.assertEqual(len(expected_lines), len(response_lines), "Expected and response have different number of lines!\n{}\n{}".format(msg, '\n'.join(diffs)))
|
||||
self.assertEqual(
|
||||
len(expected_lines),
|
||||
len(response_lines),
|
||||
"Expected and response have different number of lines!\n{}\n{}\nWe got :\n{}".format(msg, '\n'.join(diffs), '\n'.join([i.decode("utf-8") for i in response_lines])))
|
||||
for expected_line in expected_lines:
|
||||
expected_line = expected_line.strip()
|
||||
response_line = response_lines[line_no - 1].strip()
|
||||
|
@ -599,6 +599,15 @@ class TestQgsServerWFS(QgsServerTestBase):
|
||||
self.wfs_request_compare("DescribeFeatureType", '1.1.0', "TYPENAME=does_not_exist&",
|
||||
'wfs_describeFeatureType_1_1_0_typename_wrong', project_file=project_file)
|
||||
|
||||
def test_GetFeature_with_cdata(self):
|
||||
""" Test GetFeature with CDATA."""
|
||||
self.wfs_request_compare(
|
||||
"GetFeature",
|
||||
"1.0.0",
|
||||
"TYPENAME=test_layer_wfs_cdata_lines&",
|
||||
'wfs_getfeature_cdata',
|
||||
project_file="test_layer_wfs_cdata.qgs")
|
||||
|
||||
def test_describeFeatureTypeVirtualFields(self):
|
||||
"""Test DescribeFeatureType with virtual fields: bug GH-29767"""
|
||||
|
||||
|
11
tests/testdata/qgis_server/test_layer_wfs_cdata.geojson
vendored
Normal file
11
tests/testdata/qgis_server/test_layer_wfs_cdata.geojson
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"name": "test_lines",
|
||||
"features": [
|
||||
{ "type": "Feature", "properties": { "id": 1, "name": "éù%@ > 1", "comment": "Accents, sup" }, "geometry": { "type": "LineString", "coordinates": [ [ 3.8, 43.5 ], [ 3.8, 43.6 ] ] } },
|
||||
{ "type": "Feature", "properties": { "id": 2, "name": "Line > 2", "comment": "Normal, sup" }, "geometry": { "type": "LineString", "coordinates": [ [ 3.8, 43.6 ], [ 3.9, 43.6 ] ] } },
|
||||
{ "type": "Feature", "properties": { "id": 3, "name": "Line < 3", "comment": "Normal, inf" }, "geometry": { "type": "LineString", "coordinates": [ [ 3.9, 43.6 ], [ 3.9, 43.5 ] ] } },
|
||||
{ "type": "Feature", "properties": { "id": 4, "name": "05200", "comment": "Trailing 0" }, "geometry": { "type": "LineString", "coordinates": [ [ 3.9, 43.5 ], [ 3.8, 43.5 ] ] } },
|
||||
{ "type": "Feature", "properties": { "id": 5, "name": "Line & 2", "comment": "And sign" }, "geometry": { "type": "LineString", "coordinates": [ [ 3.8, 43.5 ], [ 3.9, 43.6 ] ] } }
|
||||
]
|
||||
}
|
749
tests/testdata/qgis_server/test_layer_wfs_cdata.qgs
vendored
Normal file
749
tests/testdata/qgis_server/test_layer_wfs_cdata.qgs
vendored
Normal file
@ -0,0 +1,749 @@
|
||||
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
|
||||
<qgis version="3.16.15-Hannover" projectname="" saveUser="etienne" saveDateTime="2022-03-09T14:21:22" saveUserFull="Etienne Trimaille">
|
||||
<homePath path=""/>
|
||||
<title></title>
|
||||
<autotransaction active="0"/>
|
||||
<evaluateDefaultValues active="0"/>
|
||||
<trust active="0"/>
|
||||
<projectCrs>
|
||||
<spatialrefsys>
|
||||
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["unknown"],AREA["World"],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt>
|
||||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
|
||||
<srsid>3452</srsid>
|
||||
<srid>4326</srid>
|
||||
<authid>EPSG:4326</authid>
|
||||
<description>WGS 84</description>
|
||||
<projectionacronym>longlat</projectionacronym>
|
||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
||||
<geographicflag>true</geographicflag>
|
||||
</spatialrefsys>
|
||||
</projectCrs>
|
||||
<layer-tree-group>
|
||||
<customproperties/>
|
||||
<layer-tree-layer patch_size="-1,-1" providerKey="ogr" legend_exp="" legend_split_behavior="0" source="./test_layer_wfs_cdata.geojson" expanded="1" id="test_layer_wfs_cdata_87717b19_220a_4b1f_929b_f235a2684e04" checked="Qt::Checked" name="test_layer_wfs_cdata_lines">
|
||||
<customproperties/>
|
||||
</layer-tree-layer>
|
||||
<custom-order enabled="0">
|
||||
<item>test_layer_wfs_cdata_87717b19_220a_4b1f_929b_f235a2684e04</item>
|
||||
</custom-order>
|
||||
</layer-tree-group>
|
||||
<snapping-settings enabled="0" scaleDependencyMode="0" maxScale="0" intersection-snapping="0" minScale="0" self-snapping="0" type="1" mode="2" tolerance="12" unit="1">
|
||||
<individual-layer-settings>
|
||||
<layer-setting enabled="0" id="test_layer_wfs_cdata_87717b19_220a_4b1f_929b_f235a2684e04" maxScale="0" units="1" minScale="0" type="1" tolerance="12"/>
|
||||
</individual-layer-settings>
|
||||
</snapping-settings>
|
||||
<relations/>
|
||||
<mapcanvas name="theMapCanvas" annotationsVisible="1">
|
||||
<units>degrees</units>
|
||||
<extent>
|
||||
<xmin>3.73648648648648551</xmin>
|
||||
<ymin>43.42950540540540061</ymin>
|
||||
<xmax>3.94648648648648637</xmax>
|
||||
<ymax>43.63950540540540857</ymax>
|
||||
</extent>
|
||||
<rotation>0</rotation>
|
||||
<destinationsrs>
|
||||
<spatialrefsys>
|
||||
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["unknown"],AREA["World"],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt>
|
||||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
|
||||
<srsid>3452</srsid>
|
||||
<srid>4326</srid>
|
||||
<authid>EPSG:4326</authid>
|
||||
<description>WGS 84</description>
|
||||
<projectionacronym>longlat</projectionacronym>
|
||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
||||
<geographicflag>true</geographicflag>
|
||||
</spatialrefsys>
|
||||
</destinationsrs>
|
||||
<rendermaptile>0</rendermaptile>
|
||||
<expressionContextScope/>
|
||||
</mapcanvas>
|
||||
<projectModels/>
|
||||
<legend updateDrawingOrder="true">
|
||||
<legendlayer drawingOrder="-1" showFeatureCount="0" checked="Qt::Checked" open="true" name="test_layer_wfs_cdata_lines">
|
||||
<filegroup hidden="false" open="true">
|
||||
<legendlayerfile isInOverview="0" layerid="test_layer_wfs_cdata_87717b19_220a_4b1f_929b_f235a2684e04" visible="1"/>
|
||||
</filegroup>
|
||||
</legendlayer>
|
||||
</legend>
|
||||
<mapViewDocks/>
|
||||
<mapViewDocks3D/>
|
||||
<mapcanvas name="mAreaCanvas" annotationsVisible="1">
|
||||
<units>degrees</units>
|
||||
<extent>
|
||||
<xmin>0</xmin>
|
||||
<ymin>0</ymin>
|
||||
<xmax>0</xmax>
|
||||
<ymax>0</ymax>
|
||||
</extent>
|
||||
<rotation>0</rotation>
|
||||
<destinationsrs>
|
||||
<spatialrefsys>
|
||||
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["unknown"],AREA["World"],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt>
|
||||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
|
||||
<srsid>3452</srsid>
|
||||
<srid>4326</srid>
|
||||
<authid>EPSG:4326</authid>
|
||||
<description>WGS 84</description>
|
||||
<projectionacronym>longlat</projectionacronym>
|
||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
||||
<geographicflag>true</geographicflag>
|
||||
</spatialrefsys>
|
||||
</destinationsrs>
|
||||
<rendermaptile>0</rendermaptile>
|
||||
<expressionContextScope/>
|
||||
</mapcanvas>
|
||||
<mapcanvas name="mAreaCanvas" annotationsVisible="1">
|
||||
<units>degrees</units>
|
||||
<extent>
|
||||
<xmin>0</xmin>
|
||||
<ymin>0</ymin>
|
||||
<xmax>0</xmax>
|
||||
<ymax>0</ymax>
|
||||
</extent>
|
||||
<rotation>0</rotation>
|
||||
<destinationsrs>
|
||||
<spatialrefsys>
|
||||
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["unknown"],AREA["World"],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt>
|
||||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
|
||||
<srsid>3452</srsid>
|
||||
<srid>4326</srid>
|
||||
<authid>EPSG:4326</authid>
|
||||
<description>WGS 84</description>
|
||||
<projectionacronym>longlat</projectionacronym>
|
||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
||||
<geographicflag>true</geographicflag>
|
||||
</spatialrefsys>
|
||||
</destinationsrs>
|
||||
<rendermaptile>0</rendermaptile>
|
||||
<expressionContextScope/>
|
||||
</mapcanvas>
|
||||
<mapcanvas name="mAreaCanvas" annotationsVisible="1">
|
||||
<units>degrees</units>
|
||||
<extent>
|
||||
<xmin>0</xmin>
|
||||
<ymin>0</ymin>
|
||||
<xmax>0</xmax>
|
||||
<ymax>0</ymax>
|
||||
</extent>
|
||||
<rotation>0</rotation>
|
||||
<destinationsrs>
|
||||
<spatialrefsys>
|
||||
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["unknown"],AREA["World"],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt>
|
||||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
|
||||
<srsid>3452</srsid>
|
||||
<srid>4326</srid>
|
||||
<authid>EPSG:4326</authid>
|
||||
<description>WGS 84</description>
|
||||
<projectionacronym>longlat</projectionacronym>
|
||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
||||
<geographicflag>true</geographicflag>
|
||||
</spatialrefsys>
|
||||
</destinationsrs>
|
||||
<rendermaptile>0</rendermaptile>
|
||||
<expressionContextScope/>
|
||||
</mapcanvas>
|
||||
<main-annotation-layer refreshOnNotifyMessage="" refreshOnNotifyEnabled="0" autoRefreshTime="0" autoRefreshEnabled="0" type="annotation">
|
||||
<id>Annotations_2b1f373f_e430_478b_8daf_29bbfec5b911</id>
|
||||
<datasource></datasource>
|
||||
<keywordList>
|
||||
<value></value>
|
||||
</keywordList>
|
||||
<layername>Annotations</layername>
|
||||
<srs>
|
||||
<spatialrefsys>
|
||||
<wkt></wkt>
|
||||
<proj4></proj4>
|
||||
<srsid>0</srsid>
|
||||
<srid>0</srid>
|
||||
<authid></authid>
|
||||
<description></description>
|
||||
<projectionacronym></projectionacronym>
|
||||
<ellipsoidacronym></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>
|
||||
<wkt></wkt>
|
||||
<proj4></proj4>
|
||||
<srsid>0</srsid>
|
||||
<srid>0</srid>
|
||||
<authid></authid>
|
||||
<description></description>
|
||||
<projectionacronym></projectionacronym>
|
||||
<ellipsoidacronym></ellipsoidacronym>
|
||||
<geographicflag>false</geographicflag>
|
||||
</spatialrefsys>
|
||||
</crs>
|
||||
<extent/>
|
||||
</resourceMetadata>
|
||||
<items/>
|
||||
<layerOpacity>1</layerOpacity>
|
||||
</main-annotation-layer>
|
||||
<projectlayers>
|
||||
<maplayer styleCategories="AllStyleCategories" refreshOnNotifyEnabled="0" type="vector" simplifyDrawingTol="1" simplifyAlgorithm="0" simplifyLocal="1" autoRefreshTime="0" labelsEnabled="1" minScale="100000000" geometry="Line" simplifyMaxScale="1" autoRefreshEnabled="0" simplifyDrawingHints="1" readOnly="0" wkbType="LineString" refreshOnNotifyMessage="" maxScale="0" hasScaleBasedVisibilityFlag="0">
|
||||
<extent>
|
||||
<xmin>3.79999999999999982</xmin>
|
||||
<ymin>43.5</ymin>
|
||||
<xmax>3.89999999999999991</xmax>
|
||||
<ymax>43.60000000000000142</ymax>
|
||||
</extent>
|
||||
<id>test_layer_wfs_cdata_87717b19_220a_4b1f_929b_f235a2684e04</id>
|
||||
<datasource>./test_layer_wfs_cdata.geojson</datasource>
|
||||
<keywordList>
|
||||
<value></value>
|
||||
</keywordList>
|
||||
<layername>test_layer_wfs_cdata_lines</layername>
|
||||
<srs>
|
||||
<spatialrefsys>
|
||||
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["unknown"],AREA["World"],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt>
|
||||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
|
||||
<srsid>3452</srsid>
|
||||
<srid>4326</srid>
|
||||
<authid>EPSG:4326</authid>
|
||||
<description>WGS 84</description>
|
||||
<projectionacronym>longlat</projectionacronym>
|
||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
||||
<geographicflag>true</geographicflag>
|
||||
</spatialrefsys>
|
||||
</srs>
|
||||
<resourceMetadata>
|
||||
<identifier></identifier>
|
||||
<parentidentifier></parentidentifier>
|
||||
<language></language>
|
||||
<type>dataset</type>
|
||||
<title></title>
|
||||
<abstract></abstract>
|
||||
<contact>
|
||||
<name></name>
|
||||
<organization></organization>
|
||||
<position></position>
|
||||
<voice></voice>
|
||||
<fax></fax>
|
||||
<email></email>
|
||||
<role></role>
|
||||
</contact>
|
||||
<links/>
|
||||
<fees></fees>
|
||||
<encoding></encoding>
|
||||
<crs>
|
||||
<spatialrefsys>
|
||||
<wkt></wkt>
|
||||
<proj4></proj4>
|
||||
<srsid>0</srsid>
|
||||
<srid>0</srid>
|
||||
<authid></authid>
|
||||
<description></description>
|
||||
<projectionacronym></projectionacronym>
|
||||
<ellipsoidacronym></ellipsoidacronym>
|
||||
<geographicflag>false</geographicflag>
|
||||
</spatialrefsys>
|
||||
</crs>
|
||||
<extent>
|
||||
<spatial miny="0" maxz="0" minx="0" dimensions="2" maxy="0" minz="0" crs="" maxx="0"/>
|
||||
<temporal>
|
||||
<period>
|
||||
<start></start>
|
||||
<end></end>
|
||||
</period>
|
||||
</temporal>
|
||||
</extent>
|
||||
</resourceMetadata>
|
||||
<provider encoding="UTF-8">ogr</provider>
|
||||
<vectorjoins/>
|
||||
<layerDependencies/>
|
||||
<dataDependencies/>
|
||||
<expressionfields/>
|
||||
<map-layer-style-manager current="défaut">
|
||||
<map-layer-style name="défaut"/>
|
||||
</map-layer-style-manager>
|
||||
<auxiliaryLayer/>
|
||||
<flags>
|
||||
<Identifiable>1</Identifiable>
|
||||
<Removable>1</Removable>
|
||||
<Searchable>1</Searchable>
|
||||
</flags>
|
||||
<temporal startExpression="" endExpression="" fixedDuration="0" enabled="0" durationUnit="min" accumulate="0" durationField="" startField="" mode="0" endField="">
|
||||
<fixedRange>
|
||||
<start></start>
|
||||
<end></end>
|
||||
</fixedRange>
|
||||
</temporal>
|
||||
<renderer-v2 enableorderby="0" forceraster="0" symbollevels="0" type="singleSymbol">
|
||||
<symbols>
|
||||
<symbol alpha="1" type="line" name="0" force_rhr="0" clip_to_extent="1">
|
||||
<layer class="SimpleLine" enabled="1" locked="0" pass="0">
|
||||
<prop v="0" k="align_dash_pattern"/>
|
||||
<prop v="square" k="capstyle"/>
|
||||
<prop v="5;2" k="customdash"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="customdash_map_unit_scale"/>
|
||||
<prop v="MM" k="customdash_unit"/>
|
||||
<prop v="0" k="dash_pattern_offset"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="dash_pattern_offset_map_unit_scale"/>
|
||||
<prop v="MM" k="dash_pattern_offset_unit"/>
|
||||
<prop v="0" k="draw_inside_polygon"/>
|
||||
<prop v="bevel" k="joinstyle"/>
|
||||
<prop v="141,90,153,255" k="line_color"/>
|
||||
<prop v="solid" k="line_style"/>
|
||||
<prop v="0.26" k="line_width"/>
|
||||
<prop v="MM" k="line_width_unit"/>
|
||||
<prop v="0" k="offset"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
|
||||
<prop v="MM" k="offset_unit"/>
|
||||
<prop v="0" k="ring_filter"/>
|
||||
<prop v="0" k="tweak_dash_pattern_on_corners"/>
|
||||
<prop v="0" k="use_custom_dash"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="width_map_unit_scale"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option value="" type="QString" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option value="collection" type="QString" name="type"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
</symbols>
|
||||
<rotation/>
|
||||
<sizescale/>
|
||||
</renderer-v2>
|
||||
<labeling type="simple">
|
||||
<settings calloutType="simple">
|
||||
<text-style fontStrikeout="0" fieldName="concat("name", ' ', "comment")" fontLetterSpacing="0" textOrientation="horizontal" textColor="0,0,0,255" fontSize="10" fontItalic="0" namedStyle="Regular" useSubstitutions="0" capitalization="0" fontWordSpacing="0" fontWeight="50" allowHtml="0" fontFamily="Ubuntu" fontSizeUnit="Point" previewBkgrdColor="255,255,255,255" fontSizeMapUnitScale="3x:0,0,0,0,0,0" fontUnderline="0" blendMode="0" multilineHeight="1" textOpacity="1" fontKerning="1" isExpression="1">
|
||||
<text-buffer bufferNoFill="1" bufferDraw="0" bufferSize="1" bufferColor="255,255,255,255" bufferSizeUnits="MM" bufferJoinStyle="128" bufferBlendMode="0" bufferOpacity="1" bufferSizeMapUnitScale="3x:0,0,0,0,0,0"/>
|
||||
<text-mask maskJoinStyle="128" maskSize="1.5" maskType="0" maskSizeMapUnitScale="3x:0,0,0,0,0,0" maskEnabled="0" maskSizeUnits="MM" maskedSymbolLayers="" maskOpacity="1"/>
|
||||
<background shapeJoinStyle="64" shapeBlendMode="0" shapeRadiiX="0" shapeOffsetUnit="MM" shapeRotation="0" shapeType="0" shapeOpacity="1" shapeSizeMapUnitScale="3x:0,0,0,0,0,0" shapeBorderWidthMapUnitScale="3x:0,0,0,0,0,0" shapeSizeType="0" shapeRadiiMapUnitScale="3x:0,0,0,0,0,0" shapeFillColor="255,255,255,255" shapeSizeY="0" shapeRadiiUnit="MM" shapeBorderWidth="0" shapeRadiiY="0" shapeBorderColor="128,128,128,255" shapeSVGFile="" shapeSizeX="0" shapeBorderWidthUnit="MM" shapeOffsetX="0" shapeSizeUnit="MM" shapeRotationType="0" shapeDraw="0" shapeOffsetY="0" shapeOffsetMapUnitScale="3x:0,0,0,0,0,0">
|
||||
<symbol alpha="1" type="marker" name="markerSymbol" force_rhr="0" clip_to_extent="1">
|
||||
<layer class="SimpleMarker" enabled="1" locked="0" pass="0">
|
||||
<prop v="0" k="angle"/>
|
||||
<prop v="243,166,178,255" k="color"/>
|
||||
<prop v="1" k="horizontal_anchor_point"/>
|
||||
<prop v="bevel" k="joinstyle"/>
|
||||
<prop v="circle" k="name"/>
|
||||
<prop v="0,0" k="offset"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
|
||||
<prop v="MM" k="offset_unit"/>
|
||||
<prop v="35,35,35,255" k="outline_color"/>
|
||||
<prop v="solid" k="outline_style"/>
|
||||
<prop v="0" k="outline_width"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
|
||||
<prop v="MM" k="outline_width_unit"/>
|
||||
<prop v="diameter" k="scale_method"/>
|
||||
<prop v="2" k="size"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
|
||||
<prop v="MM" k="size_unit"/>
|
||||
<prop v="1" k="vertical_anchor_point"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option value="" type="QString" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option value="collection" type="QString" name="type"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
</background>
|
||||
<shadow shadowDraw="0" shadowOffsetDist="1" shadowOffsetUnit="MM" shadowBlendMode="6" shadowOffsetGlobal="1" shadowRadius="1.5" shadowOffsetMapUnitScale="3x:0,0,0,0,0,0" shadowScale="100" shadowRadiusUnit="MM" shadowOpacity="0.7" shadowRadiusAlphaOnly="0" shadowOffsetAngle="135" shadowColor="0,0,0,255" shadowUnder="0" shadowRadiusMapUnitScale="3x:0,0,0,0,0,0"/>
|
||||
<dd_properties>
|
||||
<Option type="Map">
|
||||
<Option value="" type="QString" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option value="collection" type="QString" name="type"/>
|
||||
</Option>
|
||||
</dd_properties>
|
||||
<substitutions/>
|
||||
</text-style>
|
||||
<text-format multilineAlign="0" addDirectionSymbol="0" wrapChar="" formatNumbers="0" leftDirectionSymbol="<" placeDirectionSymbol="0" plussign="0" reverseDirectionSymbol="0" useMaxLineLengthForAutoWrap="1" decimals="3" autoWrapLength="0" rightDirectionSymbol=">"/>
|
||||
<placement centroidInside="0" centroidWhole="0" priority="5" overrunDistanceMapUnitScale="3x:0,0,0,0,0,0" lineAnchorPercent="0.5" distUnits="MM" geometryGeneratorEnabled="0" maxCurvedCharAngleOut="-25" quadOffset="4" maxCurvedCharAngleIn="25" repeatDistanceMapUnitScale="3x:0,0,0,0,0,0" distMapUnitScale="3x:0,0,0,0,0,0" dist="0" yOffset="0" labelOffsetMapUnitScale="3x:0,0,0,0,0,0" polygonPlacementFlags="2" preserveRotation="1" fitInPolygonOnly="0" repeatDistanceUnits="MM" xOffset="0" overrunDistance="0" lineAnchorType="0" geometryGenerator="" predefinedPositionOrder="TR,TL,BR,BL,R,L,TSR,BSR" overrunDistanceUnit="MM" offsetType="0" repeatDistance="0" placement="2" layerType="LineGeometry" rotationAngle="0" offsetUnits="MM" placementFlags="10" geometryGeneratorType="PointGeometry"/>
|
||||
<rendering zIndex="0" limitNumLabels="0" obstacleFactor="1" drawLabels="1" scaleVisibility="0" maxNumLabels="2000" labelPerPart="0" scaleMin="0" scaleMax="0" mergeLines="0" fontMaxPixelSize="10000" obstacleType="1" displayAll="0" fontLimitPixelSize="0" obstacle="1" minFeatureSize="0" fontMinPixelSize="3" upsidedownLabels="0"/>
|
||||
<dd_properties>
|
||||
<Option type="Map">
|
||||
<Option value="" type="QString" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option value="collection" type="QString" name="type"/>
|
||||
</Option>
|
||||
</dd_properties>
|
||||
<callout type="simple">
|
||||
<Option type="Map">
|
||||
<Option value="pole_of_inaccessibility" type="QString" name="anchorPoint"/>
|
||||
<Option type="Map" name="ddProperties">
|
||||
<Option value="" type="QString" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option value="collection" type="QString" name="type"/>
|
||||
</Option>
|
||||
<Option value="false" type="bool" name="drawToAllParts"/>
|
||||
<Option value="0" type="QString" name="enabled"/>
|
||||
<Option value="point_on_exterior" type="QString" name="labelAnchorPoint"/>
|
||||
<Option value="<symbol alpha="1" type="line" name="symbol" force_rhr="0" clip_to_extent="1"><layer class="SimpleLine" enabled="1" locked="0" pass="0"><prop v="0" k="align_dash_pattern"/><prop v="square" k="capstyle"/><prop v="5;2" k="customdash"/><prop v="3x:0,0,0,0,0,0" k="customdash_map_unit_scale"/><prop v="MM" k="customdash_unit"/><prop v="0" k="dash_pattern_offset"/><prop v="3x:0,0,0,0,0,0" k="dash_pattern_offset_map_unit_scale"/><prop v="MM" k="dash_pattern_offset_unit"/><prop v="0" k="draw_inside_polygon"/><prop v="bevel" k="joinstyle"/><prop v="60,60,60,255" k="line_color"/><prop v="solid" k="line_style"/><prop v="0.3" k="line_width"/><prop v="MM" k="line_width_unit"/><prop v="0" k="offset"/><prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/><prop v="MM" k="offset_unit"/><prop v="0" k="ring_filter"/><prop v="0" k="tweak_dash_pattern_on_corners"/><prop v="0" k="use_custom_dash"/><prop v="3x:0,0,0,0,0,0" k="width_map_unit_scale"/><data_defined_properties><Option type="Map"><Option value="" type="QString" name="name"/><Option name="properties"/><Option value="collection" type="QString" name="type"/></Option></data_defined_properties></layer></symbol>" type="QString" name="lineSymbol"/>
|
||||
<Option value="0" type="double" name="minLength"/>
|
||||
<Option value="3x:0,0,0,0,0,0" type="QString" name="minLengthMapUnitScale"/>
|
||||
<Option value="MM" type="QString" name="minLengthUnit"/>
|
||||
<Option value="0" type="double" name="offsetFromAnchor"/>
|
||||
<Option value="3x:0,0,0,0,0,0" type="QString" name="offsetFromAnchorMapUnitScale"/>
|
||||
<Option value="MM" type="QString" name="offsetFromAnchorUnit"/>
|
||||
<Option value="0" type="double" name="offsetFromLabel"/>
|
||||
<Option value="3x:0,0,0,0,0,0" type="QString" name="offsetFromLabelMapUnitScale"/>
|
||||
<Option value="MM" type="QString" name="offsetFromLabelUnit"/>
|
||||
</Option>
|
||||
</callout>
|
||||
</settings>
|
||||
</labeling>
|
||||
<customproperties>
|
||||
<property key="dualview/previewExpressions">
|
||||
<value>"name"</value>
|
||||
</property>
|
||||
<property value="0" key="embeddedWidgets/count"/>
|
||||
<property key="variableNames"/>
|
||||
<property key="variableValues"/>
|
||||
</customproperties>
|
||||
<blendMode>0</blendMode>
|
||||
<featureBlendMode>0</featureBlendMode>
|
||||
<layerOpacity>1</layerOpacity>
|
||||
<SingleCategoryDiagramRenderer attributeLegend="1" diagramType="Histogram">
|
||||
<DiagramCategory minimumSize="0" showAxis="1" enabled="0" maxScaleDenominator="1e+08" backgroundAlpha="255" barWidth="5" backgroundColor="#ffffff" minScaleDenominator="0" width="15" height="15" direction="0" spacing="5" lineSizeType="MM" penWidth="0" lineSizeScale="3x:0,0,0,0,0,0" scaleBasedVisibility="0" sizeType="MM" spacingUnitScale="3x:0,0,0,0,0,0" rotationOffset="270" diagramOrientation="Up" penAlpha="255" penColor="#000000" labelPlacementMethod="XHeight" scaleDependency="Area" sizeScale="3x:0,0,0,0,0,0" opacity="1" spacingUnit="MM">
|
||||
<fontProperties description="Ubuntu,11,-1,5,50,0,0,0,0,0" style=""/>
|
||||
<axisSymbol>
|
||||
<symbol alpha="1" type="line" name="" force_rhr="0" clip_to_extent="1">
|
||||
<layer class="SimpleLine" enabled="1" locked="0" pass="0">
|
||||
<prop v="0" k="align_dash_pattern"/>
|
||||
<prop v="square" k="capstyle"/>
|
||||
<prop v="5;2" k="customdash"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="customdash_map_unit_scale"/>
|
||||
<prop v="MM" k="customdash_unit"/>
|
||||
<prop v="0" k="dash_pattern_offset"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="dash_pattern_offset_map_unit_scale"/>
|
||||
<prop v="MM" k="dash_pattern_offset_unit"/>
|
||||
<prop v="0" k="draw_inside_polygon"/>
|
||||
<prop v="bevel" k="joinstyle"/>
|
||||
<prop v="35,35,35,255" k="line_color"/>
|
||||
<prop v="solid" k="line_style"/>
|
||||
<prop v="0.26" k="line_width"/>
|
||||
<prop v="MM" k="line_width_unit"/>
|
||||
<prop v="0" k="offset"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
|
||||
<prop v="MM" k="offset_unit"/>
|
||||
<prop v="0" k="ring_filter"/>
|
||||
<prop v="0" k="tweak_dash_pattern_on_corners"/>
|
||||
<prop v="0" k="use_custom_dash"/>
|
||||
<prop v="3x:0,0,0,0,0,0" k="width_map_unit_scale"/>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option value="" type="QString" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option value="collection" type="QString" name="type"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
</axisSymbol>
|
||||
</DiagramCategory>
|
||||
</SingleCategoryDiagramRenderer>
|
||||
<DiagramLayerSettings showAll="1" dist="0" placement="2" linePlacementFlags="18" zIndex="0" obstacle="0" priority="0">
|
||||
<properties>
|
||||
<Option type="Map">
|
||||
<Option value="" type="QString" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option value="collection" type="QString" name="type"/>
|
||||
</Option>
|
||||
</properties>
|
||||
</DiagramLayerSettings>
|
||||
<geometryOptions removeDuplicateNodes="0" geometryPrecision="0">
|
||||
<activeChecks/>
|
||||
<checkConfiguration/>
|
||||
</geometryOptions>
|
||||
<legend type="default-vector"/>
|
||||
<referencedLayers/>
|
||||
<fieldConfiguration>
|
||||
<field configurationFlags="None" name="id">
|
||||
<editWidget type="Range">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field configurationFlags="None" name="name">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field configurationFlags="None" name="comment">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option/>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
</fieldConfiguration>
|
||||
<aliases>
|
||||
<alias field="id" name="" index="0"/>
|
||||
<alias field="name" name="" index="1"/>
|
||||
<alias field="comment" name="" index="2"/>
|
||||
</aliases>
|
||||
<defaults>
|
||||
<default expression="" applyOnUpdate="0" field="id"/>
|
||||
<default expression="" applyOnUpdate="0" field="name"/>
|
||||
<default expression="" applyOnUpdate="0" field="comment"/>
|
||||
</defaults>
|
||||
<constraints>
|
||||
<constraint constraints="0" unique_strength="0" notnull_strength="0" field="id" exp_strength="0"/>
|
||||
<constraint constraints="0" unique_strength="0" notnull_strength="0" field="name" exp_strength="0"/>
|
||||
<constraint constraints="0" unique_strength="0" notnull_strength="0" field="comment" exp_strength="0"/>
|
||||
</constraints>
|
||||
<constraintExpressions>
|
||||
<constraint exp="" desc="" field="id"/>
|
||||
<constraint exp="" desc="" field="name"/>
|
||||
<constraint exp="" desc="" field="comment"/>
|
||||
</constraintExpressions>
|
||||
<expressionfields/>
|
||||
<attributeactions>
|
||||
<defaultAction value="{00000000-0000-0000-0000-000000000000}" key="Canvas"/>
|
||||
</attributeactions>
|
||||
<attributetableconfig sortExpression="" sortOrder="0" actionWidgetStyle="dropDown">
|
||||
<columns>
|
||||
<column hidden="0" width="-1" type="field" name="id"/>
|
||||
<column hidden="0" width="-1" type="field" name="name"/>
|
||||
<column hidden="0" width="-1" type="field" name="comment"/>
|
||||
<column hidden="1" width="-1" type="actions"/>
|
||||
</columns>
|
||||
</attributetableconfig>
|
||||
<conditionalstyles>
|
||||
<rowstyles/>
|
||||
<fieldstyles/>
|
||||
</conditionalstyles>
|
||||
<storedexpressions/>
|
||||
<editform tolerant="1"></editform>
|
||||
<editforminit/>
|
||||
<editforminitcodesource>0</editforminitcodesource>
|
||||
<editforminitfilepath></editforminitfilepath>
|
||||
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire.
|
||||
|
||||
Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires.
|
||||
|
||||
Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python".
|
||||
Voici un exemple à suivre:
|
||||
"""
|
||||
from qgis.PyQt.QtWidgets import QWidget
|
||||
|
||||
def my_form_open(dialog, layer, feature):
|
||||
geom = feature.geometry()
|
||||
control = dialog.findChild(QWidget, "MyLineEdit")
|
||||
|
||||
]]></editforminitcode>
|
||||
<featformsuppress>0</featformsuppress>
|
||||
<editorlayout>generatedlayout</editorlayout>
|
||||
<editable>
|
||||
<field editable="1" name="comment"/>
|
||||
<field editable="1" name="id"/>
|
||||
<field editable="1" name="name"/>
|
||||
</editable>
|
||||
<labelOnTop>
|
||||
<field name="comment" labelOnTop="0"/>
|
||||
<field name="id" labelOnTop="0"/>
|
||||
<field name="name" labelOnTop="0"/>
|
||||
</labelOnTop>
|
||||
<dataDefinedFieldProperties/>
|
||||
<widgets/>
|
||||
<previewExpression>"name"</previewExpression>
|
||||
<mapTip></mapTip>
|
||||
</maplayer>
|
||||
</projectlayers>
|
||||
<layerorder>
|
||||
<layer id="test_layer_wfs_cdata_87717b19_220a_4b1f_929b_f235a2684e04"/>
|
||||
</layerorder>
|
||||
<properties>
|
||||
<DefaultStyles>
|
||||
<ColorRamp type="QString"></ColorRamp>
|
||||
<Fill type="QString"></Fill>
|
||||
<Line type="QString"></Line>
|
||||
<Marker type="QString"></Marker>
|
||||
<Opacity type="double">1</Opacity>
|
||||
<RandomColors type="bool">true</RandomColors>
|
||||
</DefaultStyles>
|
||||
<Digitizing>
|
||||
<AvoidIntersectionsMode type="int">0</AvoidIntersectionsMode>
|
||||
</Digitizing>
|
||||
<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>
|
||||
<Macros>
|
||||
<pythonCode type="QString"></pythonCode>
|
||||
</Macros>
|
||||
<Measure>
|
||||
<Ellipsoid type="QString">EPSG:7030</Ellipsoid>
|
||||
</Measure>
|
||||
<Measurement>
|
||||
<AreaUnits type="QString">m2</AreaUnits>
|
||||
<DistanceUnits type="QString">meters</DistanceUnits>
|
||||
</Measurement>
|
||||
<PAL>
|
||||
<CandidatesLinePerCM type="double">5</CandidatesLinePerCM>
|
||||
<CandidatesPolygonPerCM type="double">2.5</CandidatesPolygonPerCM>
|
||||
<DrawRectOnly type="bool">false</DrawRectOnly>
|
||||
<DrawUnplaced type="bool">false</DrawUnplaced>
|
||||
<PlacementEngineVersion type="int">1</PlacementEngineVersion>
|
||||
<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>
|
||||
<DegreeFormat type="QString">MU</DegreeFormat>
|
||||
</PositionPrecision>
|
||||
<SpatialRefSys>
|
||||
<ProjectionsEnabled type="int">1</ProjectionsEnabled>
|
||||
</SpatialRefSys>
|
||||
<WCSLayers type="QStringList"/>
|
||||
<WCSUrl type="QString"></WCSUrl>
|
||||
<WFSLayers type="QStringList">
|
||||
<value>test_layer_wfs_cdata_87717b19_220a_4b1f_929b_f235a2684e04</value>
|
||||
</WFSLayers>
|
||||
<WFSLayersPrecision>
|
||||
<test_layer_wfs_cdata_87717b19_220a_4b1f_929b_f235a2684e04 type="int">8</test_layer_wfs_cdata_87717b19_220a_4b1f_929b_f235a2684e04>
|
||||
</WFSLayersPrecision>
|
||||
<WFSTLayers>
|
||||
<Delete type="QStringList"/>
|
||||
<Insert type="QStringList"/>
|
||||
<Update type="QStringList"/>
|
||||
</WFSTLayers>
|
||||
<WFSUrl type="QString"></WFSUrl>
|
||||
<WMSAccessConstraints type="QString">None</WMSAccessConstraints>
|
||||
<WMSAddWktGeometry type="bool">false</WMSAddWktGeometry>
|
||||
<WMSContactMail type="QString"></WMSContactMail>
|
||||
<WMSContactOrganization type="QString"></WMSContactOrganization>
|
||||
<WMSContactPerson type="QString"></WMSContactPerson>
|
||||
<WMSContactPhone type="QString"></WMSContactPhone>
|
||||
<WMSContactPosition type="QString"></WMSContactPosition>
|
||||
<WMSDefaultMapUnitsPerMm type="double">1</WMSDefaultMapUnitsPerMm>
|
||||
<WMSFees type="QString">conditions unknown</WMSFees>
|
||||
<WMSImageQuality type="int">90</WMSImageQuality>
|
||||
<WMSKeywordList type="QStringList">
|
||||
<value></value>
|
||||
</WMSKeywordList>
|
||||
<WMSMaxAtlasFeatures type="int">1</WMSMaxAtlasFeatures>
|
||||
<WMSOnlineResource type="QString"></WMSOnlineResource>
|
||||
<WMSPrecision type="QString">8</WMSPrecision>
|
||||
<WMSRootName type="QString">testcdata</WMSRootName>
|
||||
<WMSSegmentizeFeatureInfoGeometry type="bool">false</WMSSegmentizeFeatureInfoGeometry>
|
||||
<WMSServiceAbstract type="QString"></WMSServiceAbstract>
|
||||
<WMSServiceCapabilities type="bool">true</WMSServiceCapabilities>
|
||||
<WMSServiceTitle type="QString"></WMSServiceTitle>
|
||||
<WMSTileBuffer type="int">0</WMSTileBuffer>
|
||||
<WMSUrl type="QString"></WMSUrl>
|
||||
<WMSUseLayerIDs type="bool">false</WMSUseLayerIDs>
|
||||
<WMTSGrids>
|
||||
<CRS type="QStringList"/>
|
||||
<Config type="QStringList"/>
|
||||
</WMTSGrids>
|
||||
<WMTSJpegLayers>
|
||||
<Group type="QStringList"/>
|
||||
<Layer type="QStringList"/>
|
||||
<Project type="bool">false</Project>
|
||||
</WMTSJpegLayers>
|
||||
<WMTSLayers>
|
||||
<Group type="QStringList"/>
|
||||
<Layer type="QStringList"/>
|
||||
<Project type="bool">false</Project>
|
||||
</WMTSLayers>
|
||||
<WMTSMinScale type="int">5000</WMTSMinScale>
|
||||
<WMTSPngLayers>
|
||||
<Group type="QStringList"/>
|
||||
<Layer type="QStringList"/>
|
||||
<Project type="bool">false</Project>
|
||||
</WMTSPngLayers>
|
||||
<WMTSUrl type="QString"></WMTSUrl>
|
||||
</properties>
|
||||
<dataDefinedServerProperties>
|
||||
<Option type="Map">
|
||||
<Option value="" type="QString" name="name"/>
|
||||
<Option name="properties"/>
|
||||
<Option value="collection" type="QString" name="type"/>
|
||||
</Option>
|
||||
</dataDefinedServerProperties>
|
||||
<visibility-presets/>
|
||||
<transformContext/>
|
||||
<projectMetadata>
|
||||
<identifier></identifier>
|
||||
<parentidentifier></parentidentifier>
|
||||
<language></language>
|
||||
<type></type>
|
||||
<title></title>
|
||||
<abstract></abstract>
|
||||
<contact>
|
||||
<name></name>
|
||||
<organization></organization>
|
||||
<position></position>
|
||||
<voice></voice>
|
||||
<fax></fax>
|
||||
<email></email>
|
||||
<role></role>
|
||||
</contact>
|
||||
<links/>
|
||||
<author>Etienne Trimaille</author>
|
||||
<creation>2022-03-09T13:39:55</creation>
|
||||
</projectMetadata>
|
||||
<Annotations/>
|
||||
<Layouts/>
|
||||
<Bookmarks/>
|
||||
<ProjectViewSettings UseProjectScales="0">
|
||||
<Scales/>
|
||||
<DefaultViewExtent ymin="43.42950540540540061" xmax="3.96317297297297699" ymax="43.63950540540540857" xmin="3.71979999999999489">
|
||||
<spatialrefsys>
|
||||
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["unknown"],AREA["World"],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt>
|
||||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
|
||||
<srsid>3452</srsid>
|
||||
<srid>4326</srid>
|
||||
<authid>EPSG:4326</authid>
|
||||
<description>WGS 84</description>
|
||||
<projectionacronym>longlat</projectionacronym>
|
||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
||||
<geographicflag>true</geographicflag>
|
||||
</spatialrefsys>
|
||||
</DefaultViewExtent>
|
||||
</ProjectViewSettings>
|
||||
<ProjectTimeSettings timeStep="1" timeStepUnit="h" cumulativeTemporalRange="0" frameRate="1"/>
|
||||
<ProjectDisplaySettings>
|
||||
<BearingFormat id="bearing">
|
||||
<Option type="Map">
|
||||
<Option value="" type="QChar" name="decimal_separator"/>
|
||||
<Option value="6" type="int" name="decimals"/>
|
||||
<Option value="0" type="int" name="direction_format"/>
|
||||
<Option value="0" type="int" name="rounding_type"/>
|
||||
<Option value="false" type="bool" name="show_plus"/>
|
||||
<Option value="true" type="bool" name="show_thousand_separator"/>
|
||||
<Option value="false" type="bool" name="show_trailing_zeros"/>
|
||||
<Option value="" type="QChar" name="thousand_separator"/>
|
||||
</Option>
|
||||
</BearingFormat>
|
||||
</ProjectDisplaySettings>
|
||||
</qgis>
|
94
tests/testdata/qgis_server/wfs_getfeature_cdata_1_0_0.txt
vendored
Normal file
94
tests/testdata/qgis_server/wfs_getfeature_cdata_1_0_0.txt
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
Content-Type: text/xml; subtype=gml/2.1.2; charset=utf-8
|
||||
|
||||
<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 ?">
|
||||
<gml:boundedBy>
|
||||
<gml:Box srsName="EPSG:4326">
|
||||
<gml:coordinates cs="," ts=" ">3.8,43.5 3.9,43.6</gml:coordinates>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
<gml:featureMember>
|
||||
<qgs:test_layer_wfs_cdata_lines fid="test_layer_wfs_cdata_lines.1">
|
||||
<gml:boundedBy>
|
||||
<gml:Box srsName="EPSG:4326">
|
||||
<gml:coordinates cs="," ts=" ">3.8,43.5 3.8,43.6</gml:coordinates>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
<qgs:geometry>
|
||||
<LineString xmlns="http://www.opengis.net/gml" srsName="EPSG:4326">
|
||||
<coordinates xmlns="http://www.opengis.net/gml" cs="," ts=" ">3.8,43.5 3.8,43.6</coordinates>
|
||||
</LineString>
|
||||
</qgs:geometry>
|
||||
<qgs:id>1</qgs:id>
|
||||
<qgs:name>éù%@ > 1</qgs:name>
|
||||
<qgs:comment>Accents, sup</qgs:comment>
|
||||
</qgs:test_layer_wfs_cdata_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<qgs:test_layer_wfs_cdata_lines fid="test_layer_wfs_cdata_lines.2">
|
||||
<gml:boundedBy>
|
||||
<gml:Box srsName="EPSG:4326">
|
||||
<gml:coordinates cs="," ts=" ">3.8,43.6 3.9,43.6</gml:coordinates>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
<qgs:geometry>
|
||||
<LineString xmlns="http://www.opengis.net/gml" srsName="EPSG:4326">
|
||||
<coordinates xmlns="http://www.opengis.net/gml" cs="," ts=" ">3.8,43.6 3.9,43.6</coordinates>
|
||||
</LineString>
|
||||
</qgs:geometry>
|
||||
<qgs:id>2</qgs:id>
|
||||
<qgs:name>Line > 2</qgs:name>
|
||||
<qgs:comment>Normal, sup</qgs:comment>
|
||||
</qgs:test_layer_wfs_cdata_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<qgs:test_layer_wfs_cdata_lines fid="test_layer_wfs_cdata_lines.3">
|
||||
<gml:boundedBy>
|
||||
<gml:Box srsName="EPSG:4326">
|
||||
<gml:coordinates cs="," ts=" ">3.9,43.5 3.9,43.6</gml:coordinates>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
<qgs:geometry>
|
||||
<LineString xmlns="http://www.opengis.net/gml" srsName="EPSG:4326">
|
||||
<coordinates xmlns="http://www.opengis.net/gml" cs="," ts=" ">3.9,43.6 3.9,43.5</coordinates>
|
||||
</LineString>
|
||||
</qgs:geometry>
|
||||
<qgs:id>3</qgs:id>
|
||||
<qgs:name><![CDATA[Line < 3]]></qgs:name>
|
||||
<qgs:comment>Normal, inf</qgs:comment>
|
||||
</qgs:test_layer_wfs_cdata_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<qgs:test_layer_wfs_cdata_lines fid="test_layer_wfs_cdata_lines.4">
|
||||
<gml:boundedBy>
|
||||
<gml:Box srsName="EPSG:4326">
|
||||
<gml:coordinates cs="," ts=" ">3.8,43.5 3.9,43.5</gml:coordinates>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
<qgs:geometry>
|
||||
<LineString xmlns="http://www.opengis.net/gml" srsName="EPSG:4326">
|
||||
<coordinates xmlns="http://www.opengis.net/gml" cs="," ts=" ">3.9,43.5 3.8,43.5</coordinates>
|
||||
</LineString>
|
||||
</qgs:geometry>
|
||||
<qgs:id>4</qgs:id>
|
||||
<qgs:name>05200</qgs:name>
|
||||
<qgs:comment>Trailing 0</qgs:comment>
|
||||
</qgs:test_layer_wfs_cdata_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<qgs:test_layer_wfs_cdata_lines fid="test_layer_wfs_cdata_lines.5">
|
||||
<gml:boundedBy>
|
||||
<gml:Box srsName="EPSG:4326">
|
||||
<gml:coordinates cs="," ts=" ">3.8,43.5 3.9,43.6</gml:coordinates>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
<qgs:geometry>
|
||||
<LineString xmlns="http://www.opengis.net/gml" srsName="EPSG:4326">
|
||||
<coordinates xmlns="http://www.opengis.net/gml" cs="," ts=" ">3.8,43.5 3.9,43.6</coordinates>
|
||||
</LineString>
|
||||
</qgs:geometry>
|
||||
<qgs:id>5</qgs:id>
|
||||
<qgs:name><![CDATA[Line & 2]]></qgs:name>
|
||||
<qgs:comment>And sign</qgs:comment>
|
||||
</qgs:test_layer_wfs_cdata_lines>
|
||||
</gml:featureMember>
|
||||
</wfs:FeatureCollection>
|
Loading…
x
Reference in New Issue
Block a user