Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggested edit to documentation #1314

Closed
JimShady opened this issue Apr 3, 2024 · 2 comments · Fixed by #1377
Closed

Suggested edit to documentation #1314

JimShady opened this issue Apr 3, 2024 · 2 comments · Fixed by #1377

Comments

@JimShady
Copy link
Contributor

JimShady commented Apr 3, 2024

https://sedona.apache.org/1.5.1/api/sql/Raster-loader/#rs_makeemptyraster

When making a global raster using, for example, WGS84, the pixel size on the y axis should be specified as a negative number. I think this is a 'gotcha' and should be explicitly explained?

For example:

SELECT RS_MakeEmptyRaster(1, -- bands
                          'I', -- datatype
                          360, -- width
                          180, -- height
                          -180, -- upperlefx
                          90, -- upperlefty
                          1, -- scalex (pixel size)
                          **-1, -- scaley (pixel size)**
                          0.0, -- skewx
                          0.0, -- skewy
                          4326) -- srid
@jiayuasu
Copy link
Member

jiayuasu commented Apr 8, 2024

@Kontinuation Do you know why the pixel size on Y (scaleY) can be negative?

@Kontinuation
Copy link
Member

The pixels with lower Y grid/pixel coordinate is mapped to larger Y value of map coordinate, so a negative scaleY indicates a north-up image, which is the most common case.

scaley is actually an element of the affine transformation matrix, it should not be treated as the pixel size. So yes, the documentation is quite misleading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants