Skip to content
Permalink
Browse files

processing points along lines test

  • Loading branch information
ghtmtt authored and m-kuhn committed Jan 13, 2017
1 parent 94856b5 commit 2c6649358af613f8861e2a9f5b910c11b04c9af4
@@ -0,0 +1,26 @@
<GMLFeatureClassList>
<GMLFeatureClass>
<Name>points_alog_lines</Name>
<ElementPath>points_alog_lines</ElementPath>
<!--POINT-->
<GeometryType>1</GeometryType>
<SRSName>EPSG:4326</SRSName>
<DatasetSpecificInfo>
<FeatureCount>29</FeatureCount>
<ExtentXMin>-1.00000</ExtentXMin>
<ExtentXMax>10.41421</ExtentXMax>
<ExtentYMin>-3.00000</ExtentYMin>
<ExtentYMax>4.41421</ExtentYMax>
</DatasetSpecificInfo>
<PropertyDefn>
<Name>distance</Name>
<ElementPath>distance</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
<PropertyDefn>
<Name>angle</Name>
<ElementPath>angle</ElementPath>
<Type>Real</Type>
</PropertyDefn>
</GMLFeatureClass>
</GMLFeatureClassList>
@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=""
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>-1</gml:X><gml:Y>-3</gml:Y></gml:coord>
<gml:coord><gml:X>10.4142135623731</gml:X><gml:Y>4.414213562373095</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>

<gml:featureMember>
<ogr:points_alog_lines fid="lines.0">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>6,2</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>0</ogr:distance>
<ogr:angle>90</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.0">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>7,2</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>1</ogr:distance>
<ogr:angle>90</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.0">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>8,2</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>2</ogr:distance>
<ogr:angle>90</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.0">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>9,2</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>3</ogr:distance>
<ogr:angle>45</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.0">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>9,3</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>4</ogr:distance>
<ogr:angle>22.5</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.0">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>9.70710678118655,3.70710678118655</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>5</ogr:distance>
<ogr:angle>45</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.0">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>10.4142135623731,4.41421356237309</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>6</ogr:distance>
<ogr:angle>45</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.1">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>-1,-1</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>0</ogr:distance>
<ogr:angle>90</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.1">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>0,-1</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>1</ogr:distance>
<ogr:angle>90</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.1">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>1,-1</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>2</ogr:distance>
<ogr:angle>90</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.2">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2,0</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>0</ogr:distance>
<ogr:angle>0</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.2">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2,1</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>1</ogr:distance>
<ogr:angle>0</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.2">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2,2</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>2</ogr:distance>
<ogr:angle>45</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.2">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>3,2</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>3</ogr:distance>
<ogr:angle>45</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.2">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>3,3</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>4</ogr:distance>
<ogr:angle>0</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.3">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>3,1</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>0</ogr:distance>
<ogr:angle>90</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.3">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>4,1</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>1</ogr:distance>
<ogr:angle>90</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.3">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>5,1</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>2</ogr:distance>
<ogr:angle>90</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.4">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>7,-3</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>0</ogr:distance>
<ogr:angle>90</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.4">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>8,-3</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>1</ogr:distance>
<ogr:angle>90</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.4">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>9,-3</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>2</ogr:distance>
<ogr:angle>90</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.4">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>10,-3</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>3</ogr:distance>
<ogr:angle>90</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.5">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>6,-3</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>0</ogr:distance>
<ogr:angle>45</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.5">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>6.70710678118655,-2.29289321881345</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>1</ogr:distance>
<ogr:angle>45</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.5">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>7.41421356237309,-1.58578643762691</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>2</ogr:distance>
<ogr:angle>45</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.5">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>8.12132034355964,-0.878679656440358</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>3</ogr:distance>
<ogr:angle>45</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.5">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>8.82842712474619,-0.17157287525381</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>4</ogr:distance>
<ogr:angle>45</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.5">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>9.53553390593274,0.535533905932737</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:distance>5</ogr:distance>
<ogr:angle>45</ogr:angle>
</ogr:points_alog_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:points_alog_lines fid="lines.6">
</ogr:points_alog_lines>
</gml:featureMember>
</ogr:FeatureCollection>
@@ -2177,3 +2177,17 @@ tests:
OUTPUT:
name: expected/count_points_weighted.gml
type: vector

- algorithm: qgis:pointsalonglines
name: standard points alog lines
params:
DISTANCE: 1.0
END_OFFSET: 0.0
INPUT:
name: lines.gml
type: vector
START_OFFSET: 0.0
results:
OUTPUT:
name: expected/points_alog_lines.gml
type: vector

0 comments on commit 2c66493

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