[ 
https://issues.apache.org/jira/browse/SEDONA-269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17704171#comment-17704171
 ] 

Martin Andersson commented on SEDONA-269:
-----------------------------------------

For reference, the following (quite extensive) list of raster formats are 
supported by GDAL: https://gdal.org/drivers/raster/index.html 

> Add data source for writing binary files
> ----------------------------------------
>
>                 Key: SEDONA-269
>                 URL: https://issues.apache.org/jira/browse/SEDONA-269
>             Project: Apache Sedona
>          Issue Type: Improvement
>            Reporter: Martin Andersson
>            Priority: Major
>
> 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:
> {code}
> // 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(...)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to