made sql more generic - automatically probing geometry columns