limit structure spawn height

is there a way to limit the height at which a surface structure can spawn? to prevent cases where it may spawn on mountains or in ravines
Continue to help post