[general]
name=Nearest with greater value
qgisMinimumVersion=3.18
supportsQt6=True
description=Get name (or ID) of and distance to the nearest feature with greater value in a certain field of a point layer.
            Returns point layer with added attributes and a line layer with connecting lines.
version=2.1
author=Florian Neukirchen
email=mail@riannek.de

about=For each feature on a vector layer, get name (or ID) of and distance to the nearest neighbour with greater value in a certain field. On line or polygon layers, distance is calculated between the center points of the bounding boxes. Since version 2.0, distance is calculated on the WGS84 ellipsoid (not on the layer plane) by default.
    The main output is a layer with added attributes neargtdist (distance), neargtdelta (difference in value), neargtname (name or ID), neargtcount. Note that the features are sorted from lowest to greatest value of the field that was used to compare values.
    The field neargtcount gives the value of incoming connecting lines linking to points with smaller value.
    Also returns a lines layer with connecting lines, as well as basic statistics of the distances and deltas (min, max, mean, quantiles).
    Use cases: Which is the next larger city? How far is the next higher building? Which is the closest peak with higher elevation? 
    Useful for spatial analysis or to categorize features in order to apply different styles (e.g. major and minor summits). 
    

tracker=https://github.com/florianneukirchen/qgis_nearest_greater/issues
repository=https://github.com/florianneukirchen/qgis_nearest_greater
# End of mandatory metadata

# Recommended items:

hasProcessingProvider=yes
# Uncomment the following line and add your changelog:

changelog=2.1
    - Support Qt6 / QGIS 4
    2.0
    - Take any geometry as input, not only point layers. The distance is calculated from the centers of the bounding boxes. This also fixes a bug that caused an exception with Multipoint geometries.
    - By default, distance is now calculated on the WGS84 ellipsoid. The old behaviour (distance on the plane of the layer) is still available as an option. 
    - Bugfix: Catch exception when comparing strings and trying to calculate delta.
    1.1
    - Set QGIS minimum version to 3.18 
    1.0
    - Add additional output field neargtdelta with the diffence of both values
    - Calculate statistics for delta
    - Improve strings in the UI
    0.3 (2022-09)
    - Fix a bug by changing the names of added fields to neargtdist, neargtname, neargtcount. Don't use underscore. Before, they were renamed by QGSIS when the layer was saved to a shapefile.
    0.2 (2022-09)
    - Return additional field 'neargtcount' with a count of the incoming links (i.e. connecting lines from points with smaller value)
    - Better handling of the distance value for the feature with greatest value. Three options: "NULL", "1 Mio.", "max distance + 1".
    - Warn if the selected name field contains NULL or non-unique values
    - Add short help string
    0.1 (2022-09)
    - Initial version

# Tags are comma separated with spaces allowed
tags=python, vector, distance, closest, nearest, point

homepage=https://www.riannek.de/code/qgis-nearest-with-greater/
category=Analysis
icon=icon.png
# experimental flag
experimental=False

# deprecated flag (applies to the whole plugin, not just a single version)
deprecated=False

# Since QGIS 3.8, a comma separated list of plugins to be installed
# (or upgraded) can be specified.
# Check the documentation for more information.
# plugin_dependencies=

Category of the plugin: Raster, Vector, Database or Web
# category=Vector

# If the plugin can run on QGIS Server.
server=False

