I am trying to get the DBConnect lookup working against PostGIS for the following geospatial query:
select CASE WHEN speedlimit=0 THEN '25' WHEN speedlimit=99 THEN '>45' ELSE speedlimit::text END as maxspeed FROM sfdata.speedlimits ORDER BY geom <-> ST_MakePoint($lng$,$lat$) LIMIT 1
I am getting the error "Script for lookup table 'speedlookup' returned error code 1. Results may be incorrect". Any help is appreciated.
... View more