Skip to content

Commit 397df65

Browse files
committed
[processing] add test for points along lines
1 parent d08c02d commit 397df65

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<GMLFeatureClassList>
2+
<GMLFeatureClass>
3+
<Name>points_along_lines</Name>
4+
<ElementPath>points_along_lines</ElementPath>
5+
<!--POINT-->
6+
<GeometryType>1</GeometryType>
7+
<SRSName>EPSG:4326</SRSName>
8+
<DatasetSpecificInfo>
9+
<FeatureCount>7</FeatureCount>
10+
<ExtentXMin>-0.50000</ExtentXMin>
11+
<ExtentXMax>7.75000</ExtentXMax>
12+
<ExtentYMin>-3.00000</ExtentYMin>
13+
<ExtentYMax>2.00000</ExtentYMax>
14+
</DatasetSpecificInfo>
15+
</GMLFeatureClass>
16+
</GMLFeatureClassList>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ogr:FeatureCollection
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation=""
5+
xmlns:ogr="http://ogr.maptools.org/"
6+
xmlns:gml="http://www.opengis.net/gml">
7+
<gml:boundedBy>
8+
<gml:Box>
9+
<gml:coord><gml:X>-0.5</gml:X><gml:Y>-3</gml:Y></gml:coord>
10+
<gml:coord><gml:X>7.75</gml:X><gml:Y>2</gml:Y></gml:coord>
11+
</gml:Box>
12+
</gml:boundedBy>
13+
14+
<gml:featureMember>
15+
<ogr:points_along_lines fid="lines.0">
16+
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>7.70710678118655,2.0</gml:coordinates></gml:Point></ogr:geometryProperty>
17+
</ogr:points_along_lines>
18+
</gml:featureMember>
19+
<gml:featureMember>
20+
<ogr:points_along_lines fid="lines.1">
21+
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>-0.5,-1.0</gml:coordinates></gml:Point></ogr:geometryProperty>
22+
</ogr:points_along_lines>
23+
</gml:featureMember>
24+
<gml:featureMember>
25+
<ogr:points_along_lines fid="lines.2">
26+
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2,1</gml:coordinates></gml:Point></ogr:geometryProperty>
27+
</ogr:points_along_lines>
28+
</gml:featureMember>
29+
<gml:featureMember>
30+
<ogr:points_along_lines fid="lines.3">
31+
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>3.5,1.0</gml:coordinates></gml:Point></ogr:geometryProperty>
32+
</ogr:points_along_lines>
33+
</gml:featureMember>
34+
<gml:featureMember>
35+
<ogr:points_along_lines fid="lines.4">
36+
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>7.75,-3.0</gml:coordinates></gml:Point></ogr:geometryProperty>
37+
</ogr:points_along_lines>
38+
</gml:featureMember>
39+
<gml:featureMember>
40+
<ogr:points_along_lines fid="lines.5">
41+
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>7,-2</gml:coordinates></gml:Point></ogr:geometryProperty>
42+
</ogr:points_along_lines>
43+
</gml:featureMember>
44+
<gml:featureMember>
45+
<ogr:points_along_lines fid="lines.6">
46+
</ogr:points_along_lines>
47+
</gml:featureMember>
48+
</ogr:FeatureCollection>

python/plugins/processing/tests/testdata/gdal_algorithm_tests.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,15 @@ tests:
116116
OUTPUT_LAYER:
117117
name: expected/gdal/buffer_polys_dissolve.gml
118118
type: vector
119+
- algorithm: gdalogr:createpointsalonglines
120+
name: OGR points along lines
121+
params:
122+
DISTANCE: 0.25
123+
GEOMETRY: geometry
124+
INPUT_LAYER:
125+
name: lines.gml
126+
type: vector
127+
results:
128+
OUTPUT_LAYER:
129+
name: expected/gdal/points_along_lines.gml
130+
type: vector

0 commit comments

Comments
 (0)