Skip to content
Permalink
Browse files

Merge branch 'release-3_4' into backport-9670-to-release-3_4

  • Loading branch information
m-kuhn committed Apr 3, 2019
2 parents 8387936 + 3373838 commit ebab9ee9701634ec0758aaa7c8b2f51568289e56
Showing with 1,715 additions and 13 deletions.
  1. +1 −1 .travis.yml
  2. +10 −0 python/core/auto_generated/qgsvectorlayereditpassthrough.sip.in
  3. +4 −6 python/plugins/processing/algs/qgis/SpatialJoinSummary.py
  4. +50 −0 python/plugins/processing/tests/testdata/custom/line_3857.gml
  5. +30 −0 python/plugins/processing/tests/testdata/custom/line_3857.xsd
  6. +77 −0 python/plugins/processing/tests/testdata/custom/points_3857.gml
  7. +37 −0 python/plugins/processing/tests/testdata/custom/points_3857.xsd
  8. +326 −0 python/plugins/processing/tests/testdata/expected/join_by_location_line_to_polys_reproj.gml
  9. +378 −0 python/plugins/processing/tests/testdata/expected/join_by_location_line_to_polys_reproj.xsd
  10. +283 −0 python/plugins/processing/tests/testdata/expected/join_by_location_summary_reproject.gml
  11. +327 −0 python/plugins/processing/tests/testdata/expected/join_by_location_summary_reproject.xsd
  12. +41 −0 python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml
  13. +7 −1 src/core/qgsproxyprogresstask.cpp
  14. +1 −0 src/core/qgsproxyprogresstask.h
  15. +6 −0 src/core/qgsstatisticalsummary.cpp
  16. +1 −1 src/core/qgsstatisticalsummary.h
  17. +1 −1 src/core/qgsvectorfilewriter.cpp
  18. +16 −0 src/core/qgsvectorlayereditpassthrough.h
  19. +2 −0 src/providers/arcgisrest/qgsarcgisrestutils.h
  20. +3 −3 tests/src/3d/testqgs3drendering.cpp
  21. +74 −0 tests/src/core/testqgstaskmanager.cpp
  22. +40 −0 tests/src/core/testqgsvectorfilewriter.cpp
  23. BIN tests/testdata/control_images/3d/expected_dem_terrain_1/expected_dem_terrain_1_mask.png
  24. BIN tests/testdata/control_images/3d/expected_mesh3d/default/expected_mesh3d.png
  25. BIN tests/testdata/control_images/3d/expected_mesh3d/fedora/expected_mesh3d.png
  26. BIN ...data/control_images/3d/expected_polygon3d_extrusion/{ → default}/expected_polygon3d_extrusion.png
  27. BIN ...s/testdata/control_images/3d/expected_polygon3d_extrusion/fedora/expected_polygon3d_extrusion.png
  28. BIN tests/testdata/control_images/3d/expected_rulebased/default/expected_rulebased.png
  29. BIN tests/testdata/control_images/3d/expected_rulebased/fedora/expected_rulebased.png
  30. BIN ...xpected_composerattributetable_autowrap/{ → default}/expected_composerattributetable_autowrap.png
  31. BIN ...ed_composerattributetable_autowrap/{ → default}/expected_composerattributetable_autowrap_mask.png
  32. BIN ...able/expected_composerattributetable_autowrap/fedora/expected_composerattributetable_autowrap.png
  33. BIN .../expected_composerattributetable_columnwidth/expected_composerattributetable_columnwidth_mask.png
@@ -11,7 +11,7 @@ cache:
- ${HOME}/.ccache_docker_build_cosmic
- ${HOME}/.ccache_docker_build_bionic
timeout: 1000
if: NOT branch =~ /^(cherry-pick-)?backport-\d+-to-/
if: NOT branch =~ /^(cherry-pick-)?backport-\d+-to-/ AND NOT branch =~ /-patch-\d+$/

env:
global:
@@ -8,11 +8,21 @@



%ModuleHeaderCode
#include <qgsvectorlayereditpassthrough.h>
%End

