I have data with lon lat pairs that I'm converting to geography types. Some of the pairs, however, are corrupt -- in my case, very negative values for longitude.
Is there a helper function in postgis that I can use to exclude such pairs? I'd like to exclude rows whose lon lat values aren't valid given the range of my coordinate system.
I'd like to do something like:
select * from data_with_lonlats where POINT_IS_VALID(ST_POINT(longitude, latitude), 4326)
4326 is my coordinate system, which has range
[-180 -90, 180 90].