Uploaded image for project: 'Apache Sedona'
  1. Apache Sedona
  2. SEDONA-269

Add data source for writing binary files

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.4.1

    Description

      The main use case in Sedona would be to write raster files in other formats than Geotiff.

      The binary file data source in Spark makes it easy to support reading different raster formats in Sedona. We only need to implement a function to convert the binary content to a raster.

      Spark doesn't offer a binary data source that supports writing. That could be implemented in Sedona.

      The benefits to Sedona would be:

      • Sedona would be able to support writing different raster formats by implementing different RS_As[ImageFormat] functions instead of creating a custom data source for each format. Like https://postgis.net/docs/RT_reference.html#Raster_Outputs
      • Users would be able to transport rasters in common formats to other data stores like RDBMS.

      Example:

      // Writing rasters to file using the proposed data source:
      df.selectExpr("filename", "RS_AsPNG(raster)").write.format("binary").path(....)
      // Transfering rasters to Postgis:
      df.selectExpr("filename", "RS_AsWKB(raster)").write.format("jdbc").option(...)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              umartin Martin Andersson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m