How can i query the distance field between landscope/floor and any other obstacles

i want make func to avoid mesh obstacles by distance field on XY plane(NO Z Axis),but i can’t make different between landscope/floor and other obstacles,is there any method of node to figue it out.