jmhutchison (2) [Avatar] Offline
#1
IF (y(geomgeog))>0 THEN

should be:

IF (ST_Y(geomgeog))>0 THEN