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-292] Bridge Sedona Raster and Map Algebra operators #857

Merged
merged 2 commits into from
Jun 14, 2023
Merged

Conversation

jiayuasu
Copy link
Member

@jiayuasu jiayuasu commented Jun 12, 2023

Did you read the Contributor Guide?

Is this PR related to a JIRA ticket?

What changes were proposed in this PR?

New functions

  1. Add RS_MakeEmptyRaster (mainly for test purposes): equivalent to the same function in PosGIS
  2. Add RS_MetaData: equivalent to the same function in PosGIS
  3. Add RS_BandAsArray: extract a band from a raster as an array of double
  4. Add RS_AddBandFromArray: add an array of double into a raster as a band (replace or append)

Deprecate old functions

Deprecate the following operators

  1. geotiff data source for reading and writing geotiffs to arrays of double. We should use binaryFile data source for reading and raster data source for writing
  2. RS_Append. Now each array of double in the map algebra world must be a single band. RS_Append unfortunately stacks two bands together.

Refactor

Refactor the code structure to the following categories according to PostGIS definition (https://postgis.net/docs/RT_reference.html):

  • Raster constructors
  • Raster editors
  • Raster accessors
  • Raster outputs
  • Pixel functions
  • Map algebra

How was this patch tested?

Add new test cases

Did this PR include necessary documentation updates?

@jiayuasu jiayuasu added this to the sedona-1.4.1 milestone Jun 12, 2023
@jiayuasu jiayuasu changed the title [SEDONA-292] Bridge Sedona Raster and Map Algebra operator [SEDONA-292] Bridge Sedona Raster and Map Algebra operators Jun 12, 2023
@jiayuasu
Copy link
Member Author

@umartin Hi Martin, any comments or suggestion on this?

@jiayuasu jiayuasu merged commit fa76e52 into master Jun 14, 2023
39 checks passed
@jiayuasu jiayuasu deleted the getband branch June 14, 2023 04:27
@umartin
Copy link
Contributor

umartin commented Jun 15, 2023

@umartin Hi Martin, any comments or suggestion on this?

Sorry for being a little late to the party. I've been swamped by my day job. Looks very clean to me. Nice to see raster support getting a real boost!

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

3 participants