I am attempting to convert a geometry column in the postgres database to a geography column. I created a new column like this:
alter table scene add column footprint_new geography(POLYGON, 4326);
and I'm trying to populate the new column like so:
update scene set footprint_new = footprint::geography;
and I get the following error:
ERROR: Coordinate values are out of range [-180 -90, 180 90] for GEOGRAPHY type
Now, it isn't too surprising that there are some out of range values in this database. I want to skip those out of range geometries during the update and identify them later so they can be fixed. How can I do that?