[EXTERNAL] Re: Performance(?) issues with ST_Reskew() (on rasters)

Newcomb, Doug doug_newcomb at fws.gov
Wed Feb 26 05:26:37 PST 2025


FYI,
 Satellite SAR data from companies like Umbra , https://registry.opendata.aws/umbra-open-data/ , is delivered with cells oriented at an angle to the North direction of the projection.

Doug
________________________________
From: Frank Gevaerts <frank.gevaerts at fks.be>
Sent: Wednesday, February 26, 2025 8:10 AM
To: Paul Ramsey <pramsey at cleverelephant.ca>
Cc: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
Subject: [EXTERNAL] Re: Performance(?) issues with ST_Reskew() (on rasters)



 This email has been received from outside of DOI - Use caution before clicking on links, opening attachments, or responding.



It seems to work for small enough sizes, yes.

I'm kind of new to rasters in general, so I'm not at all sure of the details either, but the idea of the skew parameters is to support rotated rasters (i.e. rasters that aren't exactly aligned north/south, or I guess more specifically, not aligned to the CRS).
Rotation is specified using skew values and not an angle, which I think is more general in that (I think) it also supports non-rectangular grids.

For me the diagrams on https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FWorld_file&data=05%7C02%7CDoug_Newcomb%40fws.gov%7C83d5b2bd7c0942d84be008dd5666fc9e%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C638761722502022396%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=aEPcWk%2FLmByQt5skByl0lJiB6FXUDgxeDSzareT3VP0%3D&reserved=0<https://en.wikipedia.org/wiki/World_file> helped a lot to understand what's going on. This is linked to from the documentation of ST_SetSkew(), but not ST_Reskew() or ST_Resample(). Maybe some documentation work is needed there, I'll see if I can find time to help out with that)

Meanwhile I've also figured out that I probably need ST_Resample() with non-zero skew values instead of ST_Reskew() because I also need to adjust the scale numbers if I want to keep the same pixel size (Pythagoras is meddling with this). It looks like ST_Resample() has the same infinite loop issue as ST_Reskew() though, and I'm not actually seeing anything ST_Reskew() does that ST_Resample() with skew parameters can not do so I'm guessing they use the same underlying code.

Frank

On Tue, Feb 25, 2025 at 09:01:30AM -0800, Paul Ramsey wrote:
> Did it (modulo the failure case) work?
> I’m stuck because I cannot even quite figure out what the function does. Presumably it has utility, but exactly what utility I don’t yet know.
>
> > On Feb 25, 2025, at 4:13 AM, Frank Gevaerts <frank.gevaerts at fks.be> wrote:
> >
> > ST_ReSkew seemed to me to be the easiest (and fastest) way to get the data in that form, so it was the first approach to try.
>

--
Frank Gevaerts                                 frank.gevaerts at fks.be
fks bvba - Formal and Knowledge Systems        https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.fks.be%2F&data=05%7C02%7CDoug_Newcomb%40fws.gov%7C83d5b2bd7c0942d84be008dd5666fc9e%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C638761722502041265%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=ebdrW1vRkftWKuUaAY%2FKZ8zGKDJ2%2FoLrFEfnq%2Fa6CW0%3D&reserved=0<http://www.fks.be/>
Grote Baan 79                                  Tel:  ++32-(0)11-21 49 11
B-3511 KURINGEN-HASSELT                        Fax:  ++32-(0)11-22 04 19
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20250226/11624607/attachment.htm>


More information about the postgis-users mailing list