I am working with a data set that has been using the (0 0) point to pad any points that were missing when the linestring was created. So now the query
SELECT
id, route as line
FROM
trips
WHERE
ST_Contains(route, ST_PointFromText('POINT(0 0)', 4326))
Returns some linestrings where a point or two has been set 0 0 and some where the entire linestring is 0 0's.
Is there a way get the index of ST_PointFromText('POINT(0 0)', 4326) from a linestring so I can delete it?
EDIT
Removing the lines that are all 0 0 points is trivial now that I think about it.
DELETE
FROM
trips
WHERE
ST_Contains(route, ST_PointFromText('POINT(0 0)', 4326))
AND
ST_LENGTH(route) = 0
I am still trying to remove the points in lines.