Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] add test for v.net.distance algorithm
  • Loading branch information
alexbruy committed Jan 31, 2019
1 parent 3abea36 commit dbe2cb7
Show file tree
Hide file tree
Showing 9 changed files with 120 additions and 0 deletions.
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ogr.maptools.org/ end_point.xsd"
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>1003696.648020304</gml:X><gml:Y>6222370.049363472</gml:Y></gml:coord>
<gml:coord><gml:X>1003696.648020304</gml:X><gml:Y>6222370.049363472</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>

<gml:featureMember>
<ogr:point_end fid="point_end.0">
<ogr:geometryProperty><gml:Point srsName="EPSG:32733"><gml:coordinates>1003696.6480203,6222370.04936347</gml:coordinates></gml:Point></ogr:geometryProperty>
</ogr:point_end>
</gml:featureMember>
</ogr:FeatureCollection>
@@ -0,0 +1,23 @@
<?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="point_end" type="ogr:point_end_Type" substitutionGroup="gml:_Feature"/>
<xs:complexType name="point_end_Type">
<xs:complexContent>
<xs:extension base="gml:AbstractFeatureType">
<xs:sequence>
<xs:element name="geometryProperty" type="gml:PointPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ogr.maptools.org/ start_point.xsd"
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>1000993.609479388</gml:X><gml:Y>6220361.983185438</gml:Y></gml:coord>
<gml:coord><gml:X>1000993.609479388</gml:X><gml:Y>6220361.983185438</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>

<gml:featureMember>
<ogr:point_start fid="point_start.0">
<ogr:geometryProperty><gml:Point srsName="EPSG:32733"><gml:coordinates>1000993.60947939,6220361.98318544</gml:coordinates></gml:Point></ogr:geometryProperty>
</ogr:point_start>
</gml:featureMember>
</ogr:FeatureCollection>
@@ -0,0 +1,23 @@
<?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="point_start" type="ogr:point_start_Type" substitutionGroup="gml:_Feature"/>
<xs:complexType name="point_start_Type">
<xs:complexContent>
<xs:extension base="gml:AbstractFeatureType">
<xs:sequence>
<xs:element name="geometryProperty" type="gml:PointPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
Binary file not shown.
@@ -0,0 +1 @@
PROJCS["WGS_1984_UTM_Zone_33S",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],UNIT["Meter",1]]
Binary file not shown.
Binary file not shown.
Expand Up @@ -194,6 +194,41 @@ tests:
name: expected/grass7/v_net_centrality.shp
type: vector

- algorithm: grass7:v.net.distance
name: v.net.distance
params:
-g: false
-l: false
GRASS_MIN_AREA_PARAMETER: 0.0001
GRASS_OUTPUT_TYPE_PARAMETER: 0
GRASS_SNAP_TOLERANCE_PARAMETER: -1.0
GRASS_VECTOR_DSCO: ''
GRASS_VECTOR_EXPORT_NOCAT: false
GRASS_VECTOR_LCO: ''
arc_type:
- 0
- 1
flayer:
name: custom/grass7/point_start.gml|layername=point_start
type: vector
from_cats: ''
from_where: ''
input:
name: roads.gml|layername=roads
type: vector
threshold: 50.0
tlayer:
name: custom/grass7/point_end.gml|layername=point_end
type: vector
to_cats: ''
to_type:
- 0
to_where: ''
results:
output:
name: expected/grass7/v_net_distance.shp
type: vector

- algorithm: grass7:v.net.salesman
name: v.net.salesman
params:
Expand Down

0 comments on commit dbe2cb7

Please sign in to comment.