Skip to main content
added 56 characters in body
Source Link
Mayo
  • 4.1k
  • 3
  • 23

Not a very elegant way, but I think it will work.

with_variable(
    'maxval',
    array_max(
        overlay_intersects(
            'point_layer', 
            "id"
        )
    ),
    array_filter(
        overlay_intersects(
            'point_layer', 
        $geometry    array("id", $geometry)
        filter:=),
 "id"       @element[0] = @maxval
    )[0][0][1]
)

Not a very elegant way, but I think it will work.

with_variable(
    'maxval',
    array_max(
        overlay_intersects(
            'point_layer', 
            "id"
        )
    ),
    overlay_intersects(
        'point_layer', 
        $geometry,
        filter:= "id" = @maxval
    )[0]
)

Not a very elegant way, but I think it will work.

with_variable(
    'maxval',
    array_max(
        overlay_intersects(
            'point_layer', 
            "id"
        )
    ),
    array_filter(
        overlay_intersects(
            'point_layer', 
            array("id", $geometry)
        ),
        @element[0] = @maxval
    )[0][1]
)
Source Link
Mayo
  • 4.1k
  • 3
  • 23

Not a very elegant way, but I think it will work.

with_variable(
    'maxval',
    array_max(
        overlay_intersects(
            'point_layer', 
            "id"
        )
    ),
    overlay_intersects(
        'point_layer', 
        $geometry,
        filter:= "id" = @maxval
    )[0]
)