-
Notifications
You must be signed in to change notification settings - Fork 695
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
[SEDONA-411] Add RS_Rotation #1061
Conversation
@furqaankhan Is the result identical to PostGIS? |
Yes it is. |
@jiayuasu I want to get Kristin's opinion before merging, so don't merge yet. |
} | ||
|
||
// Angular separation | ||
thetaIJ = Math.acos((((scaleX * skewX) + (skewY * scaleY)) / (magnitudeI * magnitudeJ))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can magnitude
be zero or other invalid values? If so, we need to add handlers and test cases.
// x ordinate of the upper-left corner of the upper-left pixel | ||
double offsetX = renderedImage.getTileGridXOffset(); | ||
|
||
// y ordinate of the upper-left corner of the upper-left pixel | ||
double offsetY = renderedImage.getTileGridYOffset(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct. offsetX
and offsetY
should be directly retrieved from the upperLeftX and upperLeftY components of the raster metadata.
public void testGeoTransform() throws FactoryException { | ||
GridCoverage2D emptyRaster = RasterConstructors.makeEmptyRaster(1, 10, 15, 1, 2, 1, -1, 10, 10, 0); | ||
double[] actual = RasterAccessors.getGeoTransform(emptyRaster); | ||
double[] expected = new double[] {10.04987562112089, 10.04987562112089, -1.4711276743037347, -1.5707963267948966, 0.0, 0.0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are getting 0 offsets for rasters with non-zero offsets, this is caused by the problem mentioned above.
Did you read the Contributor Guide?
Is this PR related to a JIRA ticket?
[SEDONA-XXX] my subject
.What changes were proposed in this PR?
How was this patch tested?
Did this PR include necessary documentation updates?