Skip to main content
Solved

ArcGIS Metadata Read in Base64 Thumbnail

  • January 14, 2022
  • 2 replies
  • 34 views

crutledge
Influencer
Forum|alt.badge.img+43

Hi All,

I am sure I am missing something simple. I am setting up a workspace to read in FileGDB metadata and write that out to a spreadsheet. Seems fine but I would also like to work with the base 64 thumbnail. I can write that out to a cell but having problems making use of the thumbnail in this format. I tried using BinaryDecoder and RasterReplacer but generate an error below. Any thoughts? Many thanks.

 

Additionally....if there is a better way to work with the thumbnail in an ESRI File GDB please suggest. Thanks again!

 

I keep on plugging away at this. One thing that puzzles me is I can take the thumbnail base64 text from Binary.Thumbnail.Data and get a jpg from one of those online Base64 to jpg converters so the string from the xml metadata is valid it seems. Just cannot get a read on it in FME. Thoughts? Thanks!

 

BinaryDecoder (TextEncoderFactory): Invalid Base64 character '0'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Feature Type: `XMLFlattener_3_OUTPUT'

Attribute(encoded: UTF-16LE): `Data' has value `/9j/4AAQSkZJRgABAQEAYABgAAD/4RDoRXhpZgAATU0AKgAAAAgABAE7AAIAAAAKAAAISodpAAQA

AAABAAAIVJydAAEAAAAUAAAQzOocAAcAAAgMAAAAPgAAAAAc6gAAAAgAAAAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Best answer by daveatsafe

Hi @crutledge​,

I think it may be due to your Data attribute being encoded UTF-16LE. Please use an AttributeEncoder to convert to UTF-8 before going to the Binary Decoder. UTF-8 uses the same encoding as ASCII for the characters used in Base64.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 1637 replies
  • Best Answer
  • January 14, 2022

Hi @crutledge​,

I think it may be due to your Data attribute being encoded UTF-16LE. Please use an AttributeEncoder to convert to UTF-8 before going to the Binary Decoder. UTF-8 uses the same encoding as ASCII for the characters used in Base64.


crutledge
Influencer
Forum|alt.badge.img+43
  • Author
  • Influencer
  • 281 replies
  • January 14, 2022

Detail oriented. Yes it looks like that was it. Thanks for the Eagle Eye on spotting that encoding difference. Much appreciated.

Best,

c.