Refactored PostGIS testing.