Skip to content

Commit

Permalink
Rename field to extremum_type
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 8, 2024
1 parent 6c5c5b9 commit 4966692
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>45.7964514376 18.6964479442</gml:lowerCorner><gml:upperCorner>45.7964514376 18.6964479442</gml:upperCorner></gml:Envelope></gml:boundedBy>
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::4326" gml:id="raster_max.geom.0"><gml:pos>45.7964514376 18.6964479442</gml:pos></gml:Point></ogr:geometryProperty>
<ogr:value>243.00000000</ogr:value>
<ogr:extremum>maximum</ogr:extremum>
<ogr:extremum_type>maximum</ogr:extremum_type>
</ogr:raster_max>
</ogr:featureMember>
</ogr:FeatureCollection>
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="extremum" nillable="true" minOccurs="0" maxOccurs="1">
<xs:element name="extremum_type" nillable="true" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
</xs:restriction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>45.8027514376 18.6786479442</gml:lowerCorner><gml:upperCorner>45.8027514376 18.6786479442</gml:upperCorner></gml:Envelope></gml:boundedBy>
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::4326" gml:id="raster_min.geom.0"><gml:pos>45.8027514376 18.6786479442</gml:pos></gml:Point></ogr:geometryProperty>
<ogr:value>85.00000000</ogr:value>
<ogr:extremum>minimum</ogr:extremum>
<ogr:extremum_type>minimum</ogr:extremum_type>
</ogr:raster_min>
</ogr:featureMember>
</ogr:FeatureCollection>
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="extremum" nillable="true" minOccurs="0" maxOccurs="1">
<xs:element name="extremum_type" nillable="true" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
</xs:restriction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>45.8027514376 18.6786479442</gml:lowerCorner><gml:upperCorner>45.8027514376 18.6786479442</gml:upperCorner></gml:Envelope></gml:boundedBy>
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::4326" gml:id="raster_min_max.geom.0"><gml:pos>45.8027514376 18.6786479442</gml:pos></gml:Point></ogr:geometryProperty>
<ogr:value>85.00000000</ogr:value>
<ogr:extremum>minimum</ogr:extremum>
<ogr:extremum_type>minimum</ogr:extremum_type>
</ogr:raster_min_max>
</ogr:featureMember>
<ogr:featureMember>
<ogr:raster_min_max gml:id="raster_min_max.1">
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>45.7964514376 18.6964479442</gml:lowerCorner><gml:upperCorner>45.7964514376 18.6964479442</gml:upperCorner></gml:Envelope></gml:boundedBy>
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::4326" gml:id="raster_min_max.geom.1"><gml:pos>45.7964514376 18.6964479442</gml:pos></gml:Point></ogr:geometryProperty>
<ogr:value>243.00000000</ogr:value>
<ogr:extremum>maximum</ogr:extremum>
<ogr:extremum_type>maximum</ogr:extremum_type>
</ogr:raster_min_max>
</ogr:featureMember>
</ogr:FeatureCollection>
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="extremum" nillable="true" minOccurs="0" maxOccurs="1">
<xs:element name="extremum_type" nillable="true" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
</xs:restriction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::3857" gml:id="raster_zonal_extremum.geom.0"><gml:pos>2078985.88326099 5746736.89404743</gml:pos></gml:Point></ogr:geometryProperty>
<ogr:zone>zone 1</ogr:zone>
<ogr:value>97.50000000</ogr:value>
<ogr:extremum>minimum</ogr:extremum>
<ogr:extremum_type>minimum</ogr:extremum_type>
</ogr:raster_zonal_extremum>
</ogr:featureMember>
<ogr:featureMember>
Expand All @@ -22,7 +22,7 @@
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::3857" gml:id="raster_zonal_extremum.geom.1"><gml:pos>2078752.11232507 5745092.4177069</gml:pos></gml:Point></ogr:geometryProperty>
<ogr:zone>zone 1</ogr:zone>
<ogr:value>219.19999695</ogr:value>
<ogr:extremum>maximum</ogr:extremum>
<ogr:extremum_type>maximum</ogr:extremum_type>
</ogr:raster_zonal_extremum>
</ogr:featureMember>
<ogr:featureMember>
Expand All @@ -31,7 +31,7 @@
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::3857" gml:id="raster_zonal_extremum.geom.2"><gml:pos>2080499.82836984 5749099.83092514</gml:pos></gml:Point></ogr:geometryProperty>
<ogr:zone>zone 2</ogr:zone>
<ogr:value>108.06781769</ogr:value>
<ogr:extremum>minimum</ogr:extremum>
<ogr:extremum_type>minimum</ogr:extremum_type>
</ogr:raster_zonal_extremum>
</ogr:featureMember>
<ogr:featureMember>
Expand All @@ -40,7 +40,7 @@
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::3857" gml:id="raster_zonal_extremum.geom.3"><gml:pos>2081279.06482292 5747790.6361686</gml:pos></gml:Point></ogr:geometryProperty>
<ogr:zone>zone 2</ogr:zone>
<ogr:value>243.00000000</ogr:value>
<ogr:extremum>maximum</ogr:extremum>
<ogr:extremum_type>maximum</ogr:extremum_type>
</ogr:raster_zonal_extremum>
</ogr:featureMember>
<ogr:featureMember>
Expand All @@ -49,7 +49,7 @@
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::3857" gml:id="raster_zonal_extremum.geom.4"><gml:pos>2080421.90472453 5747072.17563143</gml:pos></gml:Point></ogr:geometryProperty>
<ogr:zone>zone 3</ogr:zone>
<ogr:value>163.57766724</ogr:value>
<ogr:extremum>minimum</ogr:extremum>
<ogr:extremum_type>minimum</ogr:extremum_type>
</ogr:raster_zonal_extremum>
</ogr:featureMember>
<ogr:featureMember>
Expand All @@ -58,7 +58,7 @@
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::3857" gml:id="raster_zonal_extremum.geom.5"><gml:pos>2080433.03667386 5747056.20984171</gml:pos></gml:Point></ogr:geometryProperty>
<ogr:zone>zone 3</ogr:zone>
<ogr:value>170.00000000</ogr:value>
<ogr:extremum>maximum</ogr:extremum>
<ogr:extremum_type>maximum</ogr:extremum_type>
</ogr:raster_zonal_extremum>
</ogr:featureMember>
</ogr:FeatureCollection>
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="extremum" nillable="true" minOccurs="0" maxOccurs="1">
<xs:element name="extremum_type" nillable="true" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
</xs:restriction>
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmrasterminmax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ QVariantMap QgsRasterMinMaxAlgorithm::processAlgorithm( const QVariantMap &param
{
QgsFields outFields;
outFields.append( QgsField( QStringLiteral( "value" ), QMetaType::Type::Double, QString(), 20, 8 ) );
outFields.append( QgsField( QStringLiteral( "extremum" ), QMetaType::Type::QString ) );
outFields.append( QgsField( QStringLiteral( "extremum_type" ), QMetaType::Type::QString ) );
sink.reset( parameterAsSink( parameters, QStringLiteral( "OUTPUT" ), context, dest, outFields, Qgis::WkbType::Point, mCrs ) );
if ( !sink )
throw QgsProcessingException( invalidSinkError( parameters, QStringLiteral( "OUTPUT" ) ) );
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmzonalminmaxpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ bool QgsZonalMinimumMaximumPointAlgorithm::prepareAlgorithm( const QVariantMap &

QgsFields newFields;
newFields.append( QgsField( QStringLiteral( "value" ), QMetaType::Type::Double, QString(), 20, 8 ) );
newFields.append( QgsField( QStringLiteral( "extremum" ), QMetaType::Type::QString ) );
newFields.append( QgsField( QStringLiteral( "extremum_type" ), QMetaType::Type::QString ) );
mOutputFields = QgsProcessingUtils::combineFields( source->fields(), newFields );

return true;
Expand Down

0 comments on commit 4966692

Please sign in to comment.