The following SQL is working fine from the terminal:
SELECT MIN(ST_Distance(
ST_Transform(ST_GeomFromText('POINT(-3.163916 55.926528)',4326),32630),
ST_Transform(ST_Boundary(ST_GeomFromEWKB(geometry)),32630)
)) FROM geo_table
BUT,
when I try it through a python psycopg2 try-except it fails and postGIS returns a WARNING: OGC WKB expected, EWKB provided - use GeometryFromEWKB() for this.
I am slightly confused here, any help would be much appreciated!
I have more queries in my code that they use a stored geometry without the need of a wrapper like ST_GeomFromWKB. I don't understand why this happens.
Cheers, A