You can use ST_SetUpperLeft to reset the cords. There isn't any information in the pixels itself, it is all in the metadata of the raster.
http://postgis.net/docs/manual-2.4/RT_ST_SetUpperLeft.html So something like UPDATE your_table SET rast = ST_SetUpperLeft(rast, ST_UpperLeftY(rast), ST_UpperLeftX(rast) ); Depending on how messed up your lat/lon / order you assumed direction of pixels, you may need to use Georeference instead as your scalex/y may be wrong too. Changing the GeoReference will allow you to change upper left in addition to scale x/ y with a single update. http://postgis.net/docs/manual-2.4/RT_ST_SetGeoReference.html Note you may need to drop whatever scale constraints you have on raster first before you can use this. Hope that helps, Regina From: postgis-users [mailto:[email protected]] On Behalf Of ????? ?????? Sent: Friday, November 17, 2017 11:22 AM To: [email protected] Subject: [postgis-users] Permute raster's dimensions (flip raster's coordinates) Greetings, Is there any way to permute lat/lon (x/y) coordinates in a raster, i.e. how to achieve something similar to st_flipcoordinates behaviour for rasters? Thank you.
_______________________________________________ postgis-users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/postgis-users
