I have polygon layer which consists of many circles with different radius (see below) and I want to convert it to centroids and write new attribute into attribute table of centroids with value of radius.
EDIT: I would rather prefer not using calculation from circle area as I would like to extend the model later to use it with irregular polygons. So I am more looking for some kind of function which could work also for other geometries (not only for circles).
So far I've tried v.distance and other build-in functions I've also tried Field Calculator (but it obviously doesn't work for two separated layers).
select distance(centroid(geometry),point_n(geometry,1)) as radius, centroid(geometry) as geometry from input1