Working for postgis.
deprecated