mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-09 00:35:20 -05:00
The SAGA version of this algorithm is of limited use in QGIS, because the volume calculated is embedded only in the SAGA terminal output. This prevents it being saved to a file, or reused within a model as an input to a later model step. It's also very user-unfriendly, because users must know to manually scan the algorithm log to find the SAGA output. Given that the maths here is trivial, this commit ports the algorithm across to be a native QGIS c++ algorithm. The algorithm duplicates the SAGA alg 1:1, but outputs the volume (and area) to either a HTML report, or a vector table. Additionally, the outputs are exported as numeric outputs from the algorithm, allowing them to be re-used within models. (It's also considerably faster, because it avoids the forced conversion to SAGA raster format) Fixes #8607 (properly, even though that report is closed)
46 lines
2.0 KiB
XML
46 lines
2.0 KiB
XML
<?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="surface_vol_subtract" type="ogr:surface_vol_subtract_Type" substitutionGroup="gml:_Feature"/>
|
|
<xs:complexType name="surface_vol_subtract_Type">
|
|
<xs:complexContent>
|
|
<xs:extension base="gml:AbstractFeatureType">
|
|
<xs:sequence>
|
|
<xs:element name="volume" nillable="true" minOccurs="0" maxOccurs="1">
|
|
<xs:simpleType>
|
|
<xs:restriction base="xs:decimal">
|
|
<xs:totalDigits value="21"/>
|
|
<xs:fractionDigits value="8"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
</xs:element>
|
|
<xs:element name="deg2" nillable="true" minOccurs="0" maxOccurs="1">
|
|
<xs:simpleType>
|
|
<xs:restriction base="xs:decimal">
|
|
<xs:totalDigits value="21"/>
|
|
<xs:fractionDigits value="8"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
</xs:element>
|
|
<xs:element name="pixel_count" nillable="true" minOccurs="0" maxOccurs="1">
|
|
<xs:simpleType>
|
|
<xs:restriction base="xs:long">
|
|
<xs:totalDigits value="20"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
</xs:element>
|
|
</xs:sequence>
|
|
</xs:extension>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
</xs:schema>
|