Skip to main content
Solved

How to handle a geopackage received as base64 binary


dms2
Contributor
Forum|alt.badge.img+11
  • Contributor

I need to publish a workspace to fme server that will receive a geopackage file as base64 binary and will do some schema and data validation before inserting geopackage data into a number of Oracle tables. Actually an API will call the FME service providing that base64 binary and some other information.

Now my question is how to read geopackage schema and data into fme. Any idea? I don't see how to get the binary back into a geopackage file.

Thanks!

Best answer by david_r

You can use the BinaryDecoder to convert the base64 document into a binary attribute, which you can then write to disk using e.g. the AttributeFileWriter (make sure to set target encoding to fme-binary). The TempPathnameCreator can be helpful if this is a supposed to be just a temporary file.

You can then use the FeatureReader to read the Geopackage file contents into FME.

View original
Did this help you find an answer to your question?

2 replies

david_r
Celebrity
  • Best Answer
  • July 13, 2020

You can use the BinaryDecoder to convert the base64 document into a binary attribute, which you can then write to disk using e.g. the AttributeFileWriter (make sure to set target encoding to fme-binary). The TempPathnameCreator can be helpful if this is a supposed to be just a temporary file.

You can then use the FeatureReader to read the Geopackage file contents into FME.


dms2
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • July 16, 2020
david_r wrote:

You can use the BinaryDecoder to convert the base64 document into a binary attribute, which you can then write to disk using e.g. the AttributeFileWriter (make sure to set target encoding to fme-binary). The TempPathnameCreator can be helpful if this is a supposed to be just a temporary file.

You can then use the FeatureReader to read the Geopackage file contents into FME.

Had been playing with the BinaryDecoder but didn't know what to do next.

Thank you so much!!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings