Skip to content

Commit

Permalink
[processing] fix execute sql test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Oct 11, 2017
1 parent 4ac442f commit 79c26c3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 25 deletions.
Expand Up @@ -12,11 +12,11 @@
</gml:boundedBy>

<gml:featureMember>
<ogr:execute_sql fid="polys.5">
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:4326"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>3,2 6,1 6,-3 2,-1 2,2 3,2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
<ogr:polys2 fid="polys.5">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>3,2 6,1 6,-3 2,-1 2,2 3,2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:name>elim</ogr:name>
<ogr:intval>2</ogr:intval>
<ogr:floatval>3.330000000000000</ogr:floatval>
</ogr:execute_sql>
<ogr:floatval>3.33</ogr:floatval>
</ogr:polys2>
</gml:featureMember>
</ogr:FeatureCollection>
Expand Up @@ -10,12 +10,12 @@
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="execute_sql" type="ogr:execute_sql_Type" substitutionGroup="gml:_Feature"/>
<xs:complexType name="execute_sql_Type">
<xs:element name="polys2" type="ogr:polys2_Type" substitutionGroup="gml:_Feature"/>
<xs:complexType name="polys2_Type">
<xs:complexContent>
<xs:extension base="gml:AbstractFeatureType">
<xs:sequence>
<xs:element name="geometryProperty" type="gml:MultiPolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
<xs:element name="geometryProperty" type="gml:PolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
<xs:element name="name" nillable="true" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
Expand All @@ -26,15 +26,13 @@
<xs:element name="intval" nillable="true" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:totalDigits value="9"/>
<xs:totalDigits value="16"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="floatval" nillable="true" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:totalDigits value="24"/>
<xs:fractionDigits value="15"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Expand Down
28 changes: 13 additions & 15 deletions python/plugins/processing/tests/testdata/gdal_algorithm_tests.yaml
Expand Up @@ -608,21 +608,19 @@ tests:
name: expected/gdal/clip_lines_by_multipolygon.gml
type: vector

#~ - algorithm: gdal:executesql
#~ name: Execute SQL
#~ params:
#~ DIALECT: 0
#~ INPUT:
#~ name: polys.gml
#~ type: vector
#~ OPTIONS: ''
#~ SQL: SELECT * FROM polys2 WHERE intval=2
#~ results:
#~ OUTPUT:
#~ name: expected/gdal/execute_sql.gml
#~ type: vector
#~ compare:
#~ ignore_crs_check: true
- algorithm: gdal:executesql
name: Execute SQL
params:
DIALECT: 0
INPUT:
name: polys.gml
type: vector
OPTIONS: ''
SQL: SELECT * FROM polys2 WHERE intval=2
results:
OUTPUT:
name: expected/gdal/execute_sql.gml
type: vector

- algorithm: gdal:offsetcurve
name: Offset curve (right-sided)
Expand Down

0 comments on commit 79c26c3

Please sign in to comment.