Skip to content
Permalink
Browse files

[processing] add test for fixed algorithm

  • Loading branch information
ghtmtt committed Apr 27, 2018
1 parent 9050a89 commit 9c0a9ca466e5437dd1cf9c1885bf393846aaebc2
Binary file not shown.
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ogr.maptools.org/ points_over.xsd"
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>270757.5113380129</gml:X><gml:Y>4458941.825565791</gml:Y></gml:coord>
<gml:coord><gml:X>270837.7610769985</gml:X><gml:Y>4459015.518953552</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>

<gml:featureMember>
<ogr:points_over fid="points_over.0">
<ogr:geometryProperty><gml:Point srsName="EPSG:23030"><gml:coordinates>270757.511338013,4458994.80088368</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>1</ogr:id>
</ogr:points_over>
</gml:featureMember>
<gml:featureMember>
<ogr:points_over fid="points_over.1">
<ogr:geometryProperty><gml:Point srsName="EPSG:23030"><gml:coordinates>270790.817602232,4459015.51895355</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>2</ogr:id>
</ogr:points_over>
</gml:featureMember>
<gml:featureMember>
<ogr:points_over fid="points_over.2">
<ogr:geometryProperty><gml:Point srsName="EPSG:23030"><gml:coordinates>270827.533169089,4458993.48961344</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>3</ogr:id>
</ogr:points_over>
</gml:featureMember>
<gml:featureMember>
<ogr:points_over fid="points_over.3">
<ogr:geometryProperty><gml:Point srsName="EPSG:23030"><gml:coordinates>270828.582185284,4458968.83773284</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>4</ogr:id>
</ogr:points_over>
</gml:featureMember>
<gml:featureMember>
<ogr:points_over fid="points_over.4">
<ogr:geometryProperty><gml:Point srsName="EPSG:23030"><gml:coordinates>270783.998996959,4458970.41125713</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>5</ogr:id>
</ogr:points_over>
</gml:featureMember>
<gml:featureMember>
<ogr:points_over fid="points_over.5">
<ogr:geometryProperty><gml:Point srsName="EPSG:23030"><gml:coordinates>270802.881288485,4458944.18585223</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>6</ogr:id>
</ogr:points_over>
</gml:featureMember>
<gml:featureMember>
<ogr:points_over fid="points_over.6">
<ogr:geometryProperty><gml:Point srsName="EPSG:23030"><gml:coordinates>270837.761076998,4458941.82556579</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>7</ogr:id>
</ogr:points_over>
</gml:featureMember>
</ogr:FeatureCollection>
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://ogr.maptools.org/" xmlns:ogr="http://ogr.maptools.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" elementFormDefault="qualified" version="1.0">
<xs:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd"/>
<xs:element name="FeatureCollection" type="ogr:FeatureCollectionType" substitutionGroup="gml:_FeatureCollection"/>
<xs:complexType name="FeatureCollectionType">
<xs:complexContent>
<xs:extension base="gml:AbstractFeatureCollectionType">
<xs:attribute name="lockId" type="xs:string" use="optional"/>
<xs:attribute name="scope" type="xs:string" use="optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="points_over" type="ogr:points_over_Type" substitutionGroup="gml:_Feature"/>
<xs:complexType name="points_over_Type">
<xs:complexContent>
<xs:extension base="gml:AbstractFeatureType">
<xs:sequence>
<xs:element name="geometryProperty" type="gml:PointPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
<xs:element name="id" nillable="true" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:totalDigits value="5"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ogr.maptools.org/ add_grids_to_points.xsd"
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>270757.511338013</gml:X><gml:Y>4458941.82556579</gml:Y></gml:coord>
<gml:coord><gml:X>270837.761076998</gml:X><gml:Y>4459015.51895355</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>

