Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements: - transparent reprojection to match hub/spoke CRS - keep all attributes from matched hub/spoke features - don't break after matching one hub point to spoke - instead join ALL hub/spoke points with matching id values
- Loading branch information
1 parent
e035445
commit b4b3999
Showing
8 changed files
with
304 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
python/plugins/processing/tests/testdata/custom/spoke_points.gfs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<GMLFeatureClassList> | ||
<GMLFeatureClass> | ||
<Name>spoke_points</Name> | ||
<ElementPath>spoke_points</ElementPath> | ||
<!--POINT--> | ||
<GeometryType>1</GeometryType> | ||
<SRSName>EPSG:4326</SRSName> | ||
<DatasetSpecificInfo> | ||
<FeatureCount>7</FeatureCount> | ||
<ExtentXMin>1.27875</ExtentXMin> | ||
<ExtentXMax>6.82625</ExtentXMax> | ||
<ExtentYMin>-4.16750</ExtentYMin> | ||
<ExtentYMax>3.88250</ExtentYMax> | ||
</DatasetSpecificInfo> | ||
<PropertyDefn> | ||
<Name>id</Name> | ||
<ElementPath>id</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>name</Name> | ||
<ElementPath>name</ElementPath> | ||
<Type>String</Type> | ||
<Width>8</Width> | ||
</PropertyDefn> | ||
</GMLFeatureClass> | ||
</GMLFeatureClassList> |
63 changes: 63 additions & 0 deletions
63
python/plugins/processing/tests/testdata/custom/spoke_points.gml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ spoke_points.xsd" | ||
xmlns:ogr="http://ogr.maptools.org/" | ||
xmlns:gml="http://www.opengis.net/gml"> | ||
<gml:boundedBy> | ||
<gml:Box> | ||
<gml:coord><gml:X>1.27875</gml:X><gml:Y>-4.1675</gml:Y></gml:coord> | ||
<gml:coord><gml:X>6.826249999999999</gml:X><gml:Y>3.882499999999999</gml:Y></gml:coord> | ||
</gml:Box> | ||
</gml:boundedBy> | ||
|
||
<gml:featureMember> | ||
<ogr:spoke_points fid="spoke_points.0"> | ||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>5.07625,-2.1725</gml:coordinates></gml:Point></ogr:geometryProperty> | ||
<ogr:id>1</ogr:id> | ||
<ogr:name>point 1</ogr:name> | ||
</ogr:spoke_points> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:spoke_points fid="spoke_points.1"> | ||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>5.82,3.8825</gml:coordinates></gml:Point></ogr:geometryProperty> | ||
<ogr:id>2</ogr:id> | ||
<ogr:name>point 2</ogr:name> | ||
</ogr:spoke_points> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:spoke_points fid="spoke_points.2"> | ||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>1.62,1.4675</gml:coordinates></gml:Point></ogr:geometryProperty> | ||
<ogr:id>3</ogr:id> | ||
<ogr:name>point 3</ogr:name> | ||
</ogr:spoke_points> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:spoke_points fid="spoke_points.3"> | ||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>6.68625,1.23125</gml:coordinates></gml:Point></ogr:geometryProperty> | ||
<ogr:id>4</ogr:id> | ||
<ogr:name>point 4</ogr:name> | ||
</ogr:spoke_points> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:spoke_points fid="spoke_points.4"> | ||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>1.27875,-3.66875</gml:coordinates></gml:Point></ogr:geometryProperty> | ||
<ogr:id>4</ogr:id> | ||
<ogr:name>point 4a</ogr:name> | ||
</ogr:spoke_points> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:spoke_points fid="spoke_points.5"> | ||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>3.81625,-4.1675</gml:coordinates></gml:Point></ogr:geometryProperty> | ||
<ogr:id>4</ogr:id> | ||
<ogr:name>point 4b</ogr:name> | ||
</ogr:spoke_points> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:spoke_points fid="spoke_points.6"> | ||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>6.82625,-2.79375</gml:coordinates></gml:Point></ogr:geometryProperty> | ||
<ogr:id>8</ogr:id> | ||
<ogr:name>point 8</ogr:name> | ||
</ogr:spoke_points> | ||
</gml:featureMember> | ||
</ogr:FeatureCollection> |
43 changes: 43 additions & 0 deletions
43
python/plugins/processing/tests/testdata/expected/hub_lines.gfs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<GMLFeatureClassList> | ||
<GMLFeatureClass> | ||
<Name>hub_lines</Name> | ||
<ElementPath>hub_lines</ElementPath> | ||
<!--LINESTRING--> | ||
<GeometryType>2</GeometryType> | ||
<SRSName>EPSG:4326</SRSName> | ||
<DatasetSpecificInfo> | ||
<FeatureCount>7</FeatureCount> | ||
<ExtentXMin>1.00000</ExtentXMin> | ||
<ExtentXMax>7.00000</ExtentXMax> | ||
<ExtentYMin>-4.16750</ExtentYMin> | ||
<ExtentYMax>3.88250</ExtentYMax> | ||
</DatasetSpecificInfo> | ||
<PropertyDefn> | ||
<Name>id</Name> | ||
<ElementPath>id</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>id2</Name> | ||
<ElementPath>id2</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>fid_2</Name> | ||
<ElementPath>fid_2</ElementPath> | ||
<Type>String</Type> | ||
<Width>14</Width> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>id_2</Name> | ||
<ElementPath>id_2</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>name</Name> | ||
<ElementPath>name</ElementPath> | ||
<Type>String</Type> | ||
<Width>8</Width> | ||
</PropertyDefn> | ||
</GMLFeatureClass> | ||
</GMLFeatureClassList> |
Oops, something went wrong.