Use GEOS instead of postgis

Also support raw sql queries