I have a set of coordinates, that I receive from GPS. I store them in database, its geometry is 4326. I am using the next query to calculate the travelled distance:
ST_length(ST_Transform(st_makeline(points), 26986)) AS distance_travelled
Everything was working fine until i got the next error:
Couldn't project point (741.695 176.355 0): latitude or longitude exceeded limits (-14)
The error is probably due to GPS device malfunction. What is the most efficient and elegant way to filter out the 'out of bounds' points (any alternative to filtering by [180, -180, 90, -90] in WHERE clause) - is there any built in Postgis function that is able to do the filtering based on SRID?