MWE:
using Rasters
import GeometryOps
xlon = X(525700.0:100:621100.0)
xlat = Y(5.5461e6:100:5.6031e6)
rast = fill(-1, xlon, xlat)
pol = GeometryOps.polygonize(lookup(rast, X), lookup(rast, Y), rast) # negative rastervalues return Any[]
rast = fill(10, xlon, xlat)
pol = GeometryOps.polygonize(lookup(rast, X), lookup(rast, Y), rast) #gives 1-element Vector{GeometryBasics. ...