<gml:featureMember>
<ogr:add_grids_to_points fid="points_over.0">
<ogr:geometryProperty><gml:Point srsName="EPSG:23030"><gml:coordinates>270757.511338013,4458994.80088368</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>1</ogr:id>
<ogr:raster>844.2236328100</ogr:raster>
</ogr:add_grids_to_points>
</gml:featureMember>
<gml:featureMember>
<ogr:add_grids_to_points fid="points_over.1">
<ogr:geometryProperty><gml:Point srsName="EPSG:23030"><gml:coordinates>270790.817602232,4459015.51895355</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>2</ogr:id>
<ogr:raster>840.3559570300</ogr:raster>
</ogr:add_grids_to_points>
</gml:featureMember>
<gml:featureMember>
<ogr:add_grids_to_points fid="points_over.2">
<ogr:geometryProperty><gml:Point srsName="EPSG:23030"><gml:coordinates>270827.533169089,4458993.48961344</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>3</ogr:id>
<ogr:raster>865.9952392600</ogr:raster>
</ogr:add_grids_to_points>
</gml:featureMember>
<gml:featureMember>
<ogr:add_grids_to_points fid="points_over.3">
<ogr:geometryProperty><gml:Point srsName="EPSG:23030"><gml:coordinates>270828.582185284,4458968.83773284</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>4</ogr:id>
<ogr:raster>881.6611328100</ogr:raster>
</ogr:add_grids_to_points>
</gml:featureMember>
<gml:featureMember>
<ogr:add_grids_to_points fid="points_over.4">
<ogr:geometryProperty><gml:Point srsName="EPSG:23030"><gml:coordinates>270783.998996959,4458970.41125713</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>5</ogr:id>
<ogr:raster>861.8330688500</ogr:raster>
</ogr:add_grids_to_points>
</gml:featureMember>
<gml:featureMember>
<ogr:add_grids_to_points fid="points_over.5">
<ogr:geometryProperty><gml:Point srsName="EPSG:23030"><gml:coordinates>270802.881288485,4458944.18585223</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>6</ogr:id>
<ogr:raster>879.2130127000</ogr:raster>
</ogr:add_grids_to_points>
</gml:featureMember>
<gml:featureMember>
<ogr:add_grids_to_points fid="points_over.6">
<ogr:geometryProperty><gml:Point srsName="EPSG:23030"><gml:coordinates>270837.761076998,4458941.82556579</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>7</ogr:id>
<ogr:raster>890.8310546900</ogr:raster>
</ogr:add_grids_to_points>
</gml:featureMember>
</ogr:FeatureCollection>
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://ogr.maptools.org/" xmlns:ogr="http://ogr.maptools.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" elementFormDefault="qualified" version="1.0">
<xs:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd"/>
<xs:element name="FeatureCollection" type="ogr:FeatureCollectionType" substitutionGroup="gml:_FeatureCollection"/>
<xs:complexType name="FeatureCollectionType">
<xs:complexContent>
<xs:extension base="gml:AbstractFeatureCollectionType">
<xs:attribute name="lockId" type="xs:string" use="optional"/>
<xs:attribute name="scope" type="xs:string" use="optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="add_grids_to_points" type="ogr:add_grids_to_points_Type" substitutionGroup="gml:_Feature"/>
<xs:complexType name="add_grids_to_points_Type">
<xs:complexContent>
<xs:extension base="gml:AbstractFeatureType">
<xs:sequence>
<xs:element name="geometryProperty" type="gml:PointPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
<xs:element name="id" nillable="true" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:long">
<xs:totalDigits value="16"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="raster" nillable="true" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:totalDigits value="19"/>
<xs:fractionDigits value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
@@ -28,3 +28,20 @@ tests:
BUFFER:
name: expected/saga/buffer_polys.shp
type: vector

- algorithm: saga:addrastervaluestopoints
name: Add raster values to point simple
params:
GRIDS:
params:
- name: raster.tif
type: raster
type: multi
RESAMPLING: 0
SHAPES:
name: custom/points_over.gml
type: vector
results:
RESULT:
name: expected/saga/add_grids_to_points.gml
type: vector

0 comments on commit 9c0a9ca

Please sign in to comment.
You can’t perform that action at this time.