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

[SEDONA-466] Add new parameter useGeometryExtent to RS_AsRaster #1193

Merged
merged 5 commits into from
Jan 9, 2024

Conversation

duhaode520
Copy link
Contributor

Did you read the Contributor Guide?

Is this PR related to a JIRA ticket?

What changes were proposed in this PR?

  • Expose the useGeometryExtent parameter to user and RS_AsRaster support 6 parameters now.
  • A new asRaster function with 6 parameters. Old asRaster and asRasterwithRasterExtent functions are revised accordingly.
  • Add new tests to test the new parameter.
  • Add relative docs and example aboput the new parameter.

How was this patch tested?

  • Passed added tests and old relevant tests

Did this PR include necessary documentation updates?

  • Yes, I have updated the documentation update.

Format:
```
RS_AsRaster(RS_AsRaster(geom: Geometry, raster: Raster, pixelType: String, value: Double, noDataValue: Double, useGeometryExtent: Boolean)
```
@jiayuasu
Copy link
Member

jiayuasu commented Jan 9, 2024

@duhaode520 Would you please fix the lint issue? Thanks! You can use pre-commit to automatically fix this issue and then commit the change.

@@ -212,9 +212,13 @@ The newly created DataFrame can be written to disk again but must be under a dif

Introduction: Converts a Geometry to a Raster dataset. Defaults to using `1.0` for cell `value` and `null` for `noDataValue` if not provided. Supports all geometry types.
The `pixelType` argument defines data type of the output raster. This can be one of the following, D (double), F (float), I (integer), S (short), US (unsigned short) or B (byte).

The `useGeomeryExtent` argument defines the extent of the resultant raster. When set to true, it corresponds to the extent of geom, and when set to false, it corresponds to the extent of raster.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please say the default value of useGeometryExtent is true if not set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added the description of the default value.

@jiayuasu jiayuasu merged commit 2a5f80f into apache:master Jan 9, 2024
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants