Skip to main content
Solved

ArcGIS Metadata Read in Base64 Thumbnail


crutledge
Enthusiast
Forum|alt.badge.img+27

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.

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

2 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 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
Enthusiast
Forum|alt.badge.img+27
  • Author
  • Enthusiast
  • 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.


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