class QgsVectorLayerEditPassthrough : QgsVectorLayerEditBuffer
{

%TypeHeaderCode
#include "qgsvectorlayereditpassthrough.h"
%End
%ConvertToSubClassCode
if ( qobject_cast<QgsVectorLayerEditPassthrough *>( sipCpp ) )
sipType = sipType_QgsVectorLayerEditPassthrough;
else
sipType = nullptr;
%End
public:
QgsVectorLayerEditPassthrough( QgsVectorLayer *layer );
@@ -26,6 +26,7 @@
__revision__ = '$Format:%H$'

import os
import math

from collections import defaultdict

@@ -275,9 +276,6 @@ def addField(original, stat, type):
features = source.getFeatures()
total = 100.0 / source.featureCount() if source.featureCount() else 0

# bounding box transform
bbox_transform = QgsCoordinateTransform(source.sourceCrs(), join_source.sourceCrs(), context.project())

for current, f in enumerate(features):
if feedback.isCanceled():
break
@@ -294,12 +292,11 @@ def addField(original, stat, type):
sink.addFeature(f, QgsFeatureSink.FastInsert)
continue

bbox = bbox_transform.transformBoundingBox(f.geometry().boundingBox())
engine = None

values = []

request = QgsFeatureRequest().setFilterRect(bbox).setSubsetOfAttributes(join_field_indexes).setDestinationCrs(source.sourceCrs(), context.transformContext())
request = QgsFeatureRequest().setFilterRect(f.geometry().boundingBox()).setSubsetOfAttributes(join_field_indexes).setDestinationCrs(source.sourceCrs(), context.transformContext())
for test_feat in join_source.getFeatures(request):
if feedback.isCanceled():
break
@@ -343,7 +340,8 @@ def addField(original, stat, type):
stat.finalize()
for s in numeric_fields:
if s[0] in summaries:
attrs.append(getattr(stat, s[2])())
val = getattr(stat, s[2])()
attrs.append(val if not math.isnan(val) else NULL)
elif field_type == 'datetime':
stat = QgsDateTimeStatisticalSummary()
stat.calculate(attribute_values)
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ogr.maptools.org/ line_3857.xsd"
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>-170142.2790295565</gml:X><gml:Y>-601233.6051123593</gml:Y></gml:coord>
<gml:coord><gml:X>1198122.331412013</gml:X><gml:Y>487793.1282708889</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>

<gml:featureMember>
<ogr:line_3857 fid="line_3857.0">
<ogr:geometryProperty><gml:LineString srsName="EPSG:3857"><gml:coordinates>193303.008118985,455636.648094066 67700.5927073567,337822.202907407 40976.6745346706,33011.8416339877 -44539.8636179277,-303824.512095835 -170142.279029556,-309175.468327608</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:val>5</ogr:val>
</ogr:line_3857>
</gml:featureMember>
<gml:featureMember>
<ogr:line_3857 fid="line_3857.1">
<ogr:geometryProperty><gml:LineString srsName="EPSG:3857"><gml:coordinates>-63246.6063388065,487793.128270889 -33850.2963488532,142591.63526526</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:val>4</ogr:val>
</ogr:line_3857>
</gml:featureMember>
<gml:featureMember>
<ogr:line_3857 fid="line_3857.2">
<ogr:geometryProperty><gml:LineString srsName="EPSG:3857"><gml:coordinates>67700.5927073567,-368051.169570389 78390.1599764311,-23108.5844752597 300198.680809733,-47160.4899983067 628902.874333781,254888.031682493</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:val>8</ogr:val>
</ogr:line_3857>
</gml:featureMember>
<gml:featureMember>
<ogr:line_3857 fid="line_3857.3">
<ogr:geometryProperty><gml:LineString srsName="EPSG:3857"><gml:coordinates>733126.155207261,57063.981869392 1016399.68783774,54391.4880260408</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:val>7</ogr:val>
</ogr:line_3857>
</gml:featureMember>
<gml:featureMember>
<ogr:line_3857 fid="line_3857.4">
<ogr:geometryProperty><gml:LineString srsName="EPSG:3857"><gml:coordinates>992348.161482323,262911.813488384 1198122.33141201,-263698.89064191</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:val>2</ogr:val>
</ogr:line_3857>
</gml:featureMember>
<gml:featureMember>
<ogr:line_3857 fid="line_3857.5">
<ogr:geometryProperty><gml:LineString srsName="EPSG:3857"><gml:coordinates>882780.096974306,-601233.605112359 762522.465197217,-440351.072066794 1024416.86328955,-263698.89064191</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:val>1</ogr:val>
</ogr:line_3857>
</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="line_3857" type="ogr:line_3857_Type" substitutionGroup="gml:_Feature"/>
<xs:complexType name="line_3857_Type">
<xs:complexContent>
<xs:extension base="gml:AbstractFeatureType">
<xs:sequence>
<xs:element name="geometryProperty" type="gml:LineStringPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
<xs:element name="val" nillable="true" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:totalDigits value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
@@ -0,0 +1,77 @@
<?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_3857.xsd"
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>0</gml:X><gml:Y>-557305.2572745769</gml:Y></gml:coord>
<gml:coord><gml:X>890555.9263461898</gml:X><gml:Y>334111.1714019597</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>

<gml:featureMember>
<ogr:points_3857 fid="points.0">
<ogr:geometryProperty><gml:Point srsName="EPSG:3857"><gml:coordinates>111319.490793272,111325.142866385</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>1</ogr:id>
<ogr:id2>2</ogr:id2>
</ogr:points_3857>
</gml:featureMember>
<gml:featureMember>
<ogr:points_3857 fid="points.1">
<ogr:geometryProperty><gml:Point srsName="EPSG:3857"><gml:coordinates>333958.47237982,334111.17140196</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>2</ogr:id>
<ogr:id2>1</ogr:id2>
</ogr:points_3857>
</gml:featureMember>
<gml:featureMember>
<ogr:points_3857 fid="points.2">
<ogr:geometryProperty><gml:Point srsName="EPSG:3857"><gml:coordinates>222638.981586547,222684.208505545</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>3</ogr:id>
<ogr:id2>0</ogr:id2>
</ogr:points_3857>
</gml:featureMember>
<gml:featureMember>
<ogr:points_3857 fid="points.3">
<ogr:geometryProperty><gml:Point srsName="EPSG:3857"><gml:coordinates>556597.453966367,222684.208505545</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>4</ogr:id>
<ogr:id2>2</ogr:id2>
</ogr:points_3857>
</gml:featureMember>
<gml:featureMember>
<ogr:points_3857 fid="points.4">
<ogr:geometryProperty><gml:Point srsName="EPSG:3857"><gml:coordinates>445277.963173095,111325.142866385</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>5</ogr:id>
<ogr:id2>1</ogr:id2>
</ogr:points_3857>
</gml:featureMember>
<gml:featureMember>
<ogr:points_3857 fid="points.5">
<ogr:geometryProperty><gml:Point srsName="EPSG:3857"><gml:coordinates>0.0,-557305.257274577</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>6</ogr:id>
<ogr:id2>0</ogr:id2>
</ogr:points_3857>
</gml:featureMember>
<gml:featureMember>
<ogr:points_3857 fid="points.6">
<ogr:geometryProperty><gml:Point srsName="EPSG:3857"><gml:coordinates>890555.92634619,-111325.142866386</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>7</ogr:id>
<ogr:id2>0</ogr:id2>
</ogr:points_3857>
</gml:featureMember>
<gml:featureMember>
<ogr:points_3857 fid="points.7">
<ogr:geometryProperty><gml:Point srsName="EPSG:3857"><gml:coordinates>779236.435552915,-111325.142866386</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>8</ogr:id>
<ogr:id2>0</ogr:id2>
</ogr:points_3857>
</gml:featureMember>
<gml:featureMember>
<ogr:points_3857 fid="points.8">
<ogr:geometryProperty><gml:Point srsName="EPSG:3857"><gml:coordinates>0.0,-111325.142866386</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>9</ogr:id>
<ogr:id2>0</ogr:id2>
</ogr:points_3857>
</gml:featureMember>
</ogr:FeatureCollection>
@@ -0,0 +1,37 @@
<?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_3857" type="ogr:points_3857_Type" substitutionGroup="gml:_Feature"/>
<xs:complexType name="points_3857_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="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="id2" nillable="true" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:long">
<xs:totalDigits value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>

0 comments on commit ebab9ee